1 # Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
2 # Based on Gentoo ebuild: http://gentoo-portage.com/www-servers/gorg
6 pkgdesc="Back-end XSLT processor for an XML-based web site."
8 url="http://gentoo.neysx.org/mystuff/gorg/gorg.xml"
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')
17 source=(http://gentoo.neysx.org/mystuff/gorg/$pkgname-$pkgver.tgz)
18 md5sums=('e32c7e3b4604a483ec9cdc1af648be8f')
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
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
36 install -d -m 750 -o http -g http "$pkgdir"/var/cache/gorg
39 cp -R etc "$pkgdir"/etc