|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2009 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2009,2010 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -27,17 +27,14 @@
|
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-apache-ant} |
|
|
|
|
VERSION=${VERSION:-1.7.1} |
|
|
|
|
VERSION=${VERSION:-1.8.1} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION-bin.tar.gz} |
|
|
|
|
WGET=${WGET:-ftp://mir1.ovh.net/ftp.apache.org/dist/ant/binaries/$ARCHIVE} |
|
|
|
|
CONTRIB_ARCHIVE=ant-contrib-0.6-bin.tar.gz |
|
|
|
|
CONTRIB_WGET=http://surfnet.dl.sourceforge.net/project/ant-contrib/ant-contrib/ant-contrib-0.6/$CONTRIB_ARCHIVE |
|
|
|
|
|
|
|
|
|
# Built package infos |
|
|
|
|
NAMETGZ=${NAMETGZ:-apache-ant} |
|
|
|
|
BUILD=${BUILD:-3GGD} |
|
|
|
|
BUILD=${BUILD:-1GGD} |
|
|
|
|
ARCH=${ARCH:-noarch} |
|
|
|
|
TARGET=${TARGET:-i486} |
|
|
|
|
EXT=${EXT:-txz} |
|
|
|
|
|
|
|
|
|
# Directories |
|
|
|
@ -63,11 +60,7 @@ if [ ! -r $ARCHIVE ]; then
|
|
|
|
|
wget -c -O $ARCHIVE.part "$WGET" |
|
|
|
|
mv $ARCHIVE.part $ARCHIVE |
|
|
|
|
fi |
|
|
|
|
if [ ! -r $CONTRIB_ARCHIVE ]; then |
|
|
|
|
wget -c -O $CONTRIB_ARCHIVE.part "$CONTRIB_WGET" |
|
|
|
|
mv $CONTRIB_ARCHIVE.part $CONTRIB_ARCHIVE |
|
|
|
|
fi |
|
|
|
|
sha1sum -c sha1sums |
|
|
|
|
sha1sum -c $ARCHIVE.sha1 |
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
|
|
|
|
|
|
|
# Prepare the package tree |
|
|
|
@ -81,11 +74,9 @@ mkdir -p $PKG/usr/lib/apache-ant
|
|
|
|
|
( |
|
|
|
|
cd lib |
|
|
|
|
for jar in ant*.jar; do |
|
|
|
|
install -m 644 $jar $PKG/usr/lib/apache-ant/${jar%.jar}-$VERSION.jar |
|
|
|
|
install -m 644 $jar $PKG/usr/lib/apache-ant/$jar |
|
|
|
|
done |
|
|
|
|
) |
|
|
|
|
tar xf $CWD/$CONTRIB_ARCHIVE -O lib/ant-contrib-0.6.jar \ |
|
|
|
|
> $PKG/usr/lib/apache-ant/ant-contrib-0.6.jar |
|
|
|
|
|
|
|
|
|
# Install the launch script |
|
|
|
|
install -D -m 755 $CWD/ant.sh $PKG/usr/bin/ant |
|
|
|
|