summaryrefslogtreecommitdiff
path: root/libre/java-bcel/PKGBUILD
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-12-04 23:19:27 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-12-04 23:19:27 -0500
commit1b42a9d608013d9a3285dabb93f60c89f0debb7c (patch)
treef7ae39f47a50494930d3b040bfc5ed87dfd376f9 /libre/java-bcel/PKGBUILD
parentdf732e530afa979a4dc67d450948244364744278 (diff)
downloadabslibre-1b42a9d608013d9a3285dabb93f60c89f0debb7c.tar.gz
abslibre-1b42a9d608013d9a3285dabb93f60c89f0debb7c.tar.bz2
abslibre-1b42a9d608013d9a3285dabb93f60c89f0debb7c.zip
java-bcel: add new package to [libre]
Diffstat (limited to 'libre/java-bcel/PKGBUILD')
-rw-r--r--libre/java-bcel/PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/libre/java-bcel/PKGBUILD b/libre/java-bcel/PKGBUILD
new file mode 100644
index 000000000..c5de83f87
--- /dev/null
+++ b/libre/java-bcel/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+_libname=bcel
+pkgname=java-${_libname}
+pkgver=5.2
+pkgrel=2.parabola1
+pkgdesc="Java library to analyze, create, and manipulate (binary) Java class files"
+arch=('any')
+url="http://commons.apache.org/bcel/"
+license=('APACHE')
+depends=('java-runtime-headless')
+makedepends=('apache-ant' 'jakarta-regexp' 'jh' 'junit')
+source=("http://archive.apache.org/dist/jakarta/${_libname}/source/${_libname}-${pkgver}-src.tar.gz"
+ "http://repo.maven.apache.org/maven2/org/apache/${_libname}/${_libname}/${pkgver}/${_libname}-${pkgver}.pom"
+ "java-bcel-iso_8859_1_encoding.patch")
+md5sums=('905b7e718e30e7ca726530ecf106e532'
+ 'a691cc2bb8fe12cec388c7edf3ab27f0'
+ 'adc403be36c101ba78119d27f1e230d7')
+
+prepare() {
+ cd "${srcdir}/${_libname}-${pkgver}"
+ patch -Np1 -i ../java-bcel-iso_8859_1_encoding.patch
+}
+
+build() {
+ cd "${srcdir}/${_libname}-${pkgver}"
+ # "-Dbuild.sysclasspath=only" prevents ant from downloading regexp
+ export ANT_OPTS=-Dfile.encoding=iso-8859-1
+ ant clean jar javadoc \
+ -Dbuild.sysclasspath=only \
+ -lib "/usr/share/java/regexp.jar"
+}
+
+package() {
+ cd "${srcdir}/${_libname}-${pkgver}"
+
+ # 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 "dist/docs/api" "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ export DESTDIR=${pkgdir}
+ jh mvn-install "org.apache.${_libname}" ${_libname} ${pkgver} \
+ "${srcdir}/${_libname}-${pkgver}.pom" \
+ "target/${_libname}-${pkgver}.jar" \
+ "${_libname}.jar"
+
+ ln -s "/usr/share/java/${_libname}.jar" \
+ "${pkgdir}/usr/share/java/${_libname}-${pkgver}.jar"
+}