summaryrefslogtreecommitdiff
path: root/pcr/jzlib
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-09-12 19:09:53 -0500
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-09-22 16:15:03 -0300
commite59c0947bf963ff59fcdc76f9320d44a96216cf4 (patch)
tree9d5c06a284caf9c34200bc16c606a8ce4911ec93 /pcr/jzlib
parentb5dd220ea2436cdeb4cc76f55f990aebab5e1c2e (diff)
downloadabslibre-e59c0947bf963ff59fcdc76f9320d44a96216cf4.tar.gz
abslibre-e59c0947bf963ff59fcdc76f9320d44a96216cf4.tar.bz2
abslibre-e59c0947bf963ff59fcdc76f9320d44a96216cf4.zip
jzlib: add new package to [pcr]
Diffstat (limited to 'pcr/jzlib')
-rw-r--r--pcr/jzlib/PKGBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/pcr/jzlib/PKGBUILD b/pcr/jzlib/PKGBUILD
new file mode 100644
index 000000000..22f1cb84b
--- /dev/null
+++ b/pcr/jzlib/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+pkgname=jzlib
+pkgver=1.1.3
+pkgrel=1
+pkgdesc="Java Zlib implementation"
+arch=('any')
+url="http://www.jcraft.com/jzlib/"
+license=('BSD')
+depends=('java-runtime')
+makedepends=('java-environment' 'jh')
+source=("https://github.com/ymnk/${pkgname}/archive/${pkgver}.zip")
+md5sums=('9613fd3b704247daa68a288f368efe29')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ mkdir -p build/classes
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ javac -d "build/classes" $(find "src/main/java" -name \*.java)
+ javadoc -sourcepath "src/main/java" -d "build/javadoc" com.jcraft.jzlib
+
+ jar -cvf "${pkgname}.jar" -C "build/classes" .
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # 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}"
+ cp -r "example" "${pkgdir}/usr/share/doc/${pkgname}/examples"
+
+ # Install Maven artifacts
+ export DESTDIR=${pkgdir}
+ jh mvn-install "com.jcraft" ${pkgname} ${pkgver} \
+ "${srcdir}/${pkgname}-${pkgver}/pom.xml" \
+ "${srcdir}/${pkgname}-${pkgver}/${pkgname}.jar" \
+ "${pkgname}.jar"
+ ln -s "/usr/share/java/${pkgname}.jar" \
+ "${pkgdir}/usr/share/java/${pkgname}-${pkgver}.jar"
+}