# Maintainer: Natanael Copa pkgname=postgresql pkgver=8.4.2 pkgrel=0 pkgdesc="A sophisticated object-relational DBMS" url="http://www.postgresql.org/" license="BSD" depends="bbsuid" install="$pkgname.pre-upgrade" makedepends="readline-dev openssl-dev zlib-dev" subpackages="$pkgname-dev $pkgname-doc libpq $pkgname-client" source="ftp://ftp.$pkgname.org/pub/source/v$pkgver/$pkgname-$pkgver.tar.bz2 $pkgname.initd $pkgname.confd " build() { cd "$srcdir"/$pkgname-$pkgver || return 1 ./configure --prefix=/usr \ --mandir=/usr/share/man \ --with-docdir=/usr/share/doc \ --with-openssl \ || return 1 make || return 1 } package() { cd "$srcdir"/$pkgname-$pkgver || return 1 make DESTDIR="$pkgdir" install || return 1 install -D -m755 "$srcdir"/postgresql.initd \ "$pkgdir"/etc/init.d/postgresql install -D -m644 "$srcdir"/postgresql.confd \ "$pkgdir"/etc/conf.d/postgresql || return 1 } libpq() { depends= pkgdesc="PostgreSQL libraries" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libpq.so* "$subpkgdir"/usr/lib/ } client() { depends= pkgdesc="PostgreSQL client" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/psql "$subpkgdir"/usr/bin/ } md5sums="d738227e2f1f742d2f2d4ab56496c5c6 postgresql-8.4.2.tar.bz2 6e02f36bd20d1dadfeccfd5605772014 postgresql.initd 7de7cda1ed7733b64d1db0d7375fec8a postgresql.confd"