blob: 4808d2a990f7167eb1b2cce702927c34e5455a2d (
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
|
#!/bin/sh
NAME="apache-ant"
DESC="A java-based build tool"
MAKEDEPS="adoptopenjdk11"
PKG_VER=1.10.12
SOURCE="https://downloads.apache.org/ant/binaries/apache-ant-$PKG_VER-bin.tar.xz"
anthome="/usr/share/java/apache-ant"
build() {
cat > apache-ant.sh <<-EOF
ANT_HOME="$anthome"
export ANT_HOME
EOF
}
package() {
local destdir="$PKG_DEST/$anthome"
install -dm755 "$destdir"/bin
rm bin/*.bat bin/*.cmd
install -m755 bin/* "$destdir"/bin
install -dm755 "$PKG_DEST"/usr/bin
ln -sf $anthome/bin/ant "$PKG_DEST"/usr/bin/ant
cp -r etc "$destdir"/
install -dm755 "$destdir"/lib
install -m644 lib/*.jar "$destdir"/lib
ln -sf ../../junit.jar "$destdir"/lib/junit.jar
local file; for file in LICENSE NOTICE; do
install -m644 -D $file "$PKG_DEST"/usr/share/licenses/apache-ant/$file
done
install -m644 -D apache-ant.sh "$PKG_DEST"/etc/profile.d/apache-ant.sh
}
|