updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / mod_ruby-git / PKGBUILD
blob2ec288c1f95f7ea929a0cd57f162ebd18c0e2a35
1 # $Id:$
2 # Contributor: Balwinder S Dheeman <bdheeman@gmail.com>
4 pkgname=mod_ruby-git
5 _realname=mod_ruby
6 pkgver=20091214
7 pkgrel=1
8 pkgdesc="Embeds the Ruby interpreter into Apache"
9 arch=('i686' 'x86_64')
10 url='http://www.modruby.net/'
11 license=('Apache')
12 depends=('apache>=1.3.3' 'apr>=1.0.0' 'ruby>=1.6.4')
13 makedepends=('rsync' 'subversion')
14 conflicts=(${_realname})
15 provides=(${_realname})
16 replaces=(${_realname})
17 backup=('etc/httpd/conf/include.d/httpd-ruby.conf')
18 install=${_realname}.install
20 _gitroot=git://github.com/shugo/mod_ruby.git
21 _gitname=${_realname}
23 source=('httpd.conf.patch')
25 build() {
26     msg "Connecting to GIT server..."
27     cd $srcdir
28     if [ -d "${_gitname}/.git" ] ; then
29         cd $srcdir/${_gitname}
30         git pull --rebase
31     else
32         git clone --depth 1 ${_gitroot}
33         test -d ${_gitname} && cd ${_gitname} || return $?
34     fi
35     msg "GIT checkout done or server timeout"
37     msg "Preparing builddir..."
38     rsync -av --delete --exclude '.git*' $srcdir/${_gitname}/ $srcdir/${_gitname}-build
39     cd $srcdir/${_gitname}-build || return $?
40     patch -p1 < $srcdir/httpd.conf.patch || return $?
42     msg "Running ./configure..."
43     ./configure.rb --prefix=/usr \
44         --with-apr-includes=/usr/include/apr-1 \
45         --with-apxs=/usr/sbin/apxs || return 1
47     msg "Running make all install..."
48     make || return 1
49     make DESTDIR=$pkgdir install || return 1
51     msg "Making it nice..."
52     install -Dm644 $srcdir/${_gitname}-build/examples/httpd.conf \
53         $pkgdir/etc/httpd/conf/include.d/httpd-ruby.conf
56 # vim:set ts=4 sw=4 et:
57 md5sums=('22fdaa71babd7d58edd1cf92709167fd')