diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2015-09-18 19:40:43 -0500 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-09-22 16:15:06 -0300 |
commit | cd5ddd600a571c2908ab50caefc85816bb2b59d5 (patch) | |
tree | 88366dbac8ae7fa8df2df565a50c4362b8e38cac /libre/java-xmlgraphics-commons | |
parent | 5e17a85578129419f270c74e62d8a705f79b91c2 (diff) | |
download | abslibre-cd5ddd600a571c2908ab50caefc85816bb2b59d5.tar.gz abslibre-cd5ddd600a571c2908ab50caefc85816bb2b59d5.tar.bz2 abslibre-cd5ddd600a571c2908ab50caefc85816bb2b59d5.zip |
java-xmlgraphics-commons: add new package to [libre]
Diffstat (limited to 'libre/java-xmlgraphics-commons')
-rw-r--r-- | libre/java-xmlgraphics-commons/PKGBUILD | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/libre/java-xmlgraphics-commons/PKGBUILD b/libre/java-xmlgraphics-commons/PKGBUILD new file mode 100644 index 000000000..49f361b31 --- /dev/null +++ b/libre/java-xmlgraphics-commons/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> + +_libname=xmlgraphics-commons +pkgname=java-${_libname} +pkgver=1.5 +pkgrel=2.parabola1 +pkgdesc="Common components between FOP and Batik." +arch=('any') +url="http://xmlgraphics.apache.org/commons/" +license=('APACHE') +depends=('java-runtime') +makedepends=('java-commons-io' 'java-commons-logging' 'java-environment' 'jh') +source=("https://archive.apache.org/dist/xmlgraphics/commons/source/${_libname}-${pkgver}-src.tar.gz" + "https://repo1.maven.org/maven2/org/apache/xmlgraphics/${_libname}/${pkgver}/${_libname}-${pkgver}.pom") +md5sums=('e7012400a3c9d10a18bc5c3515610f35' + 'feb55c9c61fa0b63f2926ad8872bc2a5') + +prepare() { + cd "${srcdir}/${_libname}-${pkgver}" + rm -v $(find . -name \*.jar) + mkdir -p build/classes +} + +build() { + cd "${srcdir}/${_libname}-${pkgver}" + + CLASSPATH="/usr/share/java/commons-io.jar:/usr/share/java/commons-logging.jar" + javac -encoding UTF-8 -classpath $CLASSPATH -d "build/classes" \ + $(find "src/java" -name \*.java) + javadoc -encoding UTF-8 -classpath $CLASSPATH -d "build/javadoc" \ + -sourcepath "src/java" -subpackages org + + jar -cvf "${_libname}.jar" -C "build/classes" . +} + +package() { + cd "${srcdir}/${_libname}-${pkgver}" + + # Install documentation + install -d "${pkgdir}/usr/share/doc/${pkgname}" + cp -r "build/javadoc" "${pkgdir}/usr/share/doc/${pkgname}" + cp -r "examples/java" "${pkgdir}/usr/share/doc/${pkgname}/examples" + + # Install Maven artifacts + export DESTDIR=${pkgdir} + jh mvn-install "org.apache.xmlgraphics" ${_libname} ${pkgver} \ + "${srcdir}/${_libname}-${pkgver}.pom" \ + "${_libname}.jar" \ + "${_libname}.jar" + ln -s "/usr/share/java/${_libname}.jar" \ + "${pkgdir}/usr/share/java/${_libname}-${pkgver}.jar" + + install -d "${pkgdir}/usr/share/java/${_libname}" + ln -s "/usr/share/java/${_libname}.jar" \ + "${pkgdir}/usr/share/java/${_libname}/${_libname}.jar" +} |