summaryrefslogtreecommitdiff
path: root/extra/java-commons-daemon/PKGBUILD
blob: 9d804dc5f0b3607f506507dfe9d1566ffe520ddd (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
44
45
46
47
48
# Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
pkgname=('java-commons-daemon' 'java-jsvc')
pkgbase=java-commons-daemon
pkgver=1.0.6
pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
url="http://commons.apache.org/daemon/"
license=('APACHE')
_libname=commons-daemon
source=(http://archive.apache.org/dist/commons/daemon/source/${_libname}-${pkgver}-src.tar.gz)
md5sums=('28dc2e0a3634b2dc3605e9e6444d079f')
makedepends=('apache-ant' 'docbook2x' 'docbook-xsl')


build() {
  # commons-daemon.jar
  cd "${srcdir}/${_libname}-${pkgver}-src"
  ant

  # jsvc
  cd "${srcdir}/${_libname}-${pkgver}-src/src/native/unix"
  ./configure
  make
  docbook2man man/jsvc.1.xml
}

package_java-commons-daemon() {
  pkgdesc="Alternative invocation mechanism for unix-daemon-like java code"
  depends=('java-runtime')

  cd "${srcdir}/${_libname}-${pkgver}-src"

  install -Dm755 dist/${_libname}-${pkgver}.jar \
                 ${pkgdir}/usr/share/java/${_libname}-${pkgver}.jar
  ln -s ${_libname}-${pkgver}.jar \
        ${pkgdir}/usr/share/java/${_libname}.jar
}

package_java-jsvc() {
  pkgdesc="Apache application for making Java applications run on UNIX more easily"
  depends=("java-${_libname}" 'libcap')

  cd "${srcdir}/${_libname}-${pkgver}-src/src/native/unix"

  install -Dm755 jsvc ${pkgdir}/usr/bin/jsvc
  install -Dm644 JSVC.1 ${pkgdir}/usr/share/man/man1/JSVC.1
}