1 # Maintainer: Leandro de Assis <leandrodiassis@gmail.com>
2 # Contributor: Thomas Dziedzic
7 pkgdesc="Server written in Java that allows users to share and edit geospatial data."
9 url="http://geoserver.org"
11 depends=('java-runtime')
14 pkg=geoserver-$pkgver-$pkgrel-bin.zip
16 source=(http://downloads.sourceforge.net/project/geoserver/GeoServer/$pkgver-$pkgrel/$pkg)
17 md5sums=('3ef93c9bf069e7de619be9bc2f412514')
19 ####################################################
20 # WARNING: GEOSERVER USES A VERY WEIRD CONFIGURATION
21 # FOLDERS NEED TO BE 777 IN /OPT
22 ####################################################
25 # bsdtar will fall on its face with this file :/
28 # remove windows files
29 rm "$srcdir/geoserver-$pkgver-$pkgrel/bin/startup.bat"
30 rm "$srcdir/geoserver-$pkgver-$pkgrel/bin/shutdown.bat"
33 mkdir -p "$pkgdir/opt"
34 cp -r "$srcdir/geoserver-$pkgver-$pkgrel" "$pkgdir/opt"
36 # todo: selectively change file permissions
37 # or find a better way to install geoserver
40 chmod -R a+rwX "$pkgdir/opt/geoserver-$pkgver-$pkgrel"
42 # make custom startup/shutdown links
43 mkdir -p "$pkgdir/usr/bin"
44 ln -s "/opt/geoserver-$pkgver-$pkgrel/bin/startup.sh" "$pkgdir/usr/bin/geoserver-startup"
45 ln -s "/opt/geoserver-$pkgver-$pkgrel/bin/shutdown.sh" "$pkgdir/usr/bin/geoserver-shutdown"
47 # set necessary variables
48 mkdir -p "$pkgdir/etc/profile.d"
49 echo "export GEOSERVER_HOME=/opt/geoserver-$pkgver-$pkgrel" > "$pkgdir/etc/profile.d/geoserver.sh"
50 chmod +x "$pkgdir/etc/profile.d/geoserver.sh"