summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-09-15 04:42:41 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-09-15 04:42:41 -0500
commit214dc4df827125ec8b679605901bedce5da2e7d9 (patch)
treed814c78144125e3fdab770ebe893c7f5f76f36ba /pcr
parente4b071a88e8f2345bd497430be7698d692d89725 (diff)
downloadabslibre-214dc4df827125ec8b679605901bedce5da2e7d9.tar.gz
abslibre-214dc4df827125ec8b679605901bedce5da2e7d9.tar.bz2
abslibre-214dc4df827125ec8b679605901bedce5da2e7d9.zip
java-jarjar: add new package to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r--pcr/java-jarjar/PKGBUILD51
-rw-r--r--pcr/java-jarjar/jarjar-fix_javadocs.patch19
2 files changed, 70 insertions, 0 deletions
diff --git a/pcr/java-jarjar/PKGBUILD b/pcr/java-jarjar/PKGBUILD
new file mode 100644
index 000000000..7b50bf171
--- /dev/null
+++ b/pcr/java-jarjar/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=jarjar
+pkgname=java-${_pkgname}
+pkgver=1.4
+pkgrel=1
+pkgdesc="Repackage third-party jars"
+arch=('any')
+url="https://code.google.com/p/jarjar/"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('apache-ant' 'java-asm' 'jh' 'maven' 'subversion')
+source=("${_pkgname}-${pkgver}::svn+https://jarjar.googlecode.com/svn/trunk/jarjar/"
+ "jarjar-fix_javadocs.patch")
+md5sums=('SKIP'
+ 'f6f003fe768eaa487a2624d1dba41ce3')
+
+prepare() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ find . -name \*.jar -delete
+ sed -i 's/1\.3/1\.4/g' pom.xml
+ patch -Np1 -i "${srcdir}/jarjar-fix_javadocs.patch"
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+
+ ln -s "/usr/share/java/asm-4.jar" "lib/asm-4.0.jar"
+ ln -s "/usr/share/java/asm-commons-4.jar" "lib/asm-commons-4.0.jar"
+ ln -s "/opt/maven/lib/maven-plugin-api-3.3.3.jar" "lib/maven-plugin-api.jar"
+
+ ant jar javadoc \
+ -Dant.jar=/opt/apache-ant/lib/ant.jar
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+
+ # Install documentation
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r "dist/javadoc" "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ export DESTDIR=${pkgdir}
+ jh mvn-install "com.googlecode.jarjar" ${_pkgname} ${pkgver} \
+ "${srcdir}/${_pkgname}-${pkgver}/pom.xml" \
+ "${srcdir}/${_pkgname}-${pkgver}/dist/${_pkgname}-${pkgver}.jar" \
+ "${_pkgname}.jar"
+ ln -s "/usr/share/java/${_pkgname}.jar" \
+ "${pkgdir}/usr/share/java/${_pkgname}-${pkgver}.jar"
+} \ No newline at end of file
diff --git a/pcr/java-jarjar/jarjar-fix_javadocs.patch b/pcr/java-jarjar/jarjar-fix_javadocs.patch
new file mode 100644
index 000000000..7b9f30f9f
--- /dev/null
+++ b/pcr/java-jarjar/jarjar-fix_javadocs.patch
@@ -0,0 +1,19 @@
+--- jarjar-1.4.orig/build.xml 2015-09-15 03:25:33.873425000 -0500
++++ jarjar-1.4/build.xml 2015-09-15 03:31:32.396310561 -0500
+@@ -262,10 +262,13 @@
+ access="${javadoc.access}"
+ failonerror="true"
+ packagenames="com.tonicsystems.jarjar.*"
+- classpathref="path.run"
+ Author="true"
+ Version="true"
+- Use="true"
+- />
++ Use="true">
++ <classpath>
++ <path refid="path.run"/>
++ <pathelement location="${ant.jar}"/>
++ </classpath>
++ </javadoc>
+ </target>
+ </project>