summaryrefslogtreecommitdiff
path: root/libre/junit/PKGBUILD
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-02-22 15:48:22 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-02-22 15:48:22 -0500
commit933408834ea04791a9b651d46589d7276c5b91a7 (patch)
treeabd6ef01723eea97eb4d637cdf1005e970a08cfc /libre/junit/PKGBUILD
parentb942fafe021b02d85580985988923db9cca4c7f1 (diff)
downloadabslibre-933408834ea04791a9b651d46589d7276c5b91a7.tar.gz
abslibre-933408834ea04791a9b651d46589d7276c5b91a7.tar.bz2
abslibre-933408834ea04791a9b651d46589d7276c5b91a7.zip
update apache-ant, move it (and dependencies) from [java] to [libre]
Diffstat (limited to 'libre/junit/PKGBUILD')
-rw-r--r--libre/junit/PKGBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/libre/junit/PKGBUILD b/libre/junit/PKGBUILD
new file mode 100644
index 000000000..5c10cc43f
--- /dev/null
+++ b/libre/junit/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (Arch): Guillaume ALAUX <Guillaume at Arch Linux dot org>
+# Rationale: Arch version isn't built from source.
+
+pkgname=junit
+pkgver=4.11
+pkgdesc="Automated testing framework for Java"
+url="http://www.junit.org/"
+license=('CPL')
+
+pkgrel=3.3
+arch=('any')
+depends=('java-runtime' 'java-hamcrest')
+makedepends=('apache-ant' 'jakarta-oro' 'jh')
+
+source=("https://repo.parabolagnulinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz")
+md5sums=('cdaa9856761201de81a61aecb8cfcc9c')
+
+mksource=("$pkgname-$pkgver::git://github.com/junit-team/junit.git#tag=r$pkgver")
+mkmd5sums=('SKIP')
+mksource() {
+ cd "${srcdir}/${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}-${pkgver}.jar ${pkgdir}/usr/share/java/${pkgname}.jar
+}