summaryrefslogtreecommitdiff
path: root/java-ugly
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-10-19 00:54:38 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-10-19 00:54:38 -0400
commit75f10c84822529dc782da5ad95b092cb15a427c4 (patch)
tree843775b64422e9ecde47d14a0be31da1caca96a1 /java-ugly
parentdf54578e5c91f87b306bc31dc2a06e9ee27c1d9b (diff)
add java-ugly/junit
Diffstat (limited to 'java-ugly')
-rw-r--r--java-ugly/junit/PKGBUILD55
1 files changed, 55 insertions, 0 deletions
diff --git a/java-ugly/junit/PKGBUILD b/java-ugly/junit/PKGBUILD
new file mode 100644
index 000000000..7204cd5c9
--- /dev/null
+++ b/java-ugly/junit/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (Arch): Guillaume ALAUX <Guillaume at Arch Linux dot org>
+
+pkgname=junit
+pkgver=4.10
+pkgrel=1
+pkgdesc="Automated testing framework for Java"
+arch=('any')
+url="http://www.junit.org/"
+license=('CPL')
+depends=('java-runtime')
+makedepends=('apache-ant' 'jh')
+source=("$pkgname::git://github.com/KentBeck/junit.git#tag=r$pkgver")
+
+mksource() {
+ cd "${srcdir}/${pkgname}"
+ #find . -name '*.jar' -delete
+
+ # Shut up some warnings from javac 1.7
+ sed -ri 's|target="([0-9.]+)"|\0 source="\1"|' build.xml
+}
+
+build() {
+ mksource
+ cd "${srcdir}/${pkgname}"
+
+ # Shut up some warnings from javac 1.7
+ sed -ri 's|target="([0-9.]+)"$|\0 source="\1"|' build.xml
+
+ ant jars
+ for pkg in junit junit-dep; do
+ sed \
+ -e "s|@artifactID@|$pkg|" \
+ -e "s|@version@|$pkgver|" \
+ < build/maven/pom-template.xml > $pkgname$pkgver/$pkg-$pkgver.pom
+ done
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+ install -Dm644 cpl-v10.html "$pkgdir/usr/share/licenses/junit/cpl-v10.html"
+
+ cd "${srcdir}/${pkgname}/${pkgname}${pkgver}"
+
+ export DESTDIR="$pkgdir"
+ jh mvn-install $pkgname junit $pkgver junit-$pkgver.{jar,pom}
+ jh mvn-install $pkgname junit-dep $pkgver junit-dep-$pkgver.{jar,pom}
+ install -d "${pkgdir}/usr/share/java/${pkgname}"
+ ln -s `jh mvn-basename $pkgname junit $pkgver`.jar "${pkgdir}/usr/share/java/${pkgname}"
+ ln -s `jh mvn-basename $pkgname junit-dep $pkgver`.jar "${pkgdir}/usr/share/java/${pkgname}"
+ ln -s ${pkgname}/${pkgname}-${pkgver}.jar ${pkgdir}/usr/share/java/${pkgname}.jar
+ ln -s ${pkgname}/${pkgname}-dep-${pkgver}.jar ${pkgdir}/usr/share/java/${pkgname}-dep.jar
+}
+
+md5sums=('SKIP')