summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-03-08 18:51:44 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-03-08 18:51:44 -0500
commit2a49fa31b0c038704ef3593f19fbedb0bd20f71c (patch)
treefc252f0c0b34bc9d7fe74e9cb8ba7aa857af4452 /pcr
parentbbf377ed3f78637fd172845d47feab2742cf15a0 (diff)
downloadabslibre-2a49fa31b0c038704ef3593f19fbedb0bd20f71c.tar.gz
abslibre-2a49fa31b0c038704ef3593f19fbedb0bd20f71c.tar.bz2
abslibre-2a49fa31b0c038704ef3593f19fbedb0bd20f71c.zip
jsr305: add new package to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r--pcr/jsr305/PKGBUILD50
-rw-r--r--pcr/jsr305/jsr305-build_javadoc.patch38
2 files changed, 88 insertions, 0 deletions
diff --git a/pcr/jsr305/PKGBUILD b/pcr/jsr305/PKGBUILD
new file mode 100644
index 000000000..d3edc2771
--- /dev/null
+++ b/pcr/jsr305/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+pkgname=jsr305
+pkgver=0.1
+pkgrel=1
+pkgdesc="Annotations for Software Defect Detection in Java"
+arch=('any')
+url="https://code.google.com/p/jsr-305/"
+license=('BSD')
+depends=('java-runtime')
+makedepends=('subversion' 'apache-ant' 'jh')
+source=("${pkgname}::svn+http://jsr-305.googlecode.com/svn/trunk/#revision=51"
+ 'jsr305-build_javadoc.patch')
+md5sums=('SKIP'
+ '3da9aa214b2a8e10168baf9c0a828d94')
+
+prepare() {
+ cd "${srcdir}/${pkgname}"
+ sed -i '6,11d' ri/pom.xml
+ sed -i 's/-SNAPSHOT//g' ri/pom.xml
+ sed -i 's/org.jsr-305/com.google.code.findbugs/g' ri/pom.xml
+ sed -i 's/>ri/>jsr305/g' ri/pom.xml
+
+ patch -Np1 -i "${srcdir}/jsr305-build_javadoc.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}/ri"
+ ant
+}
+
+package() {
+ cd "${srcdir}/${pkgname}/ri"
+ # Install license file
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # Install documentation
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r "build/javadoc" "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ export DESTDIR=${pkgdir}
+ jh mvn-install "com.google.code.findbugs" ${pkgname} ${pkgver} \
+ "pom.xml" \
+ "build/${pkgname}.jar" \
+ "${pkgname}-${pkgver}.jar"
+
+ ln -s "/usr/share/java/${pkgname}-${pkgver}.jar" \
+ "${pkgdir}/usr/share/java/${pkgname}.jar"
+} \ No newline at end of file
diff --git a/pcr/jsr305/jsr305-build_javadoc.patch b/pcr/jsr305/jsr305-build_javadoc.patch
new file mode 100644
index 000000000..56e77d7a2
--- /dev/null
+++ b/pcr/jsr305/jsr305-build_javadoc.patch
@@ -0,0 +1,38 @@
+--- jsr305.orig/ri/build.xml 2016-03-08 03:37:12.605478000 -0500
++++ jsr305/ri/build.xml 2016-03-08 04:35:09.059978051 -0500
+@@ -2,7 +2,7 @@
+ <project name="JSR305-ri" default="build">
+
+
+- <target name="build" depends="clean,classes,jars"/>
++ <target name="build" depends="clean,classes,javadoc,jars"/>
+ <target name="classes">
+ <mkdir dir="build/classes"/>
+ <javac destdir="build/classes" source="1.5" target="1.5" debug="on">
+@@ -15,6 +15,7 @@
+
+ <target name="clean">
+ <delete dir="build/classes"/>
++ <delete dir="build/javadoc"/>
+ </target>
+ <target name="jars" depends="classes">
+ <delete quiet="true">
+@@ -33,6 +34,18 @@
+ <fileset dir="src/main/resources"/>
+ </jar>
+ </target>
++ <target name="javadoc" depends="classes">
++ <mkdir dir="build/javadoc"/>
++ <javadoc
++ sourcepath="src/main/java"
++ destdir="build/javadoc"
++ packagenames="javax.annotation.*"
++ version="true"
++ use="true"
++ author="true"
++ failonerror="true">
++ </javadoc>
++ </target>
+ </project>
+
+ <!-- vim:set ts=4: -->