From d2a10d19460a35fbe7f75dc408791dbbfe7edc6d Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 4 Mar 2017 08:48:58 -0500 Subject: add java-service-wrapper to pcr --- pcr/java-service-wrapper/PKGBUILD | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pcr/java-service-wrapper/PKGBUILD (limited to 'pcr/java-service-wrapper/PKGBUILD') diff --git a/pcr/java-service-wrapper/PKGBUILD b/pcr/java-service-wrapper/PKGBUILD new file mode 100644 index 000000000..2b473b861 --- /dev/null +++ b/pcr/java-service-wrapper/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: skydrome +# Contributor: Artyom Olshevskiy + +pkgname='java-service-wrapper' +pkgver=3.5.30 +pkgrel=1 +pkgdesc="Enables a Java Application to be run as a Windows Service or Unix Daemon" +url="https://wrapper.tanukisoftware.com/doc/english/introduction.html" +arch=('i686' 'x86_64' 'armv6h' 'armv7h') +license=('GPL2') +conflicts=('java-service-wrapper-bin') +makedepends=('apache-ant' 'java-environment>=7') +source=("https://wrapper.tanukisoftware.com/download/${pkgver}/wrapper_${pkgver}_src.tar.gz") +sha256sums=('4981e3a930927224a5507b2f597702b14a08e46ee55e2dcfe2369c94571d1ead') + +prepare() { + sed -i "${srcdir}/wrapper_${pkgver}_src/build.xml" \ + -e "s:value=\"1.4\":value=\"1.7\":" + + # Prevent building the testsuite on the x64, this requires the cunit pkg + # from the AUR, its a pain and useless to keep it a build-dep + sed -i "${srcdir}/wrapper_${pkgver}_src/src/c/Makefile-linux-x86"*.make \ + -e "s|all: .*|all: init wrapper libwrapper.so|" +} + +build() { + cd "${srcdir}/wrapper_${pkgver}_src" + source /etc/profile.d/apache-ant.sh + source /etc/profile.d/jre.sh + export JAVA_HOME="${JAVA_HOME:-/usr/lib/jvm/default}" + + [[ "$CARCH" = "x86_64" ]] && _bits=64 || _bits=32 + [[ "$CARCH" = arm* ]] && _arch=armhf || _arch=x86 + + ant -Dbits=${_bits} -Ddist.arch=${_arch} jar compile-c-unix +} + +package() { + cd "${srcdir}/wrapper_${pkgver}_src" + install -Dm755 bin/wrapper "${pkgdir}/usr/bin/java-service-wrapper" + install -Dm644 lib/libwrapper.so "${pkgdir}/usr/lib/java-service-wrapper/libwrapper.so" + install -Dm644 lib/wrapper.jar "${pkgdir}/usr/share/java/wrapper-${pkgver}.jar" + install -Dm644 doc/wrapper-community-license*.txt "${pkgdir}/usr/share/licenses/java-service-wrapper/LICENSE" + ln -s /usr/share/java/wrapper-${pkgver}.jar "${pkgdir}/usr/share/java/wrapper.jar" +} -- cgit v1.2.3