blob: eaafed49e3a1a0da7b8fc7fa8c3973a227788251 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# $Id$
# Contributor: Andrew Wright <andreww@photism.org>
# Maintainer: Paul Mattal <paul@archlinux.org>
pkgname=apache-ant
pkgver=1.8.2
pkgrel=2
pkgdesc="A java-based build tool"
arch=('any')
license=('APACHE')
url="http://ant.apache.org/"
depends=('java-environment')
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 ${pkgname}.csh
ant_diagnostics.patch)
md5sums=('9e9ae9fc7352960191489a1286fb0928'
'593ee6ebd9b8ec321534a028e686880f'
'475b684eb8202c09cbb51496cd8ee1e0'
'cbaab423be40a6e63f0fde901b91eb50')
package() {
# install profile.d script
install -dm755 "${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 -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
# matches behavior on ubuntu 9 and makes sense for compatibility
# http://bugs.archlinux.org/task/15229
ln -sf /usr/share/java/junit.jar "${pkgdir}"/usr/share/java/apache-ant/lib/
# 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}
}
|