blob: 751ba695f8d908e1907e3cbc455ffa3721a32040 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# 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
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"
}
|