summaryrefslogtreecommitdiffstats
path: root/abs/extra/ant/PKGBUILD
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2019-01-28 19:34:18 (GMT)
committerBritney Fransen <brfransen@gmail.com>2019-01-28 19:34:18 (GMT)
commit75ebc36309ccccdb4d5d53d1ae6eb666589bdde9 (patch)
tree0ecbc870edf4cf1293a9afc7a344a5a7354fe3fe /abs/extra/ant/PKGBUILD
parent5290e03b241f22e1e378d92e533cd393cedd063f (diff)
downloadlinhes_pkgbuild-75ebc36309ccccdb4d5d53d1ae6eb666589bdde9.zip
linhes_pkgbuild-75ebc36309ccccdb4d5d53d1ae6eb666589bdde9.tar.gz
linhes_pkgbuild-75ebc36309ccccdb4d5d53d1ae6eb666589bdde9.tar.bz2
ant: update to 1.10.5. change to ant
Diffstat (limited to 'abs/extra/ant/PKGBUILD')
-rw-r--r--abs/extra/ant/PKGBUILD82
1 files changed, 82 insertions, 0 deletions
diff --git a/abs/extra/ant/PKGBUILD b/abs/extra/ant/PKGBUILD
new file mode 100644
index 0000000..7ed980b
--- /dev/null
+++ b/abs/extra/ant/PKGBUILD
@@ -0,0 +1,82 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
+# Contributor: Andrew Wright <andreww@photism.org>
+# Contributor: Paul Mattal <paul@archlinux.org>
+
+pkgbase=ant
+pkgname=('ant' 'ant-doc')
+pkgver=1.10.5
+pkgrel=1
+pkgdesc='Java based build tool'
+url='https://ant.apache.org/'
+arch=('any')
+license=('APACHE')
+makedepends=('bash' 'java-environment' 'junit' 'java-hamcrest')
+source=(https://www.apache.org/dist/ant/source/apache-${pkgbase}-${pkgver}-src.tar.bz2{,.asc}
+ ant.conf)
+sha256sums=('71a5cdd45a54901b6321d5a140d882f7580c38f766a4e4959bcc36555da9f3ac'
+ 'SKIP'
+ '23bbef577b56d48adb1985dbd9795e5533146646f1e8bb879dd061a4014ffcf2')
+validpgpkeys=('CE8075A251547BEE249BC151A2115AE15F6B8B72') # Stefan Bodewig
+
+_replace_lib() {
+ # explicitly call rm to ensure we replace instead of add
+ rm "$2"
+ ln -s "$1" "$2"
+}
+
+prepare() {
+ cd apache-${pkgbase}-${pkgver}
+ sed -i 's|/usr/bin/python|/usr/bin/python2|' src/script/runant.py
+}
+
+build() {
+ cd apache-${pkgbase}-${pkgver}
+ export JAVA_HOME=/usr/lib/jvm/default
+ ./bootstrap.sh
+ bootstrap/bin/ant -Ddest=optional -f fetch.xml
+ _replace_lib /usr/share/java/junit.jar lib/optional/junit-4.12.jar
+ _replace_lib /usr/share/java/hamcrest-core.jar lib/optional/hamcrest-core-1.3.jar
+ _replace_lib /usr/share/java/hamcrest-library.jar lib/optional/hamcrest-library-1.3.jar
+ bootstrap/bin/ant dist
+}
+
+package_ant() {
+ depends=('java-environment' 'bash')
+ optdepends=('junit: junit tasks'
+ 'java-hamcrest: junit tasks')
+ replaces=('apache-ant')
+ provides=('apache-ant')
+ conflicts=('apache-ant')
+ backup=('etc/ant.conf')
+
+ cd apache-${pkgbase}-${pkgver}/apache-${pkgbase}-${pkgver}
+ local _ant_home=/usr/share/ant
+
+ install -d "${pkgdir}${_ant_home}"
+ cp -Rp etc "${pkgdir}${_ant_home}"
+
+ find bin -type f -a ! -name \*.bat -a ! -name \*.cmd \
+ -exec install -Dm 755 {} -t "${pkgdir}${_ant_home}/bin" \;
+ install -d "${pkgdir}/usr/bin"
+ ln -s /usr/share/ant/bin/ant "${pkgdir}/usr/bin/ant"
+
+ install -Dm 644 "${srcdir}/ant.conf" -t "${pkgdir}/etc"
+ install -Dm 644 lib/*.jar -t "${pkgdir}/usr/share/java/ant"
+ ln -s /usr/share/java/ant "${pkgdir}${_ant_home}/lib"
+
+ install -Dm 644 ../{LICENSE,NOTICE} -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
+
+package_ant-doc() {
+ pkgdesc='Apache Ant build tool documentation'
+ replaces=('apache-ant-doc')
+ provices=('apache-ant-doc')
+ conflicts=('apache-ant-doc')
+
+ install -d "${pkgdir}/usr/share/doc/ant"
+ cp -r apache-${pkgbase}-${pkgver}/apache-${pkgbase}-${pkgver}/manual/* \
+ "${pkgdir}/usr/share/doc/ant"
+}
+
+# vim: ts=2 sw=2 et: