From d4e2b9f56dc4973e64f3c652d4cb99ca18e62182 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Fri, 28 Feb 2014 18:31:43 +0100 Subject: [PATCH] apache-ant: add package --- srcpkgs/apache-ant-doc | 1 + srcpkgs/apache-ant/INSTALL | 21 ++++++++++++++ srcpkgs/apache-ant/files/apache-ant.sh | 2 ++ srcpkgs/apache-ant/template | 39 ++++++++++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 120000 srcpkgs/apache-ant-doc create mode 100644 srcpkgs/apache-ant/INSTALL create mode 100644 srcpkgs/apache-ant/files/apache-ant.sh create mode 100644 srcpkgs/apache-ant/template diff --git a/srcpkgs/apache-ant-doc b/srcpkgs/apache-ant-doc new file mode 120000 index 00000000000..57d8521e069 --- /dev/null +++ b/srcpkgs/apache-ant-doc @@ -0,0 +1 @@ +apache-ant \ No newline at end of file diff --git a/srcpkgs/apache-ant/INSTALL b/srcpkgs/apache-ant/INSTALL new file mode 100644 index 00000000000..e1927fd9823 --- /dev/null +++ b/srcpkgs/apache-ant/INSTALL @@ -0,0 +1,21 @@ +# +# This script will advise the user to re-login to have JRE included +# in PATH +# +case "${ACTION}" in +pre) + ;; +post) + cat << _EOF +===================================================================== + +- Please re-login to include Apache Ant in your PATH or re-source + /etc/profile: + + $ source /etc/profile + +===================================================================== +_EOF + ;; +esac + diff --git a/srcpkgs/apache-ant/files/apache-ant.sh b/srcpkgs/apache-ant/files/apache-ant.sh new file mode 100644 index 00000000000..1ad141cedba --- /dev/null +++ b/srcpkgs/apache-ant/files/apache-ant.sh @@ -0,0 +1,2 @@ +export PATH=$PATH:/usr/share/apache-ant/bin +export ANT_HOME=${ANT_HOME:-/usr/share/apache-ant} diff --git a/srcpkgs/apache-ant/template b/srcpkgs/apache-ant/template new file mode 100644 index 00000000000..e505b5da0b6 --- /dev/null +++ b/srcpkgs/apache-ant/template @@ -0,0 +1,39 @@ +# Template file for 'apache-ant' +pkgname="apache-ant" +version="1.9.3" +revision=1 +short_desc="Java library and command-line tool that help building software" +maintainer="Enno Boland " +license="Apache License" +homepage="http://ant.apache.org" +distfiles="http://mirror.dkd.de/apache/ant/source/apache-ant-${version}-src.tar.bz2" +checksum="eb9306e8b8322bb09b78cc3d8e288398f9cb657d76ffc61ee3fb175e786e8365" +hostmakedepends="jdk" +depends="jre" +noarch="yes" +_prefix=usr/share/apache-ant + + +do_configure() { + # Disable tests + sed -i 's/jars,test-jar/jars/' build.xml +} + +do_build() { + JAVA_HOME=/usr/share/java ./build.sh -Ddist.dir=$DESTDIR/$_prefix jars +} + +do_install() { + JAVA_HOME=/usr/share/java ./build.sh -Ddist.dir=$DESTDIR/$_prefix dist + + vinstall ${FILESDIR}/apache-ant.sh 644 etc/profile.d +} + +apache-ant-doc_package() { + short_desc+=" - documentation" + depends="${sourcepkg}>=${version}_${revision}" + noarch="yes" + pkg_install() { + vmove $_prefix/manual + } +}