diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-26 23:19:30 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-12-13 17:24:32 +0100 |
commit | 64c2ce0f3fdae29465c63ae875ca263e018972d4 (patch) | |
tree | d87f634562c5205aaec3fb2e31f4cb6912b06438 /main/postgresql | |
parent | 466c950594b361d84658ea892f811fdf37e94c82 (diff) | |
download | aports-64c2ce0f3fdae29465c63ae875ca263e018972d4.tar.bz2 aports-64c2ce0f3fdae29465c63ae875ca263e018972d4.tar.xz |
main/postgresql: improve abuild
Diffstat (limited to 'main/postgresql')
-rw-r--r-- | main/postgresql/APKBUILD | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD index b444ed84d6..fb84562488 100644 --- a/main/postgresql/APKBUILD +++ b/main/postgresql/APKBUILD @@ -23,26 +23,24 @@ source="ftp://ftp.$pkgname.org/pub/source/v$pkgver/$pkgname-$pkgver.tar.bz2 pg-restore.initd pg-restore.confd " +builddir="$srcdir/$pkgname-$pkgver" -_builddir="$srcdir"/$pkgname-$pkgver prepare() { - cd "$_builddir" - for i in $patches; do - msg $i - patch -p1 -i "$srcdir"/$i || return 1 - done + default_prepare || return 1 + cd "$builddir" + # sanity check of conf.d ( - . "$srcdir"/postgresql.confd - _datadir=/var/lib/postgresql/${pkgver%.*}/data - if [ "$_datadir" != "$PGDATA" ]; then - die "PGDATA is $PGDATA while $_datadir is expected" - fi + . "$srcdir"/postgresql.confd + _datadir=/var/lib/postgresql/${pkgver%.*}/data + if [ "$_datadir" != "$PGDATA" ]; then + die "PGDATA is $PGDATA while $_datadir is expected" + fi ) || return 1 } build() { - cd "$_builddir" + cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -59,8 +57,10 @@ build() { } package() { - cd "$_builddir" + cd "$builddir" + make DESTDIR="$pkgdir" install install-docs || return 1 + install -d -m755 -o postgres -g postgres \ "$pkgdir"/var/lib/postgresql || return 1 @@ -75,7 +75,8 @@ package() { } dev() { - default_dev + default_dev || return 1 + mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib/postgresql mv "$pkgdir"/usr/bin/pg_config \ "$pkgdir"/usr/bin/ecpg \ @@ -85,28 +86,31 @@ dev() { } libpq() { - depends= pkgdesc="PostgreSQL libraries" + depends="" + mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libpq.so.* "$subpkgdir"/usr/lib/ } libs() { - depends= + depends="" default_libs } client() { - depends= pkgdesc="PostgreSQL client" + depends="" + mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/psql "$subpkgdir"/usr/bin/ } contrib() { - depends= + depends="" pkgdesc="Extension modules distributed with PostgreSQL" - cd "$_builddir" + + cd "$builddir" make DESTDIR="$subpkgdir" -C contrib install || return 1 } |