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

Revision 29460, 2.1 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-tools-svn
3pkgver=r29457
4pkgrel=1
5pkgdesc="Tools for working with Greenstone collections."
6url="http://greenstone.org"
7arch=('i686' 'x86_64')
8license=('GPLv2')
9depends=(
10  'java-runtime=7'
11  'wv'
12  'perl'
13  'perl-xml-parser'
14  'perl-text-iconv'
15  'imagemagick'
16)
17optdepends=()
18makedepends=(
19  'svn'
20  'apache-ant'
21  'patch'
22  'autoconf'
23  'gcc'
24  'make'
25)
26provides=('greenstone-tools')
27# conflicts=()
28# replaces=()
29# backup=()
30# install=''
31source=(
32  "$pkgname::svn+http://svn.greenstone.org/main/trunk/greenstone3/"
33  'build.properties'
34  'gs2build.patch'
35  'perl-util.patch'
36  'wvWare'
37  'greenstone'
38)
39md5sums=(
40  'SKIP'
41  'SKIP' # TODO: add build.properties MD5 here
42  'SKIP' # TODO: add gs2build.patch MD5 here
43  'SKIP' # TODO: add perl-util.patch MD5 here
44  'SKIP' # TODO: add wvWare MD5 here
45  'SKIP' # TODO: add greenstone MD5 here
46)
47
48pkgver() {
49  cd "$pkgname"
50  local ver="$(svnversion)"
51  printf "r%s" "${ver//[[:alpha:]]}"
52}
53
54prepare() {
55  cd "${srcdir}/${pkgname}"
56  export JAVA_HOME=/usr/lib/jvm/default
57  cp -L ../build.properties .
58  yes | ant prepare
59  # disable gs2build packages
60  patch -p0 -i ../gs2build.patch
61  pushd gs2build/build-src
62  autoconf
63  popd
64  # rm -rf packages
65  rm -rf packages/*.zip
66  rm -rf packages/axis/docs
67  # rm -rf src/packages
68  # rm -rf gs2build/common-src/packages
69  rm -rf gs2build/build-src/packages
70}
71
72build() {
73  cd "${srcdir}/${pkgname}"
74  export JAVA_HOME=/usr/lib/jvm/default
75  ant install
76  patch -p0 -i ../perl-util.patch
77  cp -L ${srcdir}/wvWare gs2build/bin/linux/wvWare
78  find . -type d \( -name ".svn" -o -iname "win32" -o -iname "windows" -o -iname "darwin" \) -exec rm -rf {} \; 2>/dev/null || :
79  find . \( -iname "*.dll" -o -iname "*.exe" \) -exec rm -rf {} \; || :
80  rm -rf src/ gs2build/build-src/ gs2build/common-src/ gs2build/collect/demo/ winutil/
81}
82
83package() {
84  install -d ${pkgdir}/opt/greenstone
85  cp -r ${srcdir}/${pkgname}/gs2build ${pkgdir}/opt/greenstone/
86  cp -r ${srcdir}/${pkgname}/bin ${pkgdir}/opt/greenstone/
87  install -Dm755 ${srcdir}/greenstone ${pkgdir}/usr/bin/greenstone
88}
89
90# vim:expandtab:ts=2:sw=2:
91
Note: See TracBrowser for help on using the browser.