summaryrefslogtreecommitdiff
path: root/pcr/jna/PKGBUILD
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-06-22 19:47:52 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-06-22 19:47:52 -0500
commit9f0e5a17a760eb1b1d5a8f02a8333b3de8d36760 (patch)
tree34dbe08f751c5d8abe6fedf9f7a24e7045d0d119 /pcr/jna/PKGBUILD
parent26fc23058ee5f76b10e15f8dc0447b2836f78cea (diff)
downloadabslibre-9f0e5a17a760eb1b1d5a8f02a8333b3de8d36760.tar.gz
abslibre-9f0e5a17a760eb1b1d5a8f02a8333b3de8d36760.tar.bz2
abslibre-9f0e5a17a760eb1b1d5a8f02a8333b3de8d36760.zip
jna: add new package to [pcr]
Diffstat (limited to 'pcr/jna/PKGBUILD')
-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"
+}