updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / postgresql-git / PKGBUILD
blob407e1f69d6c42ad345e2220b528bfd66456afb3e
1 # Maintainer: Marti Raudsepp <marti@juffo.org>
2 # Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
4 pkgname=postgresql-git
5 pkgver=20101109
6 pkgrel=1
7 pkgdesc="git build of the PostgreSQL database (includes both server and libs)"
8 arch=(i686 x86_64)
9 license=('custom:PostgreSQL')
10 backup=('etc/conf.d/postgresql' 'etc/pam.d/postgresql')
11 url="http://www.postgresql.org/developer/alpha"
12 options=(!strip) # to facilitate debugging of testing builds
13 depends=('libxml2' 'readline>=6.0' 'openssl' 'bash')
14 makedepends=('python2' 'perl')
15 conflicts=('postgresql-libs' 'postgresql' 'postgresql-testing')
16 provides=("postgresql-libs=9.1alpha2" "postgresql=9.1alpha2")
17 source=(postgresql.rc postgresql.confd postgresql.pam)
18 md5sums=('86e0161343ce80e544aba999f284bc88'
19          'df6ddf9e2ab4700a3415f17c0f4f4172'
20          '96f82c38f3f540b53f3e5144900acf17')
22 # Slow git server is slow, use Github mirror instead
23 #_gitroot="git://git.postgresql.org/git/postgresql.git"
24 _gitroot="git://github.com/postgres/postgres.git"
25 _gitname="postgresql"
27 build() {
28   cd "$srcdir"
29   msg "Connecting to GIT server...."
31   if [ -d $_gitname ] ; then
32     cd $_gitname && git pull origin
33     msg "The local files are updated."
34   else
35     git clone $_gitroot $_gitname
36   fi
38   msg "GIT checkout done or server timeout"
39   msg "Starting make..."
41   rm -rf "$srcdir/$_gitname-build"
42   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
43   cd "$srcdir/$_gitname-build"
45   ./configure --prefix=/usr --mandir=/usr/share/man --with-libxml \
46         --with-openssl --with-perl \
47         --with-python PYTHON=/usr/bin/python2 --with-pam \
48         --with-system-tzdata=/usr/share/zoneinfo --enable-nls \
49         --datadir=/usr/share/postgresql --enable-thread-safety
51   make
52   make DESTDIR=$pkgdir install
54   # build all contrib modules
55   make -C contrib
56   make -C contrib DESTDIR=$pkgdir install
58   install -D -m755 $srcdir/postgresql.rc $pkgdir/etc/rc.d/postgresql
59   install -D -m644 COPYRIGHT $pkgdir/usr/share/licenses/postgresql/LICENSE
60   install -D -m644 $srcdir/postgresql.confd $pkgdir/etc/conf.d/postgresql
61   install -D -m644 $srcdir/postgresql.pam $pkgdir/etc/pam.d/postgresql