1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
3 # Contributor: Andrew Wright <andreww@photism.org>
4 # Contributor: Paul Mattal <paul@archlinux.org>
7 pkgname=('ant' 'ant-doc')
10 pkgdesc='Java based build tool'
11 url='https://ant.apache.org/'
14 makedepends=('bash' 'coreutils' 'which' 'java-environment' 'junit' 'java-hamcrest')
15 source=(https://www.apache.org/dist/ant/source/apache-${pkgbase}-${pkgver}-src.tar.bz2{,.asc}
17 sha256sums=('044e2c0a66c90112d67789d267f049ae947fde384e29b1f8c14ada9bead0fe44'
19 '23bbef577b56d48adb1985dbd9795e5533146646f1e8bb879dd061a4014ffcf2')
20 # https://downloads.apache.org/ant/KEYS
22 'CE8075A251547BEE249BC151A2115AE15F6B8B72' # Stefan Bodewig
23 '8DA70C00DF7AF1B0D2F9DC74DDBCC1270A29D081' # jaikiran@apache <jaikiran@apache.org>
24 'CE8075A251547BEE249BC151A2115AE15F6B8B72' # Stefan Bodewig <bodewig@apache.org>
25 '8DA70C00DF7AF1B0D2F9DC74DDBCC1270A29D081' # jaikiran@apache <jaikiran@apache.org>
29 # explicitly call rm to ensure we replace instead of add
35 cd apache-${pkgbase}-${pkgver}
36 sed -i 's|/usr/bin/python|/usr/bin/python2|' src/script/runant.py
40 cd apache-${pkgbase}-${pkgver}
41 export JAVA_HOME=/usr/lib/jvm/default
43 bootstrap/bin/ant -Ddest=optional -f fetch.xml
44 _replace_lib /usr/share/java/junit.jar lib/optional/junit-4.12.jar
45 _replace_lib /usr/share/java/hamcrest-core.jar lib/optional/hamcrest-core-1.3.jar
46 _replace_lib /usr/share/java/hamcrest-library.jar lib/optional/hamcrest-library-1.3.jar
47 bootstrap/bin/ant dist
51 depends=('java-environment' 'bash' 'coreutils' 'which')
52 optdepends=('junit: junit tasks'
53 'java-hamcrest: junit tasks')
54 replaces=('apache-ant')
55 provides=('apache-ant')
56 conflicts=('apache-ant')
57 backup=('etc/ant.conf')
59 cd apache-${pkgbase}-${pkgver}/apache-${pkgbase}-${pkgver}
60 local _ant_home=/usr/share/ant
62 install -d "${pkgdir}${_ant_home}"
63 cp -Rp etc "${pkgdir}${_ant_home}"
65 find bin -type f -a ! -name \*.bat -a ! -name \*.cmd \
66 -exec install -Dm 755 {} -t "${pkgdir}${_ant_home}/bin" \;
67 install -d "${pkgdir}/usr/bin"
68 ln -s /usr/share/ant/bin/ant "${pkgdir}/usr/bin/ant"
70 install -Dm 644 "${srcdir}/ant.conf" -t "${pkgdir}/etc"
71 install -Dm 644 lib/*.jar -t "${pkgdir}/usr/share/java/ant"
72 ln -s /usr/share/java/ant "${pkgdir}${_ant_home}/lib"
74 install -Dm 644 ../{LICENSE,NOTICE} -t "${pkgdir}/usr/share/licenses/${pkgname}"
78 pkgdesc='Apache Ant build tool documentation'
79 replaces=('apache-ant-doc')
80 provices=('apache-ant-doc')
81 conflicts=('apache-ant-doc')
83 install -d "${pkgdir}/usr/share/doc/ant"
84 cp -r apache-${pkgbase}-${pkgver}/apache-${pkgbase}-${pkgver}/manual/* \
85 "${pkgdir}/usr/share/doc/ant"