desktop/apache-ant/PKGBUILD
2017-02-23 16:23:30 +01:00

60 lines
1.9 KiB
Bash

#
# Platform Packages for Chakra, part of chakra-project.org
#
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
pkgname=apache-ant
pkgver=1.9.3
pkgrel=1
pkgdesc="A java-based build tool."
arch=('x86_64')
license=('APACHE')
url="http://ant.apache.org/"
depends=('java-runtime')
optdepends=('junit: to have junit on the classpath in javac tasks')
source=("http://archive.apache.org/dist/ant/binaries/${pkgname}-${pkgver}-bin.tar.bz2"
"${pkgname}.sh"
"${pkgname}.csh")
md5sums=('6e6d888140858f3926c34081c4bd2227'
'593ee6ebd9b8ec321534a028e686880f'
'475b684eb8202c09cbb51496cd8ee1e0')
package() {
# install profile.d scripts
install -d -m755 "${pkgdir}/etc/profile.d"
install -m755 "${srcdir}/${pkgname}".{csh,sh} "${pkgdir}/etc/profile.d"
# Get the ANT_HOME env var
source "${srcdir}/${pkgname}.sh"
cd "${srcdir}/${pkgname}-${pkgver}"
install -d -m755 "${pkgdir}/${ANT_HOME}"/{bin,lib}
install -m644 ./lib/*.jar "${pkgdir}/${ANT_HOME}/lib"
cp -Rp ./etc "${pkgdir}/${ANT_HOME}"
# Do not copy Windows .bat/.cmd files
find ./bin -type f -a ! -name \*.bat -a ! -name \*.cmd \
-exec install -m755 \{\} "${pkgdir}/${ANT_HOME}/bin" \;
# symlink the "ant" executable to /usr/bin as well
install -d -m755 "${pkgdir}/usr/bin"
ln -s "${ANT_HOME}/bin/ant" "${pkgdir}/usr/bin/ant"
# symlink to junit so it's on the javac build path for ant
ln -sf /usr/share/java/junit.jar "${pkgdir}/usr/share/java/apache-ant/lib"
# fix python2 path
sed -e 's|/usr/bin/python|/usr/bin/python2|' \
-i "${pkgdir}/usr/share/java/apache-ant/bin/runant.py"
# The license says the NOTICE file should be redistributed for derivative
# works, so lets supply it.
cd "${srcdir}/${pkgname}-${pkgver}"
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 LICENSE NOTICE "${pkgdir}/usr/share/licenses/${pkgname}"
}
# vim:set ts=2 sw=2 et: