summaryrefslogtreecommitdiff
path: root/pcr/cglib
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/cglib')
-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/**"/>