diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2017-02-08 18:32:09 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2017-02-08 18:32:09 -0500 |
commit | ef10d2830334439cc1b07fd751f7f7e8ed0667c8 (patch) | |
tree | 80880cd1eba945750f71131cb3273bef175dca2f /pcr/xz-java | |
parent | c12d05f59af1daf1bcc765fc01adc15db6064a65 (diff) | |
download | abslibre-ef10d2830334439cc1b07fd751f7f7e8ed0667c8.tar.gz abslibre-ef10d2830334439cc1b07fd751f7f7e8ed0667c8.tar.bz2 abslibre-ef10d2830334439cc1b07fd751f7f7e8ed0667c8.zip |
xz-java: add new package to [pcr]
Diffstat (limited to 'pcr/xz-java')
-rw-r--r-- | pcr/xz-java/PKGBUILD | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pcr/xz-java/PKGBUILD b/pcr/xz-java/PKGBUILD new file mode 100644 index 000000000..c64b6b520 --- /dev/null +++ b/pcr/xz-java/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> + +pkgname=xz-java +pkgver=1.6 +pkgrel=1 +pkgdesc="Java library for XZ and LZMA compression" +arch=('any') +url="http://tukaani.org/xz/java.html" +license=('Public Domain') +depends=('java-runtime') +makedepends=('java-environment' 'jh') +source=("http://tukaani.org/xz/$pkgname-$pkgver.zip") +sha256sums=('1da9c5534656da8197457feeea7ee6c7a2c908e94f01db6d3c80ee17620e77fc') + +prepare() { + cd $srcdir + cp maven/pom_template.xml pom.xml + sed -i "s,@VERSION@,$pkgver,g; \ + s,@TITLE@,XZ data compression,g; \ + s,@HOMEPAGE@,$url,g" pom.xml + mkdir -p build/classes +} + +build() { + cd $srcdir + javac -d build/classes $(find src/org -name \*.java) + javadoc -d build/javadoc -sourcepath src -subpackages org + jar -cvf xz.jar -C build/classes . +} + +package() { + cd $srcdir + + # Install license file + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING.txt" + + # Install documentation + install -d "$pkgdir/usr/share/doc/$pkgname" + cp -r build/javadoc "$pkgdir/usr/share/doc/$pkgname" + + # Install Maven artifacts + export DESTDIR=$pkgdir + jh mvn-install org.tukaani xz $pkgver \ + pom.xml xz.jar "xz-$pkgver.jar" + + ln -s "/usr/share/java/xz-$pkgver.jar" \ + "$pkgdir/usr/share/java/xz.jar" +} |