blob: 0bfe85cfde01df202178e5368e999358982ab17f (
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
52
53
54
55
56
57
|
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=jna
pkgver=4.2.2
pkgrel=1.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 contrib-jars \
-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-${pkgname}.xml" \
"build/${pkgname}.jar" \
"${pkgname}-${pkgver}.jar"
jh mvn-install "net.java.dev.${pkgname}" "${pkgname}-platform" ${pkgver} \
"pom-${pkgname}-platform.xml" \
"contrib/platform/dist/${pkgname}-platform.jar" \
"${pkgname}-platform-${pkgver}.jar"
ln -s "/usr/share/java/${pkgname}-${pkgver}.jar" \
"${pkgdir}/usr/share/java/${pkgname}.jar"
ln -s "/usr/share/java/${pkgname}-platform-${pkgver}.jar" \
"${pkgdir}/usr/share/java/${pkgname}-platform.jar"
}
|