summaryrefslogtreecommitdiff
path: root/java-ugly
diff options
context:
space:
mode:
Diffstat (limited to 'java-ugly')
-rw-r--r--java-ugly/junit/PKGBUILD55
-rwxr-xr-xjava-ugly/maven/PKGBUILD76
-rwxr-xr-xjava-ugly/maven/maven.csh2
-rwxr-xr-xjava-ugly/maven/maven.sh3
-rw-r--r--java-ugly/not-working/java-bnd/PKGBUILD24
5 files changed, 160 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')
diff --git a/java-ugly/maven/PKGBUILD b/java-ugly/maven/PKGBUILD
new file mode 100755
index 000000000..2bd99940e
--- /dev/null
+++ b/java-ugly/maven/PKGBUILD
@@ -0,0 +1,76 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+_pkgname=maven
+pkgname=maven-libre
+pkgver=3.0.4
+
+provides=("$_pkgname=$pkgver")
+replaces=("$_pkgname")
+conflicts=("$_pkgname")
+
+pkgrel=1
+pkgdesc="A Java project management and project comprehension tool"
+arch=('any')
+url="http://maven.apache.org"
+license=('Apache')
+depends=('java-environment')
+makedepends=('apache-ant')
+backup=('etc/maven/settings.xml')
+
+_mirror=http://archive.apache.org/dist
+source=($_mirror/maven/source/apache-maven-$pkgver-src.tar.gz
+ maven.sh maven.csh)
+
+_M2_LOCALREPO="/usr/share/maven/repository"
+
+# FIXME: This also does tasks for package()
+build() {
+ cd $srcdir/apache-maven-$pkgver
+
+ . /etc/profile.d/jre.sh
+ . /etc/profile.d/jdk.sh
+
+ export MAVEN_OPTS=-Xmx512m
+ export M2_HOME="$pkgdir"/opt/maven
+ export PATH="$PATH:$M2_HOME/bin"
+
+ # FIXME: Downloads many deps from Internet. They should be
+ # packaged separately and added to depends=()
+ install -d "$pkgdir`dirname $_M2_LOCALREPO`"
+ cp -r $_M2_LOCALREPO "$pkgdir$_M2_LOCALREPO"
+ install -d "$pkgdir"/opt
+ ant -Dmaven.repo.local="$pkgdir$_M2_LOCALREPO"
+ rm "$pkgdir"/opt/maven/*.txt
+}
+
+package() {
+ install -d "$pkgdir$_M2_LOCALREPO"
+
+ # Install config file in /etc
+ # Unlike the other directories, we symlink from the system to /opt/maven
+ # because that way all conf files stay in /etc
+ install -d "$pkgdir"/etc/maven
+ sed "55i<localRepository>$_M2_LOCALREPO</localRepository>" \
+ < "$pkgdir"/opt/maven/conf/settings.xml \
+ > "$pkgdir"/etc/maven/settings.xml
+ rm -rf "$pkgdir"/opt/maven/conf
+ ln -s /etc/maven "$pkgdir"/opt/maven/conf
+
+ # Install profile.d settings
+ install -d "$pkgdir"/etc/profile.d
+ install -m 755 "$srcdir"/maven.{csh,sh} "$pkgdir"/etc/profile.d
+
+ # Link executables to /usr/bin
+ install -d "$pkgdir"/usr/bin
+ ln -s /opt/maven/bin/{mvn,mvnDebug,mvnyjp} "$pkgdir"/usr/bin
+
+ # Link jar files to appropriate place in /usr/share
+ install -d "$pkgdir"/usr/share/java
+ ln -s /opt/maven/lib "$pkgdir"/usr/share/java/maven
+}
+
+md5sums=('17ca94d5be05a78c6ab12425b7a0ee10'
+ '58820067a4d7384477daa134023d9b57'
+ 'e2bbdeffed100cd51d05b2ba8ebd6321')
diff --git a/java-ugly/maven/maven.csh b/java-ugly/maven/maven.csh
new file mode 100755
index 000000000..f5750cfc8
--- /dev/null
+++ b/java-ugly/maven/maven.csh
@@ -0,0 +1,2 @@
+setenv MAVEN_OPTS -Xmx512m
+setenv M2_HOME=/opt/maven
diff --git a/java-ugly/maven/maven.sh b/java-ugly/maven/maven.sh
new file mode 100755
index 000000000..b6655cc22
--- /dev/null
+++ b/java-ugly/maven/maven.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+export MAVEN_OPTS=-Xmx512m
+export M2_HOME=/opt/maven
diff --git a/java-ugly/not-working/java-bnd/PKGBUILD b/java-ugly/not-working/java-bnd/PKGBUILD
new file mode 100644
index 000000000..86820469a
--- /dev/null
+++ b/java-ugly/not-working/java-bnd/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+_pkgname=bnd
+pkgname=java-bnd
+pkgver=1.50.0
+pkgdesc="A swiss army knife for OSGi"
+url="http://www.aqute.biz/Bnd/"
+license=('Apache2')
+
+pkgrel=1
+arch=(any)
+makedepends=('apache-ant' 'junit')
+source=("git://github.com/bndtools/bnd.git")
+
+build() {
+ cd "$srcdir/$_pkgname"
+ ant dist
+}
+
+package() {
+ :
+}
+
+md5sums=('SKIP')