diff options
author | TBK <tbk@jjtc.eu> | 2020-03-31 17:55:50 +0200 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-03-31 16:09:12 +0000 |
commit | 96b9bd252cb279ac2ac0252b45d4f098be22b4f0 (patch) | |
tree | 9693b365916d73fcfd5faf24be2cdfae9ffbd0fb /community/commons-daemon | |
parent | 75cb589bb61fd8858998bb1d324b73e2279f29af (diff) | |
download | aports-96b9bd252cb279ac2ac0252b45d4f098be22b4f0.tar.bz2 aports-96b9bd252cb279ac2ac0252b45d4f098be22b4f0.tar.xz |
community/commons-daemon: move from testing
Diffstat (limited to 'community/commons-daemon')
-rw-r--r-- | community/commons-daemon/APKBUILD | 67 | ||||
-rw-r--r-- | community/commons-daemon/rat_workaround.patch | 14 |
2 files changed, 81 insertions, 0 deletions
diff --git a/community/commons-daemon/APKBUILD b/community/commons-daemon/APKBUILD new file mode 100644 index 0000000000..2f116f3593 --- /dev/null +++ b/community/commons-daemon/APKBUILD @@ -0,0 +1,67 @@ +# Contributor: TBK <alpine@jjtc.eu> +# Maintainer: TBK <alpine@jjtc.eu> +pkgname=commons-daemon +pkgver=1.2.2 +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" # No test suite +depends="openjdk8-jre-base" +makedepends="docbook2x libcap-dev linux-headers maven openjdk8" # update --with-java when bumping openjdk +subpackages="$pkgname-doc jsvc:_jsvc jsvc-doc:_jsvc_doc" +source="https://mirrors.dotsrc.org/apache/commons/daemon/source/commons-daemon-$pkgver-src.tar.gz + rat_workaround.patch + " +builddir="$srcdir/$pkgname-$pkgver-src" + +build() { + # commons-daemon.jar + mvn install -DskipTests=true -Dmaven.javadoc.skip=false -B + + # jsvc + cd "$builddir/src/native/unix" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --with-java=/usr/lib/jvm/java-1.8-openjdk \ + CFLAGS="$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 target/$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"/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="aea5e25f1152be2f8855e98191d243daff97e02eb0dcb72a0ca681c2ec42f42dda038af3496e2fc9623d6d9982d63e4403149ee231745f42605a7a575ebc8cc3 commons-daemon-1.2.2-src.tar.gz +1ede66e199e82bb788280159be238fba5d1e405c6f01b8123486397f5cc010b48df023c6a799a53de3e09c128a69842c4c2ff5adf735f0ae253ccec4eac28a5d rat_workaround.patch" diff --git a/community/commons-daemon/rat_workaround.patch b/community/commons-daemon/rat_workaround.patch new file mode 100644 index 0000000000..512a91085f --- /dev/null +++ b/community/commons-daemon/rat_workaround.patch @@ -0,0 +1,14 @@ +Apache RAT (license audit...) complains for some reason about location.o, + causing maven to fail. This patch is a "dirty" workaround. + +--- a/pom.xml ++++ b/pom.xml +@@ -136,6 +136,8 @@ + <exclude>src/native/unix/config.nice</exclude> + <exclude>src/native/unix/config.status</exclude> + <exclude>src/native/unix/config.log</exclude> ++ <!-- Workaround for location.o --> ++ <exclude>src/native/unix/native/location.o</exclude> + </excludes> + </configuration> + </plugin> |