summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-09-14 05:34:01 -0500
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-09-22 16:15:04 -0300
commit941da23b5d74e3976a2695dad0bffacb7c237f67 (patch)
tree04c0f5c597c3f12c6eb9b021ffc7866db254af52 /libre
parent9907960b0b70dcdf6d43f7cbb63a57bc6f6f4f73 (diff)
java-commons-logging: add new package to [libre]
Diffstat (limited to 'libre')
-rw-r--r--libre/java-commons-logging/PKGBUILD65
1 files changed, 65 insertions, 0 deletions
diff --git a/libre/java-commons-logging/PKGBUILD b/libre/java-commons-logging/PKGBUILD
new file mode 100644
index 000000000..5ba2be006
--- /dev/null
+++ b/libre/java-commons-logging/PKGBUILD
@@ -0,0 +1,65 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=commons-logging
+pkgname=java-${_pkgname}
+pkgver=1.2
+pkgrel=1.parabola1
+pkgdesc="Wrapper interface for logging APIs in Java"
+arch=('any')
+url="https://commons.apache.org/logging/"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('apache-ant' 'jh' 'junit' 'tomcat8')
+source=("https://archive.apache.org/dist/commons/logging/source/${_pkgname}-${pkgver}-src.tar.gz"
+ "https://repo1.maven.org/maven2/${_pkgname}/${_pkgname}-api/1.1/${_pkgname}-api-1.1.pom")
+md5sums=('ce977548f1cbf46918e93cd38ac35163'
+ '48ed0c8f5fbfa18fb0ddc39830a9c0ac')
+
+prepare() {
+ cd "${srcdir}/${_pkgname}-${pkgver}-src"
+ mv "../${_pkgname}-api-1.1.pom" pom-api.xml
+ sed -i 's/1\.1/1\.2/g' pom-api.xml
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}-${pkgver}-src"
+ ant dist \
+ -Dservletapi.jar=/usr/share/java/tomcat8/servlet-api.jar
+
+ # Build docs
+ javadoc -sourcepath "src/main/java" -d "target/docs/apidocs" \
+ org.apache.commons.logging org.apache.commons.logging.impl
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}-${pkgver}-src"
+
+ # Install license file
+ install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+
+ # Install documentation
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r "target/docs/apidocs" "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ export DESTDIR=${pkgdir}
+ jh mvn-install ${_pkgname} ${_pkgname} ${pkgver} \
+ "${srcdir}/${_pkgname}-${pkgver}-src/pom.xml" \
+ "${srcdir}/${_pkgname}-${pkgver}-src/target/${_pkgname}-${pkgver}.jar" \
+ "${_pkgname}.jar"
+ jh mvn-install ${_pkgname} "${_pkgname}-api" ${pkgver} \
+ "${srcdir}/${_pkgname}-${pkgver}-src/pom-api.xml" \
+ "${srcdir}/${_pkgname}-${pkgver}-src/target/${_pkgname}-api-${pkgver}.jar" \
+ "${_pkgname}-api.jar"
+
+ ln -s "/usr/share/java/${_pkgname}.jar" \
+ "${pkgdir}/usr/share/java/${_pkgname}-${pkgver}.jar"
+ ln -s "/usr/share/java/${_pkgname}-api.jar" \
+ "${pkgdir}/usr/share/java/${_pkgname}-api-${pkgver}.jar"
+
+ # Install commons-logging-adapters.jar
+ install -Dm644 "target/${_pkgname}-adapters-${pkgver}.jar" \
+ "${pkgdir}/usr/share/java/${_pkgname}-adapters-${pkgver}.jar"
+ ln -s "/usr/share/java/${_pkgname}-adapters-${pkgver}.jar" \
+ "${pkgdir}/usr/share/java/${_pkgname}-adapters.jar"
+}