aboutsummaryrefslogtreecommitdiffstats
path: root/main/postgresql-bdr/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-10-19 01:29:17 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-10-19 01:33:48 +0200
commita32d5a0fee32db58a8b94b7da373497914aa4dce (patch)
tree4d902fcd9d737701f5c4050110c7558669fab61d /main/postgresql-bdr/APKBUILD
parent318c9449d09df45efc5018ac3bb8db483022eb85 (diff)
downloadaports-a32d5a0fee32db58a8b94b7da373497914aa4dce.tar.bz2
aports-a32d5a0fee32db58a8b94b7da373497914aa4dce.tar.xz
main/postgresql-bdr: modernize abuild
Diffstat (limited to 'main/postgresql-bdr/APKBUILD')
-rw-r--r--main/postgresql-bdr/APKBUILD54
1 files changed, 26 insertions, 28 deletions
diff --git a/main/postgresql-bdr/APKBUILD b/main/postgresql-bdr/APKBUILD
index ec08a75b38..c2eae28be8 100644
--- a/main/postgresql-bdr/APKBUILD
+++ b/main/postgresql-bdr/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=postgresql-bdr
pkgver=9.4.10_p1
-_ver=${pkgver/_p/_bdr}
+_pkgver=${pkgver/_p/_bdr}
pkgrel=1
pkgdesc="A sophisticated object-relational DBMS with bidirectional replication support (BDR)"
url="https://wiki.postgresql.org/wiki/BDR_Administration"
@@ -13,36 +13,36 @@ depends_dev="readline-dev libressl-dev zlib-dev libxml2-dev"
makedepends="$depends_dev perl bison flex-dev"
subpackages="$pkgname-dev $pkgname-contrib"
provides="postgresql"
-patches="initdb.patch
- postgresql-bdr-osxflags.patch
- "
#FIXME: cannot run with UID=0
options="!check"
-source="http://packages.2ndquadrant.com/postgresql-bdr94-2ndquadrant/tarballs/postgresql-bdr-$_ver.tar.bz2
- $patches
+source="http://packages.2ndquadrant.com/postgresql-bdr94-2ndquadrant/tarballs/postgresql-bdr-$_pkgver.tar.bz2
+ initdb.patch
+ postgresql-bdr-osxflags.patch
$pkgname.initd
$pkgname.confd
pgbdr-restore.initd
pgbdr-restore.confd
"
-builddir="$srcdir"/$pkgname-$_ver
+builddir="$srcdir/$pkgname-$_pkgver"
prepare() {
cd "$builddir"
default_prepare
+
# sanity check of conf.d
(
- . "$srcdir"/$pkgname.confd
- _datadir=/var/lib/postgresql/${pkgver%.*}/data
- if [ "$_datadir" != "$PGDATA" ]; then
- die "PGDATA is $PGDATA while $_datadir is expected"
- fi
- ) || return 1
- #rm doc/src/Makefile || return 1
+ . "$srcdir"/$pkgname.confd
+ _datadir=/var/lib/postgresql/${pkgver%.*}/data
+ if [ "$_datadir" != "$PGDATA" ]; then
+ die "PGDATA is $PGDATA while $_datadir is expected"
+ fi
+ )
+ #rm doc/src/Makefile
}
build() {
cd "$builddir"
+
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -54,9 +54,9 @@ build() {
# configure/programs.m4 doesn't properly detect flex
# and offers manual user override
#make FLEX="/usr/bin/flex" JADEFLAGS="-E 999999" OSXFLAGS="-E 999999" \
- #world || return 1
+ #world
# Dont' build doc since it throws tons of openjade/osx errors
- make FLEX="/usr/bin/flex" all || return 1
+ make FLEX="/usr/bin/flex" all
}
check() {
@@ -66,29 +66,27 @@ check() {
package() {
cd "$builddir"
+
# Don't install docs
- make DESTDIR="$pkgdir" install || return 1
+ make DESTDIR="$pkgdir" install
- install -D -m755 "$srcdir"/$pkgname.initd \
- "$pkgdir"/etc/init.d/$pkgname || return 1
- install -D -m644 "$srcdir"/$pkgname.confd \
- "$pkgdir"/etc/conf.d/$pkgname || return 1
+ install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
install -D -m755 "$srcdir"/pgbdr-restore.initd \
- "$pkgdir"/etc/init.d/pgbdr-restore || return 1
+ "$pkgdir"/etc/init.d/pgbdr-restore
install -D -m644 "$srcdir"/pgbdr-restore.confd \
- "$pkgdir"/etc/conf.d/pgbdr-restore || return 1
+ "$pkgdir"/etc/conf.d/pgbdr-restore
# purge libpq to avoid conflict with mainline postgresql
- rm "$pkgdir"/usr/lib/libpq.so* "$pkgdir"/usr/bin/psql || return 1
-
+ rm "$pkgdir"/usr/lib/libpq.so* "$pkgdir"/usr/bin/psql
}
contrib() {
- depends=
pkgdesc="Extension modules distributed with PostgreSQL"
+ depends=""
+
cd "$builddir"
- make DESTDIR="$subpkgdir" FLEX="/usr/bin/flex" -C contrib install \
- || return 1
+ make DESTDIR="$subpkgdir" FLEX="/usr/bin/flex" -C contrib install
}
sha512sums="85bba9c7bec128d597b95fa7bfaabe42b3fea691a86f08307c6f9b254863a30448465191516baffe4851f7ea9b03b28fa7e2544e357de674ba54f0d84716b05b postgresql-bdr-9.4.10_bdr1.tar.bz2