summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java-ugly/junit/PKGBUILD55
-rw-r--r--java/jakarta-oro/PKGBUILD30
-rw-r--r--java/junit/PKGBUILD53
3 files changed, 83 insertions, 55 deletions
diff --git a/java-ugly/junit/PKGBUILD b/java-ugly/junit/PKGBUILD
deleted file mode 100644
index 7204cd5c9..000000000
--- a/java-ugly/junit/PKGBUILD
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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')
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 <chenxiaolong@cxl.epac.to>
+
+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 <lukeshu@sbcglobal.net>
+# Maintainer (Arch): Guillaume ALAUX <Guillaume at Arch Linux dot org>
+
+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
+}