summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/apache-ant/PKGBUILD14
-rw-r--r--java/beanshell/PKGBUILD45
-rw-r--r--java/java-commons-bsf2/PKGBUILD (renamed from java/java-commons-bsf/PKGBUILD)0
-rw-r--r--java/java-jarjar/PKGBUILD31
-rw-r--r--java/java-rxtx/PKGBUILD10
-rw-r--r--java/java-sonatype-oss-parent/PKGBUILD12
-rw-r--r--java/maven/PKGBUILD107
-rw-r--r--java/maven/maven.csh2
-rw-r--r--java/maven/maven.sh3
-rw-r--r--java/not-working/java-bnd/PKGBUILD24
10 files changed, 217 insertions, 31 deletions
diff --git a/java/apache-ant/PKGBUILD b/java/apache-ant/PKGBUILD
index 9f9c77c28..dfda3c28d 100644
--- a/java/apache-ant/PKGBUILD
+++ b/java/apache-ant/PKGBUILD
@@ -12,9 +12,10 @@ provides=("apache-ant-libre=$pkgver")
replaces=("apache-ant-libre")
conflicts=("apache-ant-libre")
-pkgrel=2
+pkgrel=3
arch=('any')
depends=('java-environment')
+makedepends=('jh')
_mirror=http://archive.apache.org/dist
source=($_mirror/ant/source/${pkgname}-${pkgver}-src.tar.bz2
@@ -98,9 +99,18 @@ package() {
install -d "${pkgdir}"/usr/share/doc/${pkgname}
install -d "${pkgdir}"/usr/share/licenses/${pkgname}
+ cd "${pkgdir}"/${ANT_HOME}/lib
+ for pom in *.pom; do
+ a=${pom%.pom}
+ base=$(jh mvn-basename org.apache.ant $a $pkgver)
+ install -d "${pkgdir}${base%/*}"
+ ln -sf ${ANT_HOME}/lib/$a.pom "${pkgdir}${base}".pom
+ ln -sf ${ANT_HOME}/lib/$a.jar "${pkgdir}${base}".jar
+ done
+
cd "${pkgdir}"/${ANT_HOME}
for prog in bin/*; do
- ln -sf ${ANT_HOME}/$prog "${pkgdir}"/usr/bin
+ ln -sf ${ANT_HOME}/$prog "${pkgdir}"/usr/bin
done
ln -sf ${ANT_HOME}/{README,WHATSNEW} "${pkgdir}"/usr/share/doc/${pkgname}
ln -sf ${ANT_HOME}/docs "${pkgdir}"/usr/share/doc/${pkgname}/html
diff --git a/java/beanshell/PKGBUILD b/java/beanshell/PKGBUILD
new file mode 100644
index 000000000..95b14d379
--- /dev/null
+++ b/java/beanshell/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (Arch): AndyRTR <andyrtr at archlinux.org>
+
+pkgname=beanshell
+pkgver=2.0b4
+pkgrel=2.1
+pkgdesc="Lightweight scripting for Java"
+url="http://www.beanshell.org/"
+license=('LGPL')
+
+provides=('bsh')
+
+arch=('any')
+depends=('java-runtime')
+makedepends=('apache-ant' 'java-commons-bsf2' 'javacc' 'java-servlet3.0-tomcat')
+source=("http://www.beanshell.org/bsh-${pkgver}-src.jar")
+
+prepare() {
+ cd "$srcdir"/BeanShell-$pkgver
+
+ rm lib/*.jar
+ ln -s /usr/share/java/bsf2.jar lib/
+ ln -s /usr/share/java/javacc.jar lib/
+ ln -s /usr/share/java/servlet-api.jar lib/servlet.jar
+}
+
+build() {
+ cd "$srcdir"/BeanShell-$pkgver
+ ant dist
+}
+
+check() {
+ cd "$srcdir"/BeanShell-$pkgver
+ ant test
+}
+
+package() {
+ cd "$srcdir"/BeanShell-$pkgver/dist
+ install -d "${pkgdir}"/usr/share/java/
+ for artifact in $(printf '%s\n' *.jar|sed 's/-[0-9b.]*\.jar$//'); do
+ install -m644 $artifact-$pkgver.jar "${pkgdir}"/usr/share/java/$artifact.jar
+ done
+}
+
+sha1sums=('69b36df249654a04e777ab899046c50b8cc844ac')
diff --git a/java/java-commons-bsf/PKGBUILD b/java/java-commons-bsf2/PKGBUILD
index 57a9dfc1a..57a9dfc1a 100644
--- a/java/java-commons-bsf/PKGBUILD
+++ b/java/java-commons-bsf2/PKGBUILD
diff --git a/java/java-jarjar/PKGBUILD b/java/java-jarjar/PKGBUILD
index 8d1d1120b..c78d5539e 100644
--- a/java/java-jarjar/PKGBUILD
+++ b/java/java-jarjar/PKGBUILD
@@ -9,30 +9,28 @@ pkgver=1.2
_pkgrev=132 # v1.2 wasn't tagged, but this is clearly it
pkgdesc="Java static linker (instead of the normal dynamic linking)"
url="https://code.google.com/p/jarjar/"
-license=('Apache2')
+license=('Apache')
-pkgrel=1
+pkgrel=2
arch=('any')
depends=('java-runtime')
-makedepends=('apache-ant' 'java-asm3' 'junit' 'maven' 'jh')
-source=("svn+http://jarjar.googlecode.com/svn/trunk/jarjar#revision=$_pkgrev")
+makedepends=('apache-ant' 'java-asm3' 'junit' 'maven')
+source=("libre://${_pkgname}-${pkgver}.tar.gz")
+mksource=("${_pkgname}-${pkgver}::svn+http://jarjar.googlecode.com/svn/trunk/jarjar#revision=$_pkgrev")
mksource() {
- cd "$srcdir/$_pkgname"
- rm -f src/test/*.{class,jar}
+ cd "$srcdir/$_pkgname-$pkgver"
rm -f lib/*.jar
}
build() {
- cd "$srcdir/$_pkgname"
- eval `jh mksource`
+ cd "$srcdir/$_pkgname-$pkgver"
- ln -s /usr/share/java/asm-3.jar lib/asm-3.3.1.jar
- ln -s /usr/share/java/asm-commons-3.jar lib/asm-commons-3.3.1.jar
- ln -s /usr/share/java/junit.jar lib/junit-4.8.1.jar
- ln -s /opt/maven/lib/maven-plugin-api-*.jar lib/maven-plugin-api.jar
-
- ln -s /opt/apache-ant/lib/ant.jar lib/
+ ln -sf /usr/share/java/asm-3.jar lib/asm-3.3.1.jar
+ ln -sf /usr/share/java/asm-commons-3.jar lib/asm-commons-3.3.1.jar
+ ln -sf /usr/share/java/junit.jar lib/junit-4.8.1.jar
+ ln -sf /opt/maven/lib/maven-plugin-api-*.jar lib/maven-plugin-api.jar
+ ln -sf /opt/apache-ant/lib/ant.jar lib/ant.jar
export CLASSPATH=/usr/share/java/asm-3.jar
echo 'includeantruntime false' > build.properties
@@ -40,10 +38,11 @@ build() {
}
package() {
- cd "$srcdir/$_pkgname"
+ cd "$srcdir/$_pkgname-$pkgver"
install -d "$pkgdir/usr/share/java/$_pkgname"
install -D "dist/$_pkgname-$pkgver.jar" "$pkgdir/usr/share/java/$_pkgname"
ln -s "$_pkgname/$_pkgname-$pkgver.jar" "$pkgdir/usr/share/java/$_pkgname.jar"
}
-md5sums=('SKIP')
+mkmd5sums=('SKIP')
+md5sums=('cc2698a58f93cdb22c51f039a1b8a56e')
diff --git a/java/java-rxtx/PKGBUILD b/java/java-rxtx/PKGBUILD
index 4fcabe2a4..ceb0d9bab 100644
--- a/java/java-rxtx/PKGBUILD
+++ b/java/java-rxtx/PKGBUILD
@@ -10,16 +10,18 @@ pkgver=${_pkgver//-/.}
pkgdesc="A native library providing serial and parallel communication for Java"
license=(LGPL2.1)
-pkgrel=3
+pkgrel=4
arch=('i686' 'x86_64')
depends=('java-runtime')
-makedepends=('java-environment' 'pacman>4.0.3')
+makedepends=('java-environment')
case "$_pkgver" in
*arduino*)
url="https://github.com/arduino/RXTX"
- source=("git://github.com/arduino/RXTX.git#${_gitver}")
- md5sums=('SKIP')
+ source=("libre://RXTX-$pkgver.tar.gz")
+ md5sums=('a71156587dc8d28d1ff4ece376bc0140')
+ mksource=("git://github.com/arduino/RXTX.git#${_gitver}")
+ mkmd5sums=('SKIP')
_dirname=RXTX
;;
*)
diff --git a/java/java-sonatype-oss-parent/PKGBUILD b/java/java-sonatype-oss-parent/PKGBUILD
index f42f6adc5..b62c971ac 100644
--- a/java/java-sonatype-oss-parent/PKGBUILD
+++ b/java/java-sonatype-oss-parent/PKGBUILD
@@ -5,23 +5,17 @@ pkgver=7
pkgdesc="Metadata file for Maven-based build systems to inherit from"
license='Apache2'
-_groupId=org/sonatype/oss
+_groupId=org.sonatype.oss
_artifactId=oss-parent
pkgrel=1
arch=('any')
-depends=('maven')
-makedepends=('java-sonatype-oss-parent=7' 'jh')
+makedepends=('jh')
source=("http://search.maven.org/remotecontent?filepath=$_groupId/$_artifactId/$pkgver/$_artifactId-$pkgver.pom")
-build() {
- :
-}
-
package() {
cd "$srcdir"
- install -Dm644 $_artifactId-$pkgver.pom \
- "$pkgdir/`jh mvn-basename $_groupId $_artifactId $pkgver`".pom
+ DESTDIR=$pkgdir jh mvn-install $_groupId $_artifactId $pkgver $_artifactId-$pkgver.pom
}
md5sums=('3e418cf7f2607bf359e6c514a992cb38')
diff --git a/java/maven/PKGBUILD b/java/maven/PKGBUILD
new file mode 100644
index 000000000..3f8e5071d
--- /dev/null
+++ b/java/maven/PKGBUILD
@@ -0,0 +1,107 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+pkgname=maven
+pkgver=3.0.5
+pkgdesc="A Java project management and project comprehension tool"
+url="http://maven.apache.org"
+license=('Apache')
+
+replaces=('maven-libre')
+conflicts=('maven-libre')
+
+pkgrel=1
+arch=('any')
+options=(!emptydirs)
+conflicts=('maven')
+depends=('java-environment' 'sh')
+makedepends=('apache-ant' 'jh' 'imake'
+ java-antlr2
+ java-asm3
+)
+backup=('etc/maven/settings.xml')
+
+_mirror=http://archive.apache.org/dist
+source=($_mirror/maven/maven-${pkgver%%.*}/$pkgver/source/apache-maven-$pkgver-src.tar.gz
+ maven.sh maven.csh)
+
+_setup_env() {
+ unset _JAVA_OPTIONS
+ . /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"
+ _M2_LOCALREPO=$(jh mvn-localrepo)
+ ant_args=(
+ -Dmaven.repo.local="$srcdir"/maven.repo.local
+ )
+}
+
+prepare() {
+ if type mvn &>/dev/null; then
+ error "maven cannot be built while an existing version is installed"
+ return 1
+ fi
+}
+
+build() (
+ _setup_env
+ install -d "$srcdir"/maven.repo.local
+ lndir "$_M2_LOCALREPO" "$srcdir"/maven.repo.local
+
+ cd "$srcdir"/apache-maven-$pkgver
+
+ # FIXME: downloads makedepends from the Internet. Add them to makedepends=()
+ ant "${ant_args[@]}" maven-assembly 2>&1|tee "$srcdir"/ant-log.txt
+
+ < "$srcdir"/ant-log.txt \
+ sed -nr 's/.*Download(ed|ing):\s*//p' | \
+ sed 's/ .*//' | \
+ sed -r -e 's|^http://repo.maven.apache.org/maven2/||' -e 's/\.(jar|pom)$//' | \
+ sort -u > "$srcdir"/downloaded-artifacts.txt
+)
+
+package() (
+ _setup_env
+ cd "$srcdir"/apache-maven-$pkgver
+ ant "${ant_args[@]}" extract-assembly
+ #rm "$pkgdir"/opt/maven/*.txt
+
+ # 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
+
+ # Install the local repo
+ mkdir -p "$pkgdir"${_M2_LOCALREPO%/*}
+ cp -a "$srcdir"/maven.repo.local "$pkgdir"$_M2_LOCALREPO
+ # Remove extra artifacts
+ find "$pkgdir"$_M2_LOCALREPO -type l -delete
+ find "$pkgdir"$_M2_LOCALREPO -name _maven.repositories -delete
+ cat "$srcdir"/downloaded-artifacts.txt | while read artifact; do
+ rm -f "$pkgdir"$_M2_LOCALREPO/$artifact*
+ done
+)
+
+md5sums=('b88becd8fe5a9665191e05945942db64'
+ '58820067a4d7384477daa134023d9b57'
+ 'e2bbdeffed100cd51d05b2ba8ebd6321')
diff --git a/java/maven/maven.csh b/java/maven/maven.csh
new file mode 100644
index 000000000..f5750cfc8
--- /dev/null
+++ b/java/maven/maven.csh
@@ -0,0 +1,2 @@
+setenv MAVEN_OPTS -Xmx512m
+setenv M2_HOME=/opt/maven
diff --git a/java/maven/maven.sh b/java/maven/maven.sh
new file mode 100644
index 000000000..b6655cc22
--- /dev/null
+++ b/java/maven/maven.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+export MAVEN_OPTS=-Xmx512m
+export M2_HOME=/opt/maven
diff --git a/java/not-working/java-bnd/PKGBUILD b/java/not-working/java-bnd/PKGBUILD
new file mode 100644
index 000000000..86820469a
--- /dev/null
+++ b/java/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')