#Packager: Raphael Groner ## Port of original build script from Zenwalk ## author : Pedro Pinto (pnboy~AT~pinguix.com) ## latest update : 18-07-2007 ## Patched to work with Salix ## Author: Raphael Groner ## Last change: 2010-01-04 ## ## Changelog: ## 2010-01-01 Changed build options to fit Salix' packaging rules ## Upgraded to ant version 1.7.1 ## Removed some missing DOC links due to errors ## 2010-01-01 Set arch=noarch and add PKGTYPE=txz ## Replaced dependency j2sdk|jdk with jre|jdk (j2sdk n/a) ## Use of explicit /usr/sbin/makepkg (for fakeroot) ## 2010-01-04 Move doc/* to /usr/doc ## 2010-01-21 Switched to SLKBUILD ## noautodotnew pkgname=apache-ant pkgver=1.7.1 pkgrel=1rg arch=noarch source=(http://www.eu.apache.org/dist/ant/binaries/$pkgname-$pkgver-bin.tar.bz2) sourcetemplate=http://people.salixos.org/damnagehack/$pkgname url=http://ant.apache.org options=('noextract' 'noautodotnew') docs=(docs INSTALL KEYS LICENSE NOTICE README WHATSNEW) slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "$pkgname (A Java based build tool)" "In theory, it is kind of like make, without make's wrinkles." "Needs a working JavaSDK environment (JAVA_HOME set correctly)," "and to rejoin the system or to manually set ANT_HOME to " "/usr/share/$pkgname in order to run ant." ) build() { PKG=$startdir/pkg # Relocate mkdir -p $PKG/usr/share cd $PKG/usr/share tar xjf $startdir/src/$pkgname-$pkgver-bin.tar.bz2 ln -s $pkgname-$pkgver $pkgname mkdir -p $PKG/usr/bin cd $PKG/usr/bin ln -s ../share/$pkgname/bin/ant mkdir -p $PKG/etc/profile.d echo "#!/bin/sh export ANT_HOME=/usr/share/$pkgname" > $PKG/etc/profile.d/ant.sh echo "#!/bin/csh setenv ANT_HOME /usr/share/$pkgname " > $PKG/etc/profile.d/ant.csh chmod +x $PKG/etc/profile.d/ant.* mv $PKG/usr/share/$pkgname/etc $PKG/etc/ant # Compress the man page(s) if [ -d $PKG/usr/man ]; then find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; fi if [ -d $PKG/usr/info ]; then find $PKG/usr/info -type f -name "*.info*" -exec gzip -9f {} \; fi # Add a documentation directory: mkdir -p $PKG/usr/doc/$pkgname-$pkgver # The Makefile evidently contains the package's license... # cd # DOCS="docs INSTALL KEYS LICENSE NOTICE README WHATSNEW" # for i in ${DOCS[@]}; do # mv $i $PKG/usr/doc/$pkgname-$pkgver/$i # ln -s ../../doc/$pkgname-$pkgver/$i # done mv $PKG/usr/share/$pkgname-$pkgver/docs $PKG/usr/doc/$pkgname-$pkgver }