root/main/trunk/package-kits/linux/pacman/main/PKGBUILD @ 29460

Revision 29460, 2.3 KB (checked in by jts21, 6 years ago)

Initial commit for linux packages. Contains scripts and patches, and package definitions for pacman.

Line 
1# Maintainer: Jeremy Symon <jtsymon@gmail.com>
2pkgname=greenstone-svn
3pkgver=r29457
4pkgrel=1
5pkgdesc="Greenstone is a suite of software for building and distributing digital library collections."
6url="http://greenstone.org"
7arch=('i686' 'x86_64')
8license=('GPLv2')
9depends=(
10  'java-runtime=7'
11  'tomcat7'
12  'tomcat-native'
13)
14optdepends=()
15makedepends=(
16  'java-environment=7'
17  'svn'
18  'apache-ant'
19  'patch'
20  'autoconf'
21  'gcc'
22  'make'
23)
24provides=('greenstone')
25# conflicts=()
26# replaces=()
27# backup=()
28# install=''
29source=(
30  "$pkgname::svn+http://svn.greenstone.org/main/trunk/greenstone3/"
31  'build.properties'
32  'gs2build.patch'
33  'greenstone3.xml'
34)
35md5sums=(
36  'SKIP'
37  'SKIP' # TODO: add build.properties MD5 here
38  'SKIP' # TODO: add gs2build.patch MD5 here
39  'SKIP' # TODO: add greenstone3.xml MD5 here
40)
41
42pkgver() {
43  cd "$pkgname"
44  local ver="$(svnversion)"
45  printf "r%s" "${ver//[[:alpha:]]}"
46}
47
48prepare() {
49  cd "${srcdir}/${pkgname}"
50  export JAVA_HOME=/usr/lib/jvm/default
51  cp -L ../build.properties .
52  yes | ant prepare
53  # disable gs2build packages
54  patch -p0 -i ../gs2build.patch
55  pushd gs2build/build-src
56  autoconf
57  popd
58  # rm -rf packages
59  rm -rf packages/*.zip
60  rm -rf packages/axis/docs
61  # rm -rf src/packages
62  # rm -rf gs2build/common-src/packages
63  rm -rf gs2build/build-src/packages
64}
65
66build() {
67  cd "${srcdir}/${pkgname}"
68  export JAVA_HOME=/usr/lib/jvm/default
69  ant install
70  mv lib/jni/*.jar web/WEB-INF/lib/
71  find . -type d \( -name ".svn" -o -iname "win32" -o -iname "windows" -o -iname "darwin" \) -exec rm -rf {} \; 2>/dev/null || :
72  find . \( -iname "*.dll" -o -iname "*.exe" \) -exec rm -rf {} \; || :
73  rm -rf web/sites/localsite/collect/*
74}
75
76package() {
77  install -d ${pkgdir}/srv/gsdl ${pkgdir}/usr/lib ${pkgdir}/usr/share/java/tomcat7
78  install -dm775 ${pkgdir}/etc/tomcat7/Catalina
79  install -Dm755 ${srcdir}/${pkgname}/lib/jni/*.so ${pkgdir}/usr/lib/
80  cp -rT ${srcdir}/${pkgname}/web ${pkgdir}/srv/gsdl/
81  install -Dm644 ${srcdir}/greenstone3.xml ${pkgdir}/etc/tomcat7/Catalina/localhost/greenstone3.xml
82  # derby.jar must be in the tomcat lib folder instead of the greenstone lib folder:
83  # http://stackoverflow.com/questions/24963117/tomcat-realm-forms-login-always-fails
84  mv ${pkgdir}/srv/gsdl/WEB-INF/lib/derby.jar ${pkgdir}/usr/share/java/tomcat7/
85}
86
87# vim:expandtab:ts=2:sw=2:
88
Note: See TracBrowser for help on using the browser.