summaryrefslogtreecommitdiff
path: root/libre/java-avalon-framework
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-12-19 15:46:05 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-12-19 15:46:05 -0300
commit5e01aa6c69f029cc496c9a39ecf282e363ef7536 (patch)
tree43445cfdcd7fcce831c5625b813b4d0df7a9d770 /libre/java-avalon-framework
parent75a1023b02f9d1379784c0bf0cc174c092191ba6 (diff)
parent7f5844a3c0e8a803a359a4f385d35541176ce54b (diff)
downloadabslibre-5e01aa6c69f029cc496c9a39ecf282e363ef7536.tar.gz
abslibre-5e01aa6c69f029cc496c9a39ecf282e363ef7536.tar.bz2
abslibre-5e01aa6c69f029cc496c9a39ecf282e363ef7536.zip
Merge branch 'master' of ssh://projects.parabola.nu/~git/abslibre
Diffstat (limited to 'libre/java-avalon-framework')
-rw-r--r--libre/java-avalon-framework/PKGBUILD72
-rw-r--r--libre/java-avalon-framework/avalon-framework-rename_enum.patch17
2 files changed, 89 insertions, 0 deletions
diff --git a/libre/java-avalon-framework/PKGBUILD b/libre/java-avalon-framework/PKGBUILD
new file mode 100644
index 000000000..60c30d955
--- /dev/null
+++ b/libre/java-avalon-framework/PKGBUILD
@@ -0,0 +1,72 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_libname=avalon-framework
+pkgname=java-${_libname}
+pkgver=4.2.0
+pkgrel=6.parabola1
+pkgdesc="Reusable components for J2SE applications."
+arch=('any')
+url="http://excalibur.apache.org/"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('java-environment' 'java-avalon-logkit' 'jh' 'log4j-1.2')
+source=("https://archive.apache.org/dist/excalibur/${_libname}/source/${_libname}-${pkgver}-src.tar.gz"
+ "https://repo.maven.apache.org/maven2/${_libname}/${_libname}-api/${pkgver}/${_libname}-api-${pkgver}.pom"
+ "https://repo.maven.apache.org/maven2/${_libname}/${_libname}-impl/${pkgver}/${_libname}-impl-${pkgver}.pom"
+ 'avalon-framework-rename_enum.patch')
+md5sums=('fd42e4ed9d9cd7a4d2e7fca7ab8e847f'
+ '7dd8406e2fda8ec924f094761b4695de'
+ '1ae6d40afceecb706838ca4eb3157776'
+ '577de617b81a6d73f2f19c543af99922')
+
+prepare() {
+ cd "${srcdir}/${_libname}"
+ patch -Np1 -i "${srcdir}/avalon-framework-rename_enum.patch"
+ mkdir -p build/classes
+ mkdir -p build/classes/{api,impl,all}
+}
+
+build() {
+ cd "${srcdir}/${_libname}"
+
+ CLASSPATH="/usr/share/java/avalon-logkit.jar:/usr/share/java/log4j-1.2.jar"
+
+ javac -cp $CLASSPATH -d "build/classes/api" \
+ $(find "api/src/java" -name \*.java)
+ javac -cp "$CLASSPATH:build/classes/api" -d "build/classes/impl" \
+ $(find "impl/src/java" -name \*.java)
+ javac -cp $CLASSPATH -d "build/classes/all" \
+ $(find "api/src/java" "impl/src/java" -name \*.java)
+
+ javadoc -classpath $CLASSPATH -d "build/javadoc" \
+ -sourcepath "api/src/java" -subpackages org
+
+ jar -cvf "${_libname}-api.jar" -C "build/classes/api" .
+ jar -cvf "${_libname}-impl.jar" -C "build/classes/impl" .
+ jar -cvf "${_libname}.jar" -C "build/classes/all" .
+}
+
+package() {
+ cd "${srcdir}/${_libname}"
+
+ # Install license file
+ install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+
+ # Install documentation
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r "build/javadoc" "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ artifacts=("${_libname}-api" "${_libname}-impl")
+ export DESTDIR=${pkgdir}
+ for artifact in "${artifacts[@]}"; do
+ jh mvn-install ${_libname} ${artifact} ${pkgver} \
+ "${srcdir}/${artifact}-${pkgver}.pom" \
+ "${artifact}.jar" \
+ "${artifact}-${pkgver}.jar"
+ ln -s "/usr/share/java/${artifact}-${pkgver}.jar" \
+ "${pkgdir}/usr/share/java/${artifact}.jar"
+ done
+
+ install -Dm644 "${_libname}.jar" "${pkgdir}/usr/share/java/${_libname}/${_libname}.jar"
+}
diff --git a/libre/java-avalon-framework/avalon-framework-rename_enum.patch b/libre/java-avalon-framework/avalon-framework-rename_enum.patch
new file mode 100644
index 000000000..85ee8fd6a
--- /dev/null
+++ b/libre/java-avalon-framework/avalon-framework-rename_enum.patch
@@ -0,0 +1,17 @@
+--- avalon-framework.orig/api/src/java/org/apache/avalon/framework/Enum.java 2004-05-15 19:09:06.000000000 -0500
++++ avalon-framework/api/src/java/org/apache/avalon/framework/Enum.java 2015-09-19 02:49:20.766734911 -0500
+@@ -126,11 +126,11 @@
+ if( !(o instanceof Enum) )
+ return false;
+
+- final Enum enum = (Enum)o;
++ final Enum elements = (Enum)o;
+
+- if( !getClass().equals( enum.getClass() ) )
++ if( !getClass().equals( elements.getClass() ) )
+ return false;
+- if( m_name != null ? !m_name.equals( enum.m_name ) : enum.m_name != null )
++ if( m_name != null ? !m_name.equals( elements.m_name ) : elements.m_name != null )
+ return false;
+
+ return true;