summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-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"
+}