blob: d71f7346ae8ed1a097a475453da7cc77d0b9173f (
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
|
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
_pkgname=log4j
pkgname=${_pkgname}-1.2
pkgver=1.2.17
pkgrel=1
pkgdesc="Logging library for java"
arch=('any')
url="http://logging.apache.org/log4j/1.2/"
license=('APACHE')
depends=('java-runtime')
makedepends=('apache-ant' 'javamail' 'java-geronimo-jms' 'jh')
source=("https://archive.apache.org/dist/logging/${_pkgname}/${pkgver}/${_pkgname}-${pkgver}.tar.gz"
"apache-log4j-remove_activation_framework.patch"
"apache-log4j-add_missing_classes.patch"
"apache-log4j-build_fix.patch")
md5sums=('8218714e41ee0c6509dcfeafa2e1f53f'
'4417d091786330e001dbaac991e17bfe'
'36450de9f2659c813b7edb8185545f4c'
'f1a4cf990676af4726facad677ebe801')
prepare() {
cd "${srcdir}/apache-${_pkgname}-${pkgver}"
patch -Np1 -i "${srcdir}/apache-log4j-remove_activation_framework.patch"
patch -Np1 -i "${srcdir}/apache-log4j-add_missing_classes.patch"
patch -Np1 -i "${srcdir}/apache-log4j-build_fix.patch"
rm -rv {contribs,site,tests}
rm -v $(find . -name \*.jar)
}
build() {
cd "${srcdir}/apache-${_pkgname}-${pkgver}"
ant clean jar javadoc \
-Djavamail.jar=/usr/share/java/javax.mail.jar \
-Dgeronimo-jms.jar=/usr/share/java/geronimo-jms_1.1_spec.jar
}
package() {
cd "${srcdir}/apache-${_pkgname}-${pkgver}"
# Install license file
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
# Install documentation
install -d "${pkgdir}/usr/share/doc/${pkgname}"
cp -r "docs/api" "${pkgdir}/usr/share/doc/${pkgname}"
cp -r "examples" "${pkgdir}/usr/share/doc/${pkgname}"
# Install Maven artifacts
export DESTDIR=${pkgdir}
jh mvn-install ${_pkgname} ${_pkgname} ${pkgver} \
"pom.xml" \
"dist/lib/${_pkgname}-${pkgver}.jar" \
"${_pkgname}-1.2.jar"
ln -s "/usr/share/java/${_pkgname}-1.2.jar" \
"${pkgdir}/usr/share/java/${_pkgname}-${pkgver}.jar"
}
|