summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/jna/PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/pcr/jna/PKGBUILD b/pcr/jna/PKGBUILD
new file mode 100644
index 000000000..0c1887a82
--- /dev/null
+++ b/pcr/jna/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+pkgname=jna
+pkgver=4.2.2
+pkgrel=1
+pkgdesc="Access native libraries with pure Java code."
+arch=('any')
+url='https://github.com/java-native-access/jna'
+license=('LGPL' 'custom:ASL')
+depends=('java-runtime')
+makedepends=('apache-ant' 'jh')
+source=("https://github.com/java-native-access/${pkgname}/archive/${pkgver}.tar.gz"
+ 'jna-disable_full_jar.patch')
+sha1sums=('970f797cc76b42adcddcb3e1e4212366d01b07cf'
+ '1a5fcf4c7765c0968c3496dea0c89146d8d97211')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ rm -rv {dist,lib,www}
+ rm -rv native/libffi
+ rm -v w32ce-test.lnk
+ sed -i 's/1\.9/1\.10/g' pom-jna.xml
+ patch -Np1 -i "${srcdir}/jna-disable_full_jar.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ant jar javadoc \
+ -Dmaven-release=true
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Install license file
+ install -Dm644 ASL2.0 "${pkgdir}/usr/share/licenses/${pkgname}/ASL2.0.txt"
+ install -Dm644 LGPL2.1 "${pkgdir}/usr/share/licenses/${pkgname}/LGPL2.1.txt"
+
+ # Install documentation
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r "doc/javadoc" "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ export DESTDIR=${pkgdir}
+ jh mvn-install "net.java.dev.${pkgname}" ${pkgname} ${pkgver} \
+ "pom-jna.xml" \
+ "build/${pkgname}.jar" \
+ "${pkgname}-${pkgver}.jar"
+
+ ln -s "/usr/share/java/${pkgname}-${pkgver}.jar" \
+ "${pkgdir}/usr/share/java/${pkgname}.jar"
+}