aboutsummaryrefslogtreecommitdiffstats
path: root/community/tomcat-native/APKBUILD
blob: a6093ba1f77f33c66c3a2c88ebd9af9894c2f940 (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
# Contributor: Sean Summers <seansummers@gmail.com>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
# TODO: Patch for LibreSSL.
pkgname=tomcat-native
pkgver=1.2.14
pkgrel=1
pkgdesc="Native resources optional component for Apache Tomcat"
url="http://tomcat.apache.org/native-doc/"
arch="all"
license="ASL-2.0"
depends="openjdk8-jre-base"
makedepends="apr-dev chrpath openjdk8 openssl-dev"
subpackages="$pkgname-dev"
source="http://www-eu.apache.org/dist/tomcat/tomcat-connectors/native/$pkgver/source/$pkgname-$pkgver-src.tar.gz"
builddir="$srcdir/$pkgname-$pkgver-src/native"

build() {
	cd "$builddir"

	./configure --prefix=/usr \
		--with-apr=/usr/bin/apr-1-config \
		--with-java-home=/usr/lib/jvm/default-jvm \
		--with-ssl=yes
	make
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	# Remove redundant rpath.
	chrpath --delete "$pkgdir"/usr/lib/libtcnative-1.so

	rm -f "$pkgdir"/usr/lib/libtcnative-1.la
	rmdir "$pkgdir"/usr/bin
}

dev()  {
	default_dev
	mv "$subpkgdir"/usr/lib/libtcnative-1.so "$pkgdir"/usr/lib/
}

sha512sums="ddfc44f07dc4200f8ef20b5425355d2737a7510e41660002553c04e7451c48e4f54f4cfb462ed6bea1fad1ea60525a7ce3787af74e6a4b795f9dd1862b75c633  tomcat-native-1.2.14-src.tar.gz"