mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-06 12:57:13 +08:00
59 lines
1.9 KiB
Bash
59 lines
1.9 KiB
Bash
#
|
|
# Platform Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
|
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
# include global config
|
|
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
|
|
|
pkgname=apache-ant
|
|
pkgver=1.8.2
|
|
pkgrel=2
|
|
pkgdesc="A java-based build tool."
|
|
arch=('i686' 'x86_64')
|
|
license=('APACHE')
|
|
url="http://ant.apache.org/"
|
|
depends=('java-runtime')
|
|
optdepends=('junit: to jave junit on the classpath in javac tasks')
|
|
source=(http://archive.apache.org/dist/ant/binaries/${pkgname}-${pkgver}-bin.tar.bz2
|
|
${pkgname}.sh)
|
|
md5sums=('9e9ae9fc7352960191489a1286fb0928'
|
|
'593ee6ebd9b8ec321534a028e686880f')
|
|
|
|
package() {
|
|
# install profile.d script
|
|
install -dm755 "${pkgdir}"/etc/profile.d
|
|
install -m755 "${srcdir}"/${pkgname}.sh "${pkgdir}"/etc/profile.d/
|
|
|
|
# Get the ANT_HOME env var
|
|
source "${srcdir}"/${pkgname}.sh
|
|
|
|
cd "${srcdir}"/${pkgname}-${pkgver}
|
|
install -dm755 "${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 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/
|
|
|
|
# symlink the binary into PATH
|
|
mkdir -p "${pkgdir}"/usr/bin
|
|
ln -sf "${pkgdir}"/usr/share/java/apache-ant/bin/ant "${pkgdir}"/usr/bin/ant
|
|
|
|
# fix python2 path
|
|
sed -i 's|/usr/bin/python|/usr/bin/python2|' "${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 -dm755 "${pkgdir}"/usr/share/licenses/${pkgname}
|
|
install -m644 LICENSE NOTICE "${pkgdir}"/usr/share/licenses/${pkgname}
|
|
}
|
|
|