aboutsummaryrefslogtreecommitdiffstats
path: root/community/tomcat-native/APKBUILD
blob: e3e0711876c477c5b7f31975bd794f7a5f694230 (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
# Contributor: Sean Summers <seansummers@gmail.com>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=tomcat-native
pkgver=1.2.21
pkgrel=1
pkgdesc="Native resources optional component for Apache Tomcat"
url="https://tomcat.apache.org/native-doc/"
arch="all"
license="Apache-2.0"
options="!check" # package has no tests
makedepends="apr-dev chrpath openjdk8 openssl-dev"
subpackages="$pkgname-dev"
source="https://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="7f43f815785e5bc3e43f5b2e9ad1c90576a3c1528d57230328b7175bf475eb5f4e1f91b66fae74ad32cd76f044d7705f98a79109f6f84e5af75dc32bc8830b29  tomcat-native-1.2.21-src.tar.gz"