summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/java-service-wrapper/PKGBUILD45
1 files changed, 45 insertions, 0 deletions
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 <skydrome@i2pmail.org>
+# Contributor: Artyom Olshevskiy <siasia@siasia>
+
+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"
+}