You are not logged in.
Pages: 1
https://www.archlinux.org/packages/extr … pache-ant/ is obsolete and there's no information about an alternative package. What should I use?
Offline
According to the website, it's not obsolete or anything—the Arch Linux package is simply out-of-date.
Although I generally agree that packagers have a life besides maintaining Arch Linux packages, the package is out-of-date for about half a year, so it might be worth asking the maintainer.
It would probably help if you provide him/her an adapted PKGBUILD (1.9.9 or 1.10.1) as a starting point.
Offline
The 1.10.x releases require java 8 at runtime, while 1.9.x requires java 5 .
I think switching to 1.10.x would be preferred and intend to look into it but it will be atleast a week before i have time to start this myself.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Below is a 1.10.1 PKGBUILD based on the 1.9.7 PKGBUILD from Extra repo.
It does build but hasn't been tested yet, and i feel it needs some improvements .
( more comments explaining what is done , especially in package_* functions is one of them).
# $Id$
# Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
# Contributor: Lone_Wolf <lonewolf at xs4all dot nl>
# Contributor: Andrew Wright <andreww@photism.org>
# Contributor: Paul Mattal <paul@archlinux.org>
pkgbase=apache-ant
pkgname=('apache-ant' 'apache-ant-doc')
pkgver=1.10.1
pkgrel=1
arch=('any')
url='https://ant.apache.org/'
license=('APACHE')
makedepends=('java-environment=8' 'apache-ant' 'junit')
source=(https://www.apache.org/dist/ant/source/${pkgbase}-${pkgver}-src.tar.bz2{,.asc}
apache-ant.sh
apache-ant.csh
bin_ant
ant.conf)
validpgpkeys=('CE8075A251547BEE249BC151A2115AE15F6B8B72') # Stefan Bodewig
sha256sums=('d5e3d87f0b4b42e0505b44215b4c4bbfaf6f49655c0a530136adfe4e724363b4'
'SKIP'
'182b9212610790966d3a018d3cbab2e5327dd9fd11dc15dd1f377853216f5718'
'919a3ab1acae1d0d190fe6e0034b00975caab40e55359a720bfccd098fe2d995'
'29b443ae3af7e246b4ff0b5ec9f023ae95992db1a010a362e70ca7a65a6df461'
'b86ce60f61cbd85a9faa61d698b0fc4607f1ff375cd15673aee57f053012eacb')
_ant_home=/usr/share/${pkgbase}
build() {
cd "${srcdir}/${pkgbase}-${pkgver}"
# ant needs HOME to download libs to $HOME/.m2/repository
export ANT_OPTS="-Duser.home=${srcdir}"
ant -Ddest=optional -f fetch.xml
# junit is at version 4.12 in AL, but apache-ant 1.10.1 downloads junit 4.11
# TODO decide between a and b :
# a. change libraries.properties to download 4.12
# b. silently replace 4.11 jar with 4.12 jar as we do now
rm lib/optional/junit-4.11.jar
ln -s /usr/share/java/junit.jar lib/optional/junit-4.11.jar
rm lib/optional/hamcrest-core-1.3.jar
ln -s /usr/share/java/hamcrest-core.jar lib/optional/hamcrest-core-1.3.jar
# ant 1.9.7 is not capable of compiling ant 1.10.1
# the ./build.sh creates a minimal ant version using openjdk, then uses this mini-ant to build the full ant version
export JAVA_HOME="/usr/lib/jvm/default/"
./build.sh dist
# ant dist
}
package_apache-ant() {
pkgdesc='A java-based build tool'
depends=('java-environment=8' 'sh')
optdepends=('junit: to use the junit tasks')
cd "${srcdir}/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}"
install -dm755 "${pkgdir}${_ant_home}"
install -dm755 "${pkgdir}/etc/${pkgbase}"
cp -Rp etc/* "${pkgdir}/etc/${pkgbase}"
rm "${pkgdir}/etc/${pkgbase}/ant-bootstrap.jar"
ln -s /etc/${pkgbase} "${pkgdir}${_ant_home}/etc"
install -dm755 "${pkgdir}${_ant_home}/bin"
find bin -type f -a ! -name \*.bat -a ! -name \*.cmd \
-exec install -m755 {} "${pkgdir}${_ant_home}/bin" \;
install -Dm755 "${srcdir}/bin_ant" "${pkgdir}/usr/bin/ant"
install -Dm644 "${srcdir}/ant.conf" "${pkgdir}/etc/apache-ant/ant.conf"
install -dm755 "${pkgdir}/usr/share/java/${pkgbase}"
install -m644 lib/*.jar "${pkgdir}/usr/share/java/${pkgbase}"
ln -s /usr/share/java/${pkgbase} "${pkgdir}${_ant_home}/lib"
# fix python2 path
sed -i 's|/usr/bin/python|/usr/bin/python2|' "${pkgdir}${_ant_home}/bin/runant.py"
# install profile.d script
install -dm755 "${pkgdir}/etc/profile.d"
install -m755 "${srcdir}"/apache-ant.{csh,sh} "${pkgdir}/etc/profile.d/"
# License says NOTICE file should be redistributed for derivative works
cd "${srcdir}/${pkgbase}-${pkgver}"
install -dm755 "${pkgdir}/usr/share/licenses/${pkgbase}"
install -m644 LICENSE NOTICE "${pkgdir}/usr/share/licenses/${pkgbase}"
}
package_apache-ant-doc() {
pkgdesc='Apache Ant build tool documentation'
install -dm755 "${pkgdir}/usr/share/doc/${pkgbase}"
cp -r "${srcdir}"/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}/manual/* \
"${pkgdir}/usr/share/doc/${pkgbase}/"
}Last edited by Lone_Wolf (2017-07-31 13:17:23)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Pages: 1