summaryrefslogtreecommitdiff
path: root/pcr/java-commons-compress/PKGBUILD
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2017-02-08 18:40:00 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2017-02-08 18:40:00 -0500
commit9570d67058bf977c82c9d6dfcbc5866ae4a2360b (patch)
tree09f684782a9814854b9f2a4335eb14583e8db04e /pcr/java-commons-compress/PKGBUILD
parentef10d2830334439cc1b07fd751f7f7e8ed0667c8 (diff)
downloadabslibre-9570d67058bf977c82c9d6dfcbc5866ae4a2360b.tar.gz
abslibre-9570d67058bf977c82c9d6dfcbc5866ae4a2360b.tar.bz2
abslibre-9570d67058bf977c82c9d6dfcbc5866ae4a2360b.zip
java-commons-compress: add new package to [pcr]
Diffstat (limited to 'pcr/java-commons-compress/PKGBUILD')
-rw-r--r--pcr/java-commons-compress/PKGBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/pcr/java-commons-compress/PKGBUILD b/pcr/java-commons-compress/PKGBUILD
new file mode 100644
index 000000000..7d87ef5bb
--- /dev/null
+++ b/pcr/java-commons-compress/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=commons-compress
+pkgname=java-${_pkgname}
+pkgver=1.13
+pkgrel=1
+pkgdesc="Java API for working with tar, zip and bzip2 files"
+arch=('any')
+url="http://commons.apache.org/compress/"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('java-environment' 'jh' 'xz-java')
+source=("https://archive.apache.org/dist/commons/compress/source/${_pkgname}-$pkgver-src.tar.gz")
+sha256sums=('88754be9a343c7af60498b7ec8b7c07c4551b6f991cd609d5b6a019bb7da58ee')
+
+prepare() {
+ cd "$srcdir/${_pkgname}-$pkgver-src"
+ mkdir -p build/classes
+}
+
+build() {
+ cd "$srcdir/${_pkgname}-$pkgver-src"
+ CLASSPATH="/usr/share/java/xz.jar"
+ javac -cp $CLASSPATH -d build/classes -encoding UTF-8 \
+ $(find src/main/java -name \*.java)
+ javadoc -classpath $CLASSPATH -d build/javadoc -encoding UTF-8 \
+ -sourcepath src/main/java -subpackages org
+ jar -cvf "${_pkgname}.jar" -C build/classes .
+}
+
+package() {
+ cd "$srcdir/${_pkgname}-$pkgver-src"
+
+ # Install license file
+ install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.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.apache.commons ${_pkgname} $pkgver \
+ pom.xml "${_pkgname}.jar" "${_pkgname}-$pkgver.jar"
+
+ ln -s "/usr/share/java/${_pkgname}-$pkgver.jar" \
+ "$pkgdir/usr/share/java/${_pkgname}.jar"
+}