summaryrefslogtreecommitdiff
path: root/libre/apache-ant
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-12-10 07:54:24 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-12-10 07:54:24 -0500
commit47dea6fb6bc00d10b55b1582bd1a76ce82360822 (patch)
tree06c441bf31c2cb70210b1034c59f33ef87aa392b /libre/apache-ant
parent869214a9697d6abdc30928e62b43e04720a085c4 (diff)
apache-ant-1.9.6-1.parabola2: rebuild
Diffstat (limited to 'libre/apache-ant')
-rw-r--r--libre/apache-ant/PKGBUILD176
-rw-r--r--libre/apache-ant/ant.conf4
-rw-r--r--libre/apache-ant/apache-ant-build.patch11
-rw-r--r--libre/apache-ant/apache-ant.csh3
-rw-r--r--libre/apache-ant/apache-ant.install11
-rw-r--r--libre/apache-ant/apache-ant.sh3
-rw-r--r--libre/apache-ant/bin_ant6
7 files changed, 121 insertions, 93 deletions
diff --git a/libre/apache-ant/PKGBUILD b/libre/apache-ant/PKGBUILD
index af9dde496..8f95874db 100644
--- a/libre/apache-ant/PKGBUILD
+++ b/libre/apache-ant/PKGBUILD
@@ -5,67 +5,45 @@
pkgname=apache-ant
pkgver=1.9.6
-pkgdesc="A Java-based build tool"
-license=('Apache' 'custom:BSD3')
-url="http://ant.apache.org/"
-
-# Arch splits it into pkgname=('apache-ant' 'apache-ant-doc')
-provides=("$pkgname-doc=$pkgver")
-replaces=("$pkgname-libre" "$pkgname-doc")
-conflicts=("$pkgname-libre" "$pkgname-doc")
-
-pkgrel=1.parabola1
+pkgdesc='A java-based build tool'
+pkgrel=1.parabola2
arch=('any')
+url='http://ant.apache.org/'
+license=('APACHE' 'custom:BSD3')
depends=('java-environment')
makedepends=('jh')
-
-_mirror=http://archive.apache.org/dist
-source=($_mirror/ant/source/${pkgname}-${pkgver}-src.tar.bz2{,.asc}
- ${pkgname}.sh ${pkgname}.csh)
-sha512sums=('cfd4fd5da725bb32d85c84f62835ce9511107da89c14487466d58df82d1f2b9ce6e363d3d02b10846c8463cae3287cb787f96f9103121b2e0e045b6027634ff0'
- 'SKIP'
- 'b5bd49bc99161e86f7198181aff7c47c8045e8cac7b7c1e2531dc49b71f1659ae35f90d33b01076b6bf665aa99f951c47ba09a0408b0aca43184f68ebd201768'
- 'c8c4be2928af648e064d4dff9efb71e250d0fb4baa318932a88de04c9c2d328b8b1af0321e732d2f302d25893e1a627da5c72264b8bd6bd50e662ca10e3f50bf')
-# Run this to get the validpgpkeys:
-# curl -s https://www.apache.org/dist/ant/KEYS | gpg --with-colons --with-fingerprint - | grep ^fpr: | cut -d: -f10
-validpgpkeys=(5B1E231C400B113C061C26508104644F51898504
- 47309207D818FFD8DCD3F83F1931D684307A10A5
- 5F35E131F832ED23F761578BEFA3E779EDF62C35
- CE8075A251547BEE249BC151A2115AE15F6B8B72
- B36135CBA375AA1ADE562A1C6E947594C152431A
- F54C925C2454F21D86692540A0BFF93DAA0077B0
- 07C69F931EE82E694E73B54203F68CBDDE8884A0
- 9C60C6B3A5A9DF8FEDD299D65BE0BA8CB80602AE
- 14604968898CEB74A5329360AEB01A153B7C75B1
- 5CDF153E81AB0522A1E5BFBE483C23C67BF8BE8E
- 7B8E57E91F116BECF9ACE6AF37A0E062971731FB
- F19E751B68B907C4F2E6B7B18D6D0AD09711DBFC
- 06A228AAB83A18A8DF7B84B08614D6AB265B4C63
- 61B656E44615E2AEF78E8DCF0E69F809710038F5
- 0BADE59B0EC24E68C03CA4815EFAD9FE82A7FBCD)
+install=apache-ant.install
+source=(https://www.apache.org/dist/ant/source/${pkgname}-${pkgver}-src.tar.bz2
+ apache-ant.sh
+ apache-ant.csh
+ apache-ant.install
+ bin_ant
+ ant.conf
+ apache-ant-build.patch)
+sha256sums=('2ad98dd3a4805452e546e0f5b682360370ae11692a2157fff8ec6d177c957123'
+ '182b9212610790966d3a018d3cbab2e5327dd9fd11dc15dd1f377853216f5718'
+ '919a3ab1acae1d0d190fe6e0034b00975caab40e55359a720bfccd098fe2d995'
+ '3de451d0f963ba96e83f4e068a8325e3d4fc42b1e5c4818e9d7962ed4f5393b3'
+ '29b443ae3af7e246b4ff0b5ec9f023ae95992db1a010a362e70ca7a65a6df461'
+ 'b86ce60f61cbd85a9faa61d698b0fc4607f1ff375cd15673aee57f053012eacb'
+ '3294d6714b276f446517f699d2a26e01ae1738c0adccf9a454ea58454f513687')
# This list is adapted from https://ant.apache.org/manual/install.html#librarydependencies
# The format is:
# jarname:description:pkgname:jarpath
_library_dependencies=(
- #jakarta-regexp-1.3.jar:Disregard
jakarta-oro-2.0.8.jar:'<ftp task>':jakarta-oro:/usr/share/java/jakarta-oro.jar
junit.jar:'<junit> task':junit:/usr/share/java/junit.jar
xalan.jar:'<junitreport> task':xalan-java:/usr/share/java/xalan.jar
antlr.jar:'<antlr> task':java-antlr2:/usr/share/java/antlr2.jar
bsf.jar:'<script> task':java-commons-bsf2:/usr/share/java/bsf2.jar
groovy-all.jar:'Groovy with <script> and <scriptdef> tasks':groovy:/usr/share/groovy/embeddable/groovy-all.jar
- #netrexx.jar:'<netrexx> task, Rexx with <script> task':???????:???????
js.jar:'Javascript with <script> task':java-rhino:/usr/share/java/js.jar
jython.jar:'Python with <script> task':jython:/opt/jython/jython.jar
- #jpython.jar:Disregard
- #jacl.jar:'TCL with <script> task':???????:???????
- #tcljava.jar:'TCL with <script> task':???????:???????
- beanshell.jar:'BeanShell with <script> task':'beanshell>=1.3':/usr/share/java/bsh.jar
+ beanshell.jar:'BeanShell with <script> task':'beanshell2':/usr/share/java/bsh.jar
jruby.jar:'Ruby with <script> task':jruby:/opt/jruby/lib/jruby.jar
- #judo.jar:'Judoscript with <script> task':???????:??????
- commons-logging.jar:'CommonsLoggingListener':java-commons-logging:/usr/share/java/commons-logging/commons-logging.jar
- #log4j.jar:'Log4jListener':???????:???????
+ commons-logging.jar:'CommonsLoggingListener':java-commons-logging:/usr/share/java/commons-logging.jar
+ log4j.jar:'Log4jListener':'log4j-1.2':'/usr/share/java/log4j-1.2.jar'
commons-net.jar:'<ftp>, <rexec> and <telnet> tasks':'java-commons-net1>=1.4.0':/usr/share/java/commons-net.jar
bcel.jar:"'classfileset' data type, JavaClassHelper for ClassConstants filter reader":java-bcel:/usr/share/java/bcel.jar
mail.jar:'<mimemail> task, mime encoding with <mail>':java-gnumail:/usr/share/java/gnumail.jar
@@ -73,7 +51,6 @@ _library_dependencies=(
jdepend.jar:'<jdepend> task':java-jdepend:/usr/share/java/jdepend.jar
resolver.jar:"external files for 'xmlcatalog' datatype":java-resolver:/usr/share/java/resolver.jar
jsch.jar:'<sshexec> and <scp> tasks':'java-jsch>=0.1.42':/usr/share/java/jsch.jar
- #jai.jar:'<image> task':???????:???????
)
for _dep in "${_library_dependencies[@]}"; do
@@ -83,76 +60,97 @@ for _dep in "${_library_dependencies[@]}"; do
done
unset _dep _jarname _desc _pkgname _jarpath
-build() {
- # This directory is what becomes
- # http://archive.apache.org/dist/ant/binaries/${pkgname}-${pkgver}-bin.tar.bz2
- # which is what Arch uses
- rm -rf "${srcdir}"/${pkgname}-${pkgver}-bin
- mkdir -p "${srcdir}"/${pkgname}-${pkgver}-bin
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ rm -rv lib/optional/*.jar
+ rm -rv src/etc/testcases/taskdefs/conditions/jars/*.jar
+
+ patch -Np1 -i ../apache-ant-build.patch
- cd "${srcdir}"/${pkgname}-${pkgver}
# Symlink to external optional libraries/
local _dep _jarname _desc _pkgname _jarpath
for _dep in "${_library_dependencies[@]}"; do
IFS=: read _jarname _desc _pkgname _jarpath <<<"$_dep"
ln -sfv "${_jarpath}" lib/optional/${_jarname}
done
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
# Build
export JAVA_HOME=/usr/lib/jvm/default
- sh build.sh -Ddist.dir="${srcdir}"/${pkgname}-${pkgver}-bin dist
+ sh build.sh dist
}
package() {
- cd "${srcdir}"/${pkgname}-${pkgver}-bin
+ cd "${srcdir}/${pkgname}-${pkgver}/${pkgbase}-${pkgver}"
source "${srcdir}"/${pkgname}.sh # Get the ANT_HOME env var
- source "/etc/profile.d/jre.sh" # Get the JAVA_HOME env var
-
- ## Install profile.d script
- install -d "${pkgdir}"/etc/profile.d
- install -m755 "${srcdir}"/${pkgname}.{csh,sh} "${pkgdir}"/etc/profile.d/
## Install the main distribution
- install -d "${pkgdir}"/${ANT_HOME}
- cp -Rp * "${pkgdir}"/${ANT_HOME}
+ install -d "${pkgdir}/${ANT_HOME}"
+
+ install -d "${pkgdir}/etc/${pkgname}"
+ cp -Rp etc/* "${pkgdir}/etc/${pkgname}"
+ rm "${pkgdir}/etc/${pkgname}/ant-bootstrap.jar"
+ ln -s /etc/${pkgname} "${pkgdir}${ANT_HOME}/etc"
+
+ install -d "${pkgdir}${ANT_HOME}/bin"
+ find bin -type f -a ! -name \*.bat -a ! -name \*.cmd \
+ -exec install -m755 {} "${pkgdir}${ANT_HOME}/bin" \;
+
+ install -Dm755 "${srcdir}/bin_ant" "${pkgdir}/usr/bin/ant"
+ install -Dm644 "${srcdir}/ant.conf" "${pkgdir}/etc/apache-ant/ant.conf"
- ## Fix the distribution
- # Remove Windows .bat/.cmd files
- rm -f "${pkgdir}"/${ANT_HOME}/bin/*.{bat,cmd}
# Fix python2 path
- sed -i 's|/usr/bin/python|/usr/bin/python2|' "${pkgdir}"/${ANT_HOME}/bin/runant.py
+ sed -i 's|/usr/bin/python|/usr/bin/python2|' "${pkgdir}/${ANT_HOME}/bin/runant.py"
+
+ ## Install profile.d script
+ install -d "${pkgdir}/etc/profile.d"
+ install -m755 "${srcdir}"/apache-ant.{csh,sh} "${pkgdir}/etc/profile.d/"
+
# Symlink to external optional libraries
+ install -d "${pkgdir}/usr/share/apache-ant/lib"
local _dep _jarname _desc _pkgname _jarpath
for _dep in "${_library_dependencies[@]}"; do
IFS=: read _jarname _desc _pkgname _jarpath <<<"$_dep"
ln -svfr "${pkgdir}/${_jarpath}" "${pkgdir}${ANT_HOME}/lib/${_jarname}"
done
- ## Symlink the /opt distribution to the normal places
-
- cd "${pkgdir}"/${ANT_HOME}/lib
- local pom a
- for pom in *.pom; do
- a=${pom%.pom}
- base=$(jh mvn-basename org.apache.ant $a $pkgver)
- install -d "${pkgdir}/${base%/*}"
- ln -sfvr "${pkgdir}/${ANT_HOME}/lib/$a.pom" "${pkgdir}/${base}.pom"
- if [[ -e "${pkgdir}/${ANT_HOME}/lib/$a.jar" ]]; then
- ln -sfvr "${pkgdir}/${ANT_HOME}/lib/$a.jar" "${pkgdir}/${base}.jar"
+ ## Install Maven artifacts, except 'ant-jai' and 'ant-netrexx'
+ cd lib
+ rm {ant-jai,ant-netrexx}.{jar,pom}
+ install -d "${pkgdir}/usr/share/java/${pkgname}"
+
+ export DESTDIR=${pkgdir}
+ for artifact in $(printf '%s\n' *.pom|sed 's/\.pom$//'); do
+ if [[ -f "${artifact}.jar" ]]; then
+ # This artifact has a jar file
+ jh mvn-install "org.apache.ant" ${artifact} ${pkgver} \
+ "${artifact}.pom" \
+ "${artifact}.jar" \
+ "${artifact}.jar"
+
+ # Symlink them to /usr/share/java
+ ln -s "/usr/share/java/${artifact}.jar" \
+ "${pkgdir}/usr/share/java/${artifact}-${pkgver}.jar"
+ ln -s "/usr/share/java/${artifact}.jar" \
+ "${pkgdir}/usr/share/java/apache-ant/${artifact}.jar"
+ ln -s "/usr/share/java/${artifact}.jar" \
+ "${pkgdir}/usr/share/apache-ant/lib/${artifact}.jar"
+ else
+ # This artifact is just a pom
+ jh mvn-install "org.apache.ant" ${artifact} ${pkgver} \
+ "${artifact}.pom"
fi
done
- cd "${pkgdir}"/${ANT_HOME}/bin
- install -d "${pkgdir}"/usr/bin
- local prog
- for prog in *; do
- ln -sfvr "${pkgdir}/${ANT_HOME}/bin/$prog" "${pkgdir}/usr/bin/$prog"
- done
install -d "${pkgdir}"/usr/share/{doc,licenses}/${pkgname}
- ln -sfvrT "${pkgdir}/${ANT_HOME}/README" "${pkgdir}/usr/share/doc/${pkgname}/README"
- ln -sfvrT "${pkgdir}/${ANT_HOME}/WHATSNEW" "${pkgdir}/usr/share/doc/${pkgname}/WHATSNEW"
- ln -sfvrT "${pkgdir}/${ANT_HOME}/manual" "${pkgdir}/usr/share/doc/${pkgname}/html"
- ln -sfvrT "${pkgdir}/${ANT_HOME}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- ln -sfvrT "${pkgdir}/${ANT_HOME}/NOTICE" "${pkgdir}/usr/share/licenses/${pkgname}/NOTICE"
- mv -T "${pkgdir}/${ANT_HOME}/etc" "${pkgdir}/etc/${pkgname}"
- ln -sfvrT "${pkgdir}/etc/${pkgname}" "${pkgdir}/${ANT_HOME}/etc"
+
+ # Install documentation
+ cp "../README" "../WHATSNEW" "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r "../manual" "${pkgdir}/usr/share/doc/${pkgname}/html"
+
+ # Install license
+ install -Dm644 "../LICENSE" "../NOTICE" "${pkgdir}/usr/share/licenses/${pkgname}"
}
diff --git a/libre/apache-ant/ant.conf b/libre/apache-ant/ant.conf
new file mode 100644
index 000000000..10db6db73
--- /dev/null
+++ b/libre/apache-ant/ant.conf
@@ -0,0 +1,4 @@
+# Apache Ant start script configuration file
+
+# Optional jars and their dependencies
+OPT_JAR_LIST=/usr/share/java/junit.jar
diff --git a/libre/apache-ant/apache-ant-build.patch b/libre/apache-ant/apache-ant-build.patch
new file mode 100644
index 000000000..dc1d4b455
--- /dev/null
+++ b/libre/apache-ant/apache-ant-build.patch
@@ -0,0 +1,11 @@
+--- apache-ant-1.9.6.orig/build.xml 2015-06-28 23:46:12.000000000 -0500
++++ apache-ant-1.9.6/build.xml 2015-12-09 22:07:51.217674735 -0500
+@@ -899,7 +899,7 @@
+ ===================================================================
+ -->
+ <target name="dist-lite"
+- depends="jars,test-jar"
++ depends="jars"
+ description="--> creates a minimum distribution to run Apache Ant">
+
+ <mkdir dir="${dist.dir}"/>
diff --git a/libre/apache-ant/apache-ant.csh b/libre/apache-ant/apache-ant.csh
index fdc04b2f8..a19392b56 100644
--- a/libre/apache-ant/apache-ant.csh
+++ b/libre/apache-ant/apache-ant.csh
@@ -1,2 +1 @@
-#!/bin/csh
-setenv ANT_HOME /opt/apache-ant
+setenv ANT_HOME /usr/share/apache-ant
diff --git a/libre/apache-ant/apache-ant.install b/libre/apache-ant/apache-ant.install
new file mode 100644
index 000000000..6d444337c
--- /dev/null
+++ b/libre/apache-ant/apache-ant.install
@@ -0,0 +1,11 @@
+post_install() {
+ # Small fix after mistake in previous package version
+ if [ -e /usr/share/apache-ant/etc/apache-ant ]
+ then
+ unlink /usr/share/apache-ant/etc/apache-ant
+ fi
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/libre/apache-ant/apache-ant.sh b/libre/apache-ant/apache-ant.sh
index 6e4809da5..eaa8a54ea 100644
--- a/libre/apache-ant/apache-ant.sh
+++ b/libre/apache-ant/apache-ant.sh
@@ -1,2 +1 @@
-#!/bin/sh
-export ANT_HOME=/opt/apache-ant
+export ANT_HOME=/usr/share/apache-ant
diff --git a/libre/apache-ant/bin_ant b/libre/apache-ant/bin_ant
new file mode 100644
index 000000000..e245dbe52
--- /dev/null
+++ b/libre/apache-ant/bin_ant
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+. /etc/apache-ant/ant.conf
+
+export LOCALCLASSPATH=${OPT_JAR_LIST}
+/usr/share/apache-ant/bin/ant "$@"