updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / gorg / PKGBUILD
blob030c41437e7442cf0cc6bf855837acc8d6230ea0
1 # Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
2 # Based on Gentoo ebuild: http://gentoo-portage.com/www-servers/gorg
3 pkgname=gorg
4 pkgver=0.6.3
5 pkgrel=1
6 pkgdesc="Back-end XSLT processor for an XML-based web site."
7 arch=('i686' 'x86_64')
8 url="http://gentoo.neysx.org/mystuff/gorg/gorg.xml"
9 license=('GPL')
10 depends=('libxml2>=2.6.16' 'libxslt>=1.1.12' 'ruby')
11 optdepends=('apache: for usage with Apache'
12              'ruby-fcgi: for fast CGI support'
13              'mysql-ruby: for MySQL support'
14              'ruby-dbi: for MySQL support')
15 backup=('etc/gorg/gorg.conf')
16 options=('emptydirs')
17 source=(http://gentoo.neysx.org/mystuff/gorg/$pkgname-$pkgver.tgz)
18 md5sums=('e32c7e3b4604a483ec9cdc1af648be8f')
20 build() {
21   cd "$srcdir/$pkgname-$pkgver"
23   # Fix listen issue with webrick
24   sed -e 's/WEBrick::HTTPServer.new(/WEBrick::HTTPServer.new( :BindAddress=>"127.0.0.1",/' -i lib/gorg/www.rb
26   ruby setup.rb config --prefix=/usr
27   ruby setup.rb setup
28   ruby setup.rb install --prefix="$pkgdir"
30   # install doesn't seem to chmod these correctly, forcing it here
31   _sitelibdir=$(ruby -r rbconfig -e 'puts Config::CONFIG["sitelibdir"]')
32   chmod +x "$pkgdir"/$_sitelibdir/gorg/cgi-bin/*.cgi
33   chmod +x "$pkgdir"/$_sitelibdir/gorg/fcgi-bin/*.fcgi
35   # Add cache dir
36   install -d -m 750 -o http -g http "$pkgdir"/var/cache/gorg
38   # Copy sample configs
39   cp -R etc "$pkgdir"/etc