summaryrefslogtreecommitdiff
path: root/community/java-lz4/APKBUILD
blob: f11484808eca9a402cdad480e0b59490e72671c6 (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=java-lz4
_pkgname=lz4-java
pkgver=1.3.0
pkgrel=2
pkgdesc="LZ4 compression for Java"
url="https://github.com/jpountz/lz4-java"
arch="all"
license="ASL-2.0"
depends="openjdk8-jre-base"
makedepends="apache-ant openjdk8"
subpackages="$pkgname-native"
source="$_pkgname-$pkgver.tar.gz::https://github.com/jpountz/$_pkgname/archive/$pkgver.tar.gz
	0001-ivy-location.patch
	0002-dont-bundle-natives.patch
	0003-prefer-system-lib.patch
	"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	cd "$builddir"

	ant ivy-bootstrap || return 1
	ant jar -lib .ant -Divy.default.ivy.user.dir=/tmp/ivy2
}

package() {
	depends="$depends $pkgname-native"

	install -m644 -D "$builddir"/dist/lz4.jar \
		"$pkgdir"/usr/share/java/lz4-$pkgver.jar || return 1
	ln -sf lz4-$pkgver.jar "$pkgdir"/usr/share/java/lz4.jar
}

native() {
	local soname="liblz4-java.so"

	install -m755 -D "$builddir"/build/jni/*/*/$soname \
		"$subpkgdir"/usr/lib/$soname.$pkgver || return 1
	ln -sf $soname.$pkgver "$subpkgdir"/usr/lib/$soname
}

md5sums="b9a4eb57fd0667df96135854c9e6f139  lz4-java-1.3.0.tar.gz
c87e95c4d7df4b89d17fef542078a61a  0001-ivy-location.patch
d131c75a10e298751f34c6d545ed94a2  0002-dont-bundle-natives.patch
ee4c9d7574586e74f2577523bfeab564  0003-prefer-system-lib.patch"
sha256sums="7fdfe31304a50a830f4f2e8207cdfe58126270e2f24d7c318540e2b263bead78  lz4-java-1.3.0.tar.gz
bb5a2779353a40a15d8ee24438a199c5c023db1605b491260afb3a628684001b  0001-ivy-location.patch
117acb8ff84b387cd91acec340b870fab3359804cdd76e9f0fc574f013d30141  0002-dont-bundle-natives.patch
548168e3344538e87be537b13d746c3e73fb3ed29f0daa1776eb62f7ba8240c1  0003-prefer-system-lib.patch"
sha512sums="417141a02b1ed599499b352d96e3e7a2b84376dbd84f7042563c90e30b3c6d5ebc132f9e96eeff717bc790e615123acb53887bfaea8566870cba78d05b2d8048  lz4-java-1.3.0.tar.gz
1e5d1f5bdb87ad89efa423af2ec83921ab7a7fc3de36e6398cbfa90e1b2e07d11834decddf97a17b3dbadf7d2575770b629b35435ce8f1d5ac078554026d1789  0001-ivy-location.patch
cc570080f7682525709ec1999fe5cf8e0ccc6f41dd34ab76159321c02ca504041d4d2bc008f04e312550bd1de611ed77d99dd7f2101a0a3600cbea7ab16ce09d  0002-dont-bundle-natives.patch
b94fd00b7a1410c55103a1a15422641970366a36dd3d87cb25cd39f90fc740cbf92affea6af6bae2595663bd1e2943ab129399c3907168528a91941e19e60804  0003-prefer-system-lib.patch"