1. VectorLinux Core
  2. vabs

Commits

M0E-lnx  committed 24a2b77

Apache and from binary and update to 1.9.0

  • Participants
  • Parent commits accad42
  • Branches veclinux-7.1

Comments (0)

Files changed (1)

File var/vabs/apache-ant/src/apache-ant.SlackBuild

View file
  • Ignore whitespace
 # AUTHORS = 
 
 NAME="apache-ant"            #Enter package Name!
-VERSION=${VERSION:-"1.8.2"}      #Enter package Version!
+VERSION=${VERSION:-"1.9.0"}      #Enter package Version!
 VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
-VL_PACKAGER=${VL_PACKAGER:-"--link"}   #Enter your Name!
-LINK=${LINK:-"http://www.eng.lsu.edu/mirrors/apache//ant/source/$NAME-$VERSION-src.tar.gz"}  #Enter URL for package here!
+VL_PACKAGER=${VL_PACKAGER:-"M0E-lnx"}   #Enter your Name!
+#http://www.carfab.com/apachesoftware/ant/binaries/apache-ant-1.8.1-bin.tar.bz2
+LINK=${LINK:-"http://www.eng.lsu.edu/mirrors/apache/ant/binaries/$NAME-$VERSION-bin.tar.bz2"}  #Enter URL for package here!
 
 
 #SYSTEM VARIABLES
 LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
 ADDRB=${ADDRB:-""} #Add deps that need to be added to the slack-required file here
 EXRB=${EXRB:-""} #Add deps that need to be excluded from the slack-required file here
+NUMJOBS=${NUMJOBS:-"-j6"}
 #----------------------------------------------------------------------------
 
-
+if [ "$NORUN" != 1 ] ; then
 #SETUP PACKAGING ENVIRONMENT
 #--------------------------------------------
 CWD=$(pwd)
 TMP=$RELEASEDIR/tmp
 PKG=$TMP/package-$NAME
 #--------------------------------------------
-
-
+ANT_HOME=/usr/share/$(echo $NAME | cut -d- -f1)
 
 if [ $UID != 0 ]; then
    echo "You are not authorized to run this script. Please login as root"
 #EXTRACT SOURCES
 #-----------------------------------------------------
 echo "Extracting source..."
-tar xvf $CWD/$NAME-$VERSION-src.tar.* || exit 1
+tar xvf $CWD/$(basename $LINK) || exit 1
 #this moves whatever was extracted to the std dirname we are expecting
 mv * $NAME-$VERSION &> /dev/null 2>&1
 mkdir -p $PKG
 find . -perm 555 -exec chmod 755 {} \;
 #-----------------------------------------
 
+mkdir -p $PKG/usr/share/java $PKG/$ANT_HOME $PKG/usr/bin
+cp -a bin lib etc $PKG/$ANT_HOME/
+rm -f $PKG/$ANT_HOME/lib/x*jar
+mkdir -p $PKG/etc/profile.d
 
-
-#CONFIGURE & MAKE
-#----------------------------------------------------------------------
-# If you are building a KDE-related app, then change the following
-# arguments in the script below:
-# --prefix=$(kde-config -prefix) \
-# --sysconfdir=/etc/kde \
-#
-# Making these changes will ensure that your package will build in the
-# correct path and that it will work seamlessly within the KDE environment.
-#
-#-----------------------------------------------------------------------
-
-echo "Configuring source..."
-JAVA_HOME=/opt/java
-cp $CWD/junit-4.9.jar $TMP/$NAME-$VERSION/lib/optional/JUnit.jar
-sh build.sh  -Ddist.dir=$PKG/usr/share/ant dist || exit 1
-sh build.sh install
-
-#######################################################################
-#Miscellenious tweaks and things outside a normal ./configure go here #
-#######################################################################
+cat << EOF > $PKG/etc/profile.d/${NAME}.csh
+#!/bin/csh
+setenv ANT_HOME ${ANT_HOME}
+EOF
+cat << EOF > $PKG/etc/profile.d/${NAME}.sh
+#!/bin/sh
+export ANT_HOME=${ANT_HOME}
+EOF
+chmod 0755 $PKG/etc/profile.d/*
+cd $PKG/usr/share/java
+  for jar in ../../../$ANT_HOME/lib/*.jar ; do
+    ln -s $jar
+  done
+cd -
+cd $PKG/usr/bin
+  ln -s $ANT_HOME/bin/ant
+  ln -s $ANT_HOME/bin/antRun
+  ln -s $ANT_HOME/bin/antRun.pl
+  ln -s $ANT_HOME/bin/runant.pl
+  ln -s $ANT_HOME/bin/runant.py
+cd -
 
 
 
 #--------------------------------------------------------------
 echo "Finding dependencies..."
 ADD="$ADDRB" EXCLUDE="$EXRB" requiredbuilder -v -y -s $RELEASEDIR $PKG
-echo "Creating package $NAME-$VERSION-$ARCH-$BUILD.txz"
-makepkg -l y -c n $RELEASEDIR/$NAME-$VERSION-$ARCH-$BUILD.txz
+echo "Creating package $NAME-$VERSION-noarch-$BUILD.txz"
+makepkg -l y -c n $RELEASEDIR/$NAME-$VERSION-noarch-$BUILD.txz
 
 cd $CWD
 echo "Cleaning up temp files..." && rm -rf $TMP
 echo "Package Complete"
 #--------------------------------------------------------------
-
-# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##
+fi
+# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##