From 602dd1b2f2f68c6b8e44338ecffea950eabed18d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 21 Jun 2013 23:51:50 -0600 Subject: java/junit: clean up, update (and add dependency) --- java/jakarta-oro/PKGBUILD | 30 +++++++++++++++++++++++++++ java/junit/PKGBUILD | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 java/jakarta-oro/PKGBUILD create mode 100644 java/junit/PKGBUILD (limited to 'java') diff --git a/java/jakarta-oro/PKGBUILD b/java/jakarta-oro/PKGBUILD new file mode 100644 index 000000000..9bc3e11b9 --- /dev/null +++ b/java/jakarta-oro/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Xiao-Long Chen + +pkgname=jakarta-oro +pkgver=2.0.8 +pkgrel=1 +pkgdesc="Full regular expressions API" +arch=('any') +url="http://jakarta.apache.org/oro" +license=('Apache') +makedepends=('apache-ant') +source=("http://archive.apache.org/dist/jakarta/oro/jakarta-oro-${pkgver}.tar.gz") +sha512sums=('a7f6eb6a088765f273df18ccc823f918737f18ec8772275054839a87f8370f1848e795d481f226c712651104d7598ab86c7d90a991fb039df6581f42f1447920') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + find . -name '*.jar' -o -name '*.class' -delete + + ant jar +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + install -dm755 "${pkgdir}/usr/share/java/" + install -m644 ${pkgname}-${pkgver}.jar \ + "${pkgdir}/usr/share/java/${pkgname}.jar" +} + +# vim:set ts=2 sw=2 et: diff --git a/java/junit/PKGBUILD b/java/junit/PKGBUILD new file mode 100644 index 000000000..35ad23101 --- /dev/null +++ b/java/junit/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Luke Shumaker +# Maintainer (Arch): Guillaume ALAUX + +pkgname=junit +pkgver=4.11 +pkgdesc="Automated testing framework for Java" +url="http://www.junit.org/" +license=('CPL') + +pkgrel=1 +arch=('any') +depends=('java-runtime' 'java-hamcrest') +makedepends=('apache-ant' 'jakarta-oro' 'jh') + +source=("libre://$pkgname-$pkgver.tar.gz") +md5sums=('47c8879e05effb2ab98461c43243cc65') + +mksource=("$pkgname::git://github.com/junit-team/junit.git#tag=r$pkgver") +mkmd5sums=('SKIP') +mksource() { + cd "${srcdir}"p + if [[ -d $pkgname ]]; then + rm -rf "$pkgname"-* + mv "$pkgname" "$pkgname-$pkgver" + fi + + cd "${pkgname}-${pkgver}" + find . -name '*.jar' -delete +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + ln -sf /usr/share/java/jakarta-oro.jar build/lib/ + ln -sf /usr/share/java/hamcrest-core.jar lib/hamcrest-core-1.3.jar + + ant -Dversion-status='' jars + for artifact in junit junit-dep; do + sed \ + -e "s|@artifactID@|$artifact|" \ + -e "s|@version@|$pkgver|" \ + < build/maven/$artifact-pom-template.xml > $pkgname$pkgver/$artifact-$pkgver.pom + done +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}/${pkgname}${pkgver}" + + export DESTDIR="$pkgdir" + jh mvn-install $pkgname junit $pkgver junit-$pkgver.{pom,jar} junit-$pkgver.jar + jh mvn-install $pkgname junit-dep $pkgver junit-dep-$pkgver.pom + ln -s ${pkgname}/${pkgname}-${pkgver}.jar ${pkgdir}/usr/share/java/${pkgname}.jar +} -- cgit v1.2.3 From bbbfa15c7556da095dba31c83f2a73bc2aaa2009 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 22 Jun 2013 00:15:56 -0600 Subject: update java/apache-ant --- java/apache-ant/PKGBUILD | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'java') diff --git a/java/apache-ant/PKGBUILD b/java/apache-ant/PKGBUILD index 77e0dfe94..80a75335e 100644 --- a/java/apache-ant/PKGBUILD +++ b/java/apache-ant/PKGBUILD @@ -3,27 +3,28 @@ # Contributor: Andrew Wright pkgname=apache-ant -pkgver=1.8.4 +pkgver=1.9.1 +pkgdesc="A Java-based build tool" +license=('Apache' 'custom:BSD3') +url="http://ant.apache.org/" provides=("apache-ant-libre=$pkgver") replaces=("apache-ant-libre") conflicts=("apache-ant-libre") -pkgrel=1.1 -pkgdesc="A Java-based build tool" +pkgrel=1 arch=('any') -license=('Apache') -url="http://ant.apache.org/" +depends=('java-environment') + _mirror=http://archive.apache.org/dist source=($_mirror/ant/source/${pkgname}-${pkgver}-src.tar.bz2 ${pkgname}.sh ${pkgname}.csh) -depends=('java-environment') # This list is adapted from https://ant.apache.org/manual/install.html#librarydependencies declare -A _opts _opts[junit]='to have JUnit on the classpath in javac tasks;/usr/share/java/junit.jar' _opts[xalan-java]=' task;/usr/share/java/xalan.jar' -_opts[antlr2]=' task;/usr/share/java/antlr2.jar::antlr.jar' +_opts[java-antlr2]=' task;/usr/share/java/antlr2.jar::antlr.jar' #_opts[java-bsf]='