aboutsummaryrefslogtreecommitdiffstats
path: root/community/java-sigar/APKBUILD
blob: 03cf505c6f3c37773d5283f2b4b273aa98345e20 (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=java-sigar
_pkgname=sigar
pkgver=1.6.4
pkgrel=0
pkgdesc="System Information Gatherer And Reporter"
url="https://github.com/hyperic/sigar/"
arch="all !aarch64"
license="Apache-2.0"
depends="$pkgname-native=$pkgver-r$pkgrel"
subpackages="$pkgname-native"
makedepends="apache-ant libtirpc-dev linux-headers openjdk8 perl"
source="https://github.com/hyperic/$_pkgname/archive/$_pkgname-$pkgver.tar.gz
	musl-compat-HZ.patch
	musl-compat-strerror_r.patch
	tirpc.patch
	fix-inlined-functions-definition.patch
	"
builddir="$srcdir/$_pkgname-$_pkgname-$pkgver"

build() {
	cd "$builddir"/bindings/java
	ant build
}

package() {
	cd "$builddir"/bindings/java

	install -m 644 -D sigar-bin/lib/sigar.jar \
		"$pkgdir"/usr/share/java/$_pkgname-$pkgver.jar
	ln -s $_pkgname-$pkgver.jar "$pkgdir"/usr/share/java/$_pkgname.jar
}

native() {
	pkgdesc="$pkgdesc (native library)"
	depends=""

	cd "$builddir"/bindings/java
	install -m 755 -D sigar-bin/lib/libsigar-*-linux.so \
		"$subpkgdir"/usr/lib/libsigar.so
}

sha512sums="0515f3501a51357d6ac01dc5e3ecffae10995f347b98c66928adff247b86e52112d2bf9cf78b2633941eb9c7fb23f019f4885c41348fe461239e4eebd147253e  sigar-1.6.4.tar.gz
bfb4f6f945207be652c58cfc8d3a552c84424d0ca9a3c0bf4177f4caa24c65a44ed3342b28d6d80d82a3e61d72f61d9c4194902bafa5372710db71f85e713f0f  musl-compat-HZ.patch
ea85154edc0ca2b15d556bbfe4fa61b37d2a53befa969b4c91d976b502f14ce138b0dbbd7d46985aa809a490df97b6ef388f3f16820e1e14b52fc85851342527  musl-compat-strerror_r.patch
c6bda65e389a62495951a908f675fbe4aa24b3b819e8e4bc9fee87e9e59ca5533b9ad738737d42f7d7665cc077a3bbc868420aa281536d0673a62e94b165488c  tirpc.patch
ff313c86155c6c6e827cca1ea092308fce3f57eff88fb097e7f2f125ce42b44e45de57f7f45dd0b440fae854a169fad3e2ebe9d2fc9f2c7406413928ed081e15  fix-inlined-functions-definition.patch"