[arch-commits] Commit in apache-ant/trunk (PKGBUILD)

Paul Mattal paul at archlinux.org
Tue Jun 9 20:33:05 EDT 2009


    Date: Tuesday, June 9, 2009 @ 20:33:05
  Author: paul
Revision: 42051

upgpkg: apache-ant 1.7.1-2
    switch to binary distribution for extra jars (FS#12672), removed .bat and .cmd (FS#10472)

Modified:
  apache-ant/trunk/PKGBUILD

----------+
 PKGBUILD |   50 +++++++++++++++++++++++++-------------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-06-09 23:46:36 UTC (rev 42050)
+++ PKGBUILD	2009-06-10 00:33:05 UTC (rev 42051)
@@ -4,38 +4,38 @@
 
 pkgname=apache-ant
 pkgver=1.7.1
-pkgrel=1
-pkgdesc="Ant is a java-based build tool."
-arch=(i686 x86_64)
+pkgrel=2
+pkgdesc="A java-based build tool."
+arch=('i686' 'x86_64')
 license=('APACHE')
 url="http://ant.apache.org/"
 depends=('java-runtime')
-makedepends=('java-environment')
-noextract=('junit3.8.1.zip')
-source=(http://archive.apache.org/dist/ant/source/${pkgname}-${pkgver}-src.tar.bz2
-        http://heanet.dl.sourceforge.net/sourceforge/junit/junit3.8.1.zip)
-md5sums=('0d68db4a1ada5c91bcbf53cefd0c2fd7' '5110326e4b7f7497dfa60ede4b626751')
+source=(http://archive.apache.org/dist/ant/binaries/${pkgname}-${pkgver}-bin.tar.bz2
+        ${pkgname}.sh)
+md5sums=('9330447f3763b87570dd1118c49a8efd'
+         '593ee6ebd9b8ec321534a028e686880f')
 
 build() {
-  cd ${startdir}/src || return 1
-  unzip junit3.8.1.zip || return 1
+  # install profile.d script
+  install -dm755 ${pkgdir}/etc/profile.d || return 1
+  install -m755 ${srcdir}/${pkgname}.sh ${pkgdir}/etc/profile.d/ || return 1
 
-  cd ${startdir}/src/${pkgname}-${pkgver}
-  if [ -f /etc/profile.d/java-gcj-compat.sh ]; then
-    . /etc/profile.d/java-gcj-compat.sh
-  elif [ -f /etc/profile.d/jdk.sh ]; then
-    . /etc/profile.d/jre.sh
-    . /etc/profile.d/jdk.sh
-  fi
+  # Get the ANT_HOME env var
+  source ${srcdir}/${pkgname}.sh || return 1
 
-   # we need the junit jar in the classpath to build ant
-  export CLASSPATH="${startdir}/src/junit3.8.1/junit.jar"
+  cd ${srcdir}/${pkgname}-${pkgver}
+  install -dm755 ${pkgdir}/${ANT_HOME}/{bin,lib} || return 1
 
-  # build
-  mkdir dist || return 1
-  ./build.sh -Ddist.dir=dist/ dist || return 1
+  install -m644 ./lib/*.jar ${pkgdir}/${ANT_HOME}/lib || return 1
+  cp -Rp ./etc ${pkgdir}/${ANT_HOME} || return 1
 
-  # install
-  export ANT_HOME="${startdir}/pkg/usr"
-  ./build.sh install-lite || return 1
+  # Do not copy Windows .bat/.cmd files
+  find ./bin -type f -a ! -name \*.bat -a ! -name \*.cmd \
+    -exec install -m755 {} ${pkgdir}/${ANT_HOME}/bin \; || return 1
+
+  # The license says the NOTICE file should be redistributed for derivative
+  # works, so lets supply it.
+  install -dm755 ${pkgdir}/usr/share/licenses/${pkgname} || return 1
+  install -m644 LICENSE NOTICE ${pkgdir}/usr/share/licenses/${pkgname} || return 1
 }
+



More information about the arch-commits mailing list