diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2015-09-11 01:27:59 -0500 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-09-22 16:15:02 -0300 |
commit | db401cffb7f79a20ffab3cf1e503d3218b4cb6aa (patch) | |
tree | e04db456ffc6897ae8ca4372ea3ece30f085cbbb | |
parent | 4cd77584e912b67f3cb9f52052148c2bf82a243e (diff) | |
download | abslibre-db401cffb7f79a20ffab3cf1e503d3218b4cb6aa.tar.gz abslibre-db401cffb7f79a20ffab3cf1e503d3218b4cb6aa.tar.bz2 abslibre-db401cffb7f79a20ffab3cf1e503d3218b4cb6aa.zip |
java-cdi-api: add new package to [pcr]
-rw-r--r-- | pcr/java-cdi-api/PKGBUILD | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pcr/java-cdi-api/PKGBUILD b/pcr/java-cdi-api/PKGBUILD new file mode 100644 index 000000000..e8e8eaec8 --- /dev/null +++ b/pcr/java-cdi-api/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> + +_pkgname=cdi-api +pkgname=java-${_pkgname} +pkgver=1.0 +pkgrel=1 +pkgdesc="Contexts and Dependency Injection for Java EE" +arch=('any') +url="http://jcp.org/en/jsr/detail?id=299" +license=('APACHE') +depends=('java-runtime') +makedepends=('java-environment' 'java-atinject' 'java-geronimo-interceptor' 'jh' 'tomcat8') +source=("https://repo1.maven.org/maven2/javax/enterprise/${_pkgname}/${pkgver}/${_pkgname}-${pkgver}-sources.jar" + "http://repo1.maven.org/maven2/javax/enterprise/${_pkgname}/${pkgver}/${_pkgname}-${pkgver}.pom") +md5sums=('0983b1211c11890d334b4f9907345e99' + 'b6bb2319d6475dd376d2b5719988b03e') + +prepare() { + cd ${srcdir} + rm -rv META-INF + rm -v beans.xsd + mkdir -p build/classes +} + +build() { + cd ${srcdir} + CLASSPATH="/usr/share/java/javax.inject.jar" + CLASSPATH="$CLASSPATH:/usr/share/java/tomcat8/el-api.jar" + CLASSPATH="$CLASSPATH:/usr/share/java/geronimo-interceptor_3.0_spec.jar" + javac -classpath $CLASSPATH -d build/classes $(find . -name \*.java) + javadoc -classpath $CLASSPATH -d build/javadoc -sourcepath . -subpackages javax + + jar -cvf "${_pkgname}.jar" -C build/classes . +} + +package() { + cd "${srcdir}" + + # 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 "javax.enterprise" ${_pkgname} ${pkgver} \ + "${srcdir}/${_pkgname}-${pkgver}.pom" \ + "${srcdir}/${_pkgname}.jar" \ + "${_pkgname}.jar" + ln -s "/usr/share/java/${_pkgname}.jar" \ + "${pkgdir}/usr/share/java/${_pkgname}-${pkgver}.jar" +} |