# Maintainer: Natanael Copa pkgname=postgresql pkgver=9.2.0 pkgrel=0 pkgdesc="A sophisticated object-relational DBMS" url="http://www.postgresql.org/" arch="all" license="BSD" depends="postgresql-client" install="$pkgname.pre-upgrade" depends_dev="readline-dev openssl-dev zlib-dev libxml2-dev" makedepends="$depends_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 pg-restore.initd pg-restore.confd " build() { cd "$srcdir"/$pkgname-$pkgver || return 1 ./configure --prefix=/usr \ --mandir=/usr/share/man \ --with-openssl \ || return 1 make world || return 1 } package() { cd "$srcdir"/$pkgname-$pkgver || return 1 make DESTDIR="$pkgdir" install install-docs || return 1 install -D -m755 "$srcdir"/postgresql.initd \ "$pkgdir"/etc/init.d/postgresql || return 1 install -D -m644 "$srcdir"/postgresql.confd \ "$pkgdir"/etc/conf.d/postgresql || return 1 install -D -m755 "$srcdir"/pg-restore.initd \ "$pkgdir"/etc/init.d/pg-restore || return 1 install -D -m644 "$srcdir"/pg-restore.confd \ "$pkgdir"/etc/conf.d/pg-restore || 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="8c4c32a4abe8cf61b02c8366181ede50 postgresql-9.2.0.tar.bz2 4d2f5be74fae4895db3d993e69bbda10 postgresql.initd b609795f715cefcc30b08e4ed01f4416 postgresql.confd df2d90fc713b4e89fd21abb9e36cd688 pg-restore.initd bf45384752b320b369f1425939763178 pg-restore.confd"