blob: 5ba2be0065eab1f26bb5e159585417d454286705 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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"
}
|