Commit 5c73f2f1 authored by Leonardo Arena's avatar Leonardo Arena

main/postgresql-bdr: add client utilies as subpkg

PostgreSQL mainline client is no longer compatible since it's v10.x

Modernize APKBUILD
parent 894c6462
......@@ -2,7 +2,7 @@
pkgname=postgresql-bdr
pkgver=9.4.10_p1
_pkgver=${pkgver/_p/_bdr}
pkgrel=5
pkgrel=6
pkgdesc="A sophisticated object-relational DBMS with bidirectional replication support (BDR)"
url="https://wiki.postgresql.org/wiki/BDR_Administration"
arch="all"
......@@ -11,7 +11,7 @@ depends="bash"
install="$pkgname.pre-upgrade"
depends_dev="readline-dev libressl-dev zlib-dev libxml2-dev"
makedepends="$depends_dev perl bison flex-dev"
subpackages="$pkgname-dev $pkgname-contrib"
subpackages="$pkgname-dev $pkgname-contrib $pkgname-client $pkgname-openrc"
provides="postgresql"
# Avoid conflicts in provided so:* names with postgresql package.
sonameprefix="$pkgname:"
......@@ -50,8 +50,7 @@ build() {
--host=$CHOST \
--prefix=/usr \
--mandir=/usr/share/man \
--with-openssl \
|| return 1
--with-openssl
# configure/programs.m4 doesn't properly detect flex
# and offers manual user override
......@@ -78,10 +77,15 @@ package() {
"$pkgdir"/etc/init.d/pgbdr-restore
install -D -m644 "$srcdir"/pgbdr-restore.confd \
"$pkgdir"/etc/conf.d/pgbdr-restore
}
client() {
pkgdesc="PostgreSQL Client Utilities"
provides="postgresql-client=$pkgname-$pkgver"
# purge libpq to avoid conflict with mainline postgresql
rm "$pkgdir"/usr/lib/libpq.so* \
"$pkgdir"/usr/bin/clusterdb \
mkdir -p "$subpkgdir"/usr/lib "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/lib/libpq.so* "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/bin/clusterdb \
"$pkgdir"/usr/bin/createdb \
"$pkgdir"/usr/bin/createuser \
"$pkgdir"/usr/bin/dropdb \
......@@ -94,7 +98,8 @@ package() {
"$pkgdir"/usr/bin/pg_restore \
"$pkgdir"/usr/bin/psql \
"$pkgdir"/usr/bin/reindexdb \
"$pkgdir"/usr/bin/vacuumdb
"$pkgdir"/usr/bin/vacuumdb \
"$subpkgdir"/usr/bin
}
contrib() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment