summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-09-15 06:19:27 -0500
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-09-22 16:15:04 -0300
commit92646a997779568f3a12367564d47a5edde70989 (patch)
tree452641b78b83aca8c2df34a29e7c685484f37ca5 /pcr
parent27e7b882400b7648085c77e0adc90a138f5515e5 (diff)
downloadabslibre-92646a997779568f3a12367564d47a5edde70989.tar.gz
abslibre-92646a997779568f3a12367564d47a5edde70989.tar.bz2
abslibre-92646a997779568f3a12367564d47a5edde70989.zip
cglib: add new package to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r--pcr/cglib/PKGBUILD60
-rw-r--r--pcr/cglib/cglib-jarjar.patch11
2 files changed, 71 insertions, 0 deletions
diff --git a/pcr/cglib/PKGBUILD b/pcr/cglib/PKGBUILD
new file mode 100644
index 000000000..e003662ae
--- /dev/null
+++ b/pcr/cglib/PKGBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+pkgname=cglib
+pkgver=3.1
+pkgrel=1
+pkgdesc="Code generation library for Java"
+arch=('any')
+url="https://github.com/cglib/cglib"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('apache-ant' 'java-asm' 'java-jarjar' 'jh')
+source=("https://github.com/${pkgname}/${pkgname}/archive/RELEASE_${pkgver//./_}.tar.gz"
+ "https://repo1.maven.org/maven2/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.pom"
+ "https://repo1.maven.org/maven2/${pkgname}/${pkgname}-nodep/${pkgver}/${pkgname}-nodep-${pkgver}.pom"
+ "cglib-jarjar.patch")
+md5sums=('6886df33b07c65e23b6a8aed9ae01ae4'
+ 'cdcb12866a7e341e89ad7c3bf9c19b71'
+ '41cbb7bc608af67c661ebbd1ac936e23'
+ '09f089fc00ad12f8df31d35533444152')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-RELEASE_${pkgver//./_}"
+ find . -name \*.jar -delete
+ patch -Np1 -i "${srcdir}/cglib-jarjar.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-RELEASE_${pkgver//./_}"
+ ant jar javadoc \
+ -lib "/usr/share/java/asm-4.jar" \
+ -lib "/usr/share/java/asm-util-4.jar" \
+ -lib "/usr/share/java/jarjar.jar"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-RELEASE_${pkgver//./_}"
+
+ # Install license file
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+
+ # Install documentation
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r "docs" "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ export DESTDIR=${pkgdir}
+ jh mvn-install ${pkgname} ${pkgname} ${pkgver} \
+ "${srcdir}/${pkgname}-${pkgver}.pom" \
+ "${srcdir}/${pkgname}-RELEASE_${pkgver//./_}/dist/${pkgname}-${pkgver}.jar" \
+ "${pkgname}.jar"
+ jh mvn-install ${pkgname} "${pkgname}-nodep" ${pkgver} \
+ "${srcdir}/${pkgname}-nodep-${pkgver}.pom" \
+ "${srcdir}/${pkgname}-RELEASE_${pkgver//./_}/dist/${pkgname}-nodep-${pkgver}.jar" \
+ "${pkgname}-nodep.jar"
+
+ ln -s "/usr/share/java/${pkgname}.jar" \
+ "${pkgdir}/usr/share/java/${pkgname}-${pkgver}.jar"
+ ln -s "/usr/share/java/${pkgname}-nodep.jar" \
+ "${pkgdir}/usr/share/java/${pkgname}-nodep-${pkgver}.jar"
+}
diff --git a/pcr/cglib/cglib-jarjar.patch b/pcr/cglib/cglib-jarjar.patch
new file mode 100644
index 000000000..7feee1043
--- /dev/null
+++ b/pcr/cglib/cglib-jarjar.patch
@@ -0,0 +1,11 @@
+--- cglib-RELEASE_3_1.orig/build.xml 2013-12-07 11:08:18.000000000 -0500
++++ cglib-RELEASE_3_1/build.xml 2015-09-15 05:59:33.863523848 -0500
+@@ -127,7 +127,7 @@
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="compile.classpath"/>
+ <jarjar basedir="${build.home}/classes" jarfile="${dist.home}/${component.name}-nodep-${component.version}.jar" >
+ <zipfileset dir="lib" includes="asm*.txt"/>
+- <zipfileset src="lib/asm-4.2.jar" excludes="META-INF"/>
++ <zipfileset src="/usr/share/java/asm-all-4.jar" excludes="META-INF"/>
+ <rule pattern="org.objectweb.asm.**" result="net.sf.cglib.asm.@1"/>
+ <include name="**/*"/>
+ <exclude name="samples/**"/>