aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/commons-daemon/APKBUILD65
1 files changed, 65 insertions, 0 deletions
diff --git a/testing/commons-daemon/APKBUILD b/testing/commons-daemon/APKBUILD
new file mode 100644
index 0000000000..069d6cc612
--- /dev/null
+++ b/testing/commons-daemon/APKBUILD
@@ -0,0 +1,65 @@
+# Contributor: TBK <alpine@jjtc.eu>
+# Maintainer: TBK <alpine@jjtc.eu>
+pkgname=commons-daemon
+pkgver=1.1.0
+pkgrel=0
+pkgdesc="Tools to allow Java programs to run as UNIX daemons."
+url="https://commons.apache.org/daemon/"
+arch="all"
+license="Apache-2.0"
+options="!check" # can't get "ant test" to work correctly
+depends="openjdk8-jre-base"
+makedepends="apache-ant docbook2x linux-headers openjdk8" # update --with-java when bumping openjdk
+subpackages="$pkgname-doc jsvc:_jsvc jsvc-doc:_jsvc_doc"
+source="http://mirrors.dotsrc.org/apache/commons/daemon/source/commons-daemon-$pkgver-src.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver-src"
+
+build() {
+ # commons-daemon.jar + docs
+ ant -Dcompile.source=1.6 -Dcompile.target=1.6 jar javadoc
+
+ # jsvc
+ cd "$builddir/src/native/unix"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --with-java=/usr/lib/jvm/java-1.8-openjdk \
+ CFLAGS="-I/usr/lib/jvm/java-1.8-openjdk/include/linux"
+ make
+
+ # jsvc manpage
+ db2x_xsltproc -s man man/jsvc.1.xml -o jsvc.1
+ gzip -9 jsvc.1
+}
+
+package() {
+ install -Dm644 dist/$pkgname-$pkgver.jar \
+ "$pkgdir"/usr/share/java/$pkgname-$pkgver.jar
+ ln -s $pkgname-$pkgver.jar "$pkgdir"/usr/share/java/$pkgname.jar
+}
+
+doc() {
+ default_doc
+
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname
+ cp -a "$builddir"/dist/docs/* "$subpkgdir"/usr/share/doc/$pkgname/
+ cp -a "$builddir"/src/docs/* "$subpkgdir"/usr/share/doc/$pkgname/
+ cp -a "$builddir"/src/samples "$subpkgdir"/usr/share/doc/$pkgname/
+}
+
+_jsvc() {
+ pkgdesc="Executes classfile that implements a Daemon interface."
+ url="https://commons.apache.org/proper/commons-daemon/jsvc.html"
+ depends="$pkgname libcap"
+
+ cd "$builddir/src/native/unix"
+ install -Dm755 jsvc "$subpkgdir"/usr/bin/jsvc
+}
+
+_jsvc_doc() {
+ cd "$builddir/src/native/unix"
+ install -Dm644 jsvc.1.gz "$subpkgdir"/usr/share/man/man1/jsvc.1.gz
+}
+
+sha512sums="a370085a991cd6b121fcfb49822660dfc0aac19f164677dd2e6373750c1a526ef5a10334a8e075fd965c038198f6638b9e9130b5b13256f4a23a6c5a29959701 commons-daemon-1.1.0-src.tar.gz"