-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
33 lines (28 loc) · 940 Bytes
/
PKGBUILD
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
pkgname=$(basename $(pwd))
pkgver=0.17
pkgrel=1
pkgdesc='diet4j Java module examples'
arch=('any')
url="http://jdiet.org/"
license=('Apache')
makedepends=('maven' 'jdk8-openjdk' )
depends=('java-runtime' 'java-jsvc' 'diet4j')
prepare() {
# Set pom.xml versions correctly; depends on XML-comment-based markup in pom.xml files
# This is a great big hack, but does the job
find ${startdir} -path ${startdir}/pkg -prune -o -name pom.xml -exec perl -pi -e "s/(?<=\<\!-- PKGVER -->)(\d+(\.\d+)+)(?=\<\!-- \/PKGVER -->)/${pkgver}/g" {} \;
}
build() {
cd ${startdir}
mvn package install ${MVN_OPTS}
}
package() {
# Jars
installOne 'diet4j-examples-activate'
installOne 'diet4j-examples-one'
installOne 'diet4j-examples-utils'
}
installOne() {
local name=$1
install -m644 -D ${startdir}/${name}/target/${name}-${pkgver}.jar ${pkgdir}/usr/lib/java/org/diet4j/${name}/${pkgver}/${name}-${pkgver}.jar
}