summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-09-10 17:27:40 -0500
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-09-22 16:15:02 -0300
commit0d73d71673d1a3b212e7bf51d62f3123a0621cb8 (patch)
treef64dfb6a5c77acf3fb299c64173f54a80a84ec81 /pcr
parent265da48502084f13af6fa9db60770c58f5f61db6 (diff)
downloadabslibre-0d73d71673d1a3b212e7bf51d62f3123a0621cb8.tar.gz
abslibre-0d73d71673d1a3b212e7bf51d62f3123a0621cb8.tar.bz2
abslibre-0d73d71673d1a3b212e7bf51d62f3123a0621cb8.zip
java-atinject: add new package to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r--pcr/java-atinject/PKGBUILD62
1 files changed, 62 insertions, 0 deletions
diff --git a/pcr/java-atinject/PKGBUILD b/pcr/java-atinject/PKGBUILD
new file mode 100644
index 000000000..893c73bb4
--- /dev/null
+++ b/pcr/java-atinject/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=javax.inject
+pkgname=java-atinject
+pkgver=1
+pkgrel=1
+pkgdesc="Java API for JSR-330 Dependency Injection"
+arch=('any')
+url="https://code.google.com/p/atinject/"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('java-environment' 'jh' 'junit' 'subversion')
+source=("${pkgname}-${pkgver}::svn+https://atinject.googlecode.com/svn/tags/${pkgver}/"
+ "https://repo1.maven.org/maven2/javax/inject/${_pkgname}-tck/${pkgver}/${_pkgname}-tck-${pkgver}.pom")
+md5sums=('SKIP'
+ '4895a3d4064b3197f2f8c1aa65bae3c3')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ rm -rv lib
+ rm -v "atinject."{iml,ipr}
+ rm -v build.sh
+ rm -v tck/tck.iml
+ mkdir -p build/classes
+ mkdir -p build/tck/classes
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ CLASSPATH="build/classes:/usr/share/java/junit.jar"
+ javac -d build/classes $(find src -name \*.java)
+ javac -classpath $CLASSPATH -d build/tck/classes $(find tck -name \*.java)
+ javadoc -classpath $CLASSPATH -sourcepath "src:tck" -d build/javadoc \
+ javax.inject org.atinject.tck org.atinject.tck.auto org.atinject.tck.auto.accessories
+
+ jar -cvf "${_pkgname}.jar" -C build/classes .
+ jar -cvf "${_pkgname}-tck.jar" -C build/tck/classes .
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # 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 ${_pkgname} ${_pkgname} ${pkgver} \
+ "${srcdir}/${pkgname}-${pkgver}/pom.xml" \
+ "${srcdir}/${pkgname}-${pkgver}/${_pkgname}.jar" \
+ "${_pkgname}.jar"
+ jh mvn-install ${_pkgname} "${_pkgname}-tck" ${pkgver} \
+ "${srcdir}/${_pkgname}-tck-${pkgver}.pom" \
+ "${srcdir}/${pkgname}-${pkgver}/${_pkgname}-tck.jar" \
+ "${_pkgname}-tck.jar"
+ ln -s "/usr/share/java/${_pkgname}.jar" \
+ "${pkgdir}/usr/share/java/${_pkgname}-${pkgver}.jar"
+ ln -s "/usr/share/java/${_pkgname}-tck.jar" \
+ "${pkgdir}/usr/share/java/${_pkgname}-tck-${pkgver}.jar"
+} \ No newline at end of file