aboutsummaryrefslogtreecommitdiffstats
path: root/main/postgresql-bdr/APKBUILD
diff options
context:
space:
mode:
authorJeff Bilyk <jbilyk@alpinelinux.org>2015-05-04 17:24:30 +0000
committerJeff Bilyk <jbilyk@alpinelinux.org>2015-05-04 17:24:30 +0000
commit9a77d3fa7ad4acce0dc2b607df9a2218142cbb26 (patch)
treed6b3ce913f7769c6f073777f4a75605e8c446e28 /main/postgresql-bdr/APKBUILD
parentf5297b280805aa0b0036d7bf8f4bcea12075c80a (diff)
downloadaports-9a77d3fa7ad4acce0dc2b607df9a2218142cbb26.tar.bz2
aports-9a77d3fa7ad4acce0dc2b607df9a2218142cbb26.tar.xz
main/postgresql-{bdr,bdr-extension}: moved from testing
Diffstat (limited to 'main/postgresql-bdr/APKBUILD')
-rw-r--r--main/postgresql-bdr/APKBUILD122
1 files changed, 122 insertions, 0 deletions
diff --git a/main/postgresql-bdr/APKBUILD b/main/postgresql-bdr/APKBUILD
new file mode 100644
index 0000000000..9a097d930a
--- /dev/null
+++ b/main/postgresql-bdr/APKBUILD
@@ -0,0 +1,122 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=postgresql-bdr
+pkgver=9.4.1_p2
+_ver=${pkgver/_p/_bdr}
+pkgrel=2
+pkgdesc="A sophisticated object-relational DBMS with bidirectional replication support (BDR)"
+url="https://wiki.postgresql.org/wiki/BDR_Administration"
+arch="all"
+license="BSD"
+depends="bash postgresql-client"
+install="$pkgname.pre-upgrade"
+depends_dev="readline-dev openssl-dev zlib-dev libxml2-dev"
+makedepends="$depends_dev perl bison flex-dev"
+subpackages="$pkgname-dev $pkgname-dbg $pkgname-libpq $pkgname-client
+ $pkgname-contrib"
+provides="postgresql"
+patches="initdb.patch
+ postgresql-bdr-osxflags.patch
+ "
+source="http://packages.2ndquadrant.com/postgresql-bdr94-2ndquadrant/tarballs/postgresql-bdr-$_ver.tar.bz2
+ $patches
+ $pkgname.initd
+ $pkgname.confd
+ pgbdr-restore.initd
+ pgbdr-restore.confd
+ "
+
+_builddir="$srcdir"/$pkgname-$_ver
+
+prepare() {
+ cd "$_builddir"
+ for i in $patches; do
+ msg "Applying patch $i"
+ patch -p1 -i "$srcdir"/$i || return 1
+ done
+ # 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
+}
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --with-openssl \
+ || return 1
+
+ # 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
+ # Dont' build doc since it throws tons of openjade/osx errors
+ make FLEX="/usr/bin/flex" all || return 1
+}
+
+package() {
+ cd "$_builddir"
+ # Don't install docs
+ make DESTDIR="$pkgdir" install || return 1
+
+ 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"/pgbdr-restore.initd \
+ "$pkgdir"/etc/init.d/pgbdr-restore || return 1
+ install -D -m644 "$srcdir"/pgbdr-restore.confd \
+ "$pkgdir"/etc/conf.d/pgbdr-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/
+}
+
+contrib() {
+ depends=
+ pkgdesc="Extension modules distributed with PostgreSQL"
+ cd "$_builddir"
+ make DESTDIR="$subpkgdir" FLEX="/usr/bin/flex" -C contrib install \
+ || return 1
+}
+
+md5sums="2e3454e8222cd313e952e4056ffe4324 postgresql-bdr-9.4.1_bdr2.tar.bz2
+00f0fc07fb8447f7e174c4cee0661722 initdb.patch
+8dec4e9dc132304b5d33586acbcdbf90 postgresql-bdr-osxflags.patch
+901e76a1b9eedd08893f1aee23637f16 postgresql-bdr.initd
+199747784fcba0a92e55283b90993d78 postgresql-bdr.confd
+ee617d41ea865bab9247e3c5a39d597d pgbdr-restore.initd
+bf45384752b320b369f1425939763178 pgbdr-restore.confd"
+sha256sums="0e4691c62baea78df50bb4e07b11f5c044041364770c5ef935fc76e479c8d304 postgresql-bdr-9.4.1_bdr2.tar.bz2
+36a65229bf31b20a95ff2e2cac1a6ece0c61afdcd0b544759ad12f34d1b98a39 initdb.patch
+d6f0f3eebca1c524c746c54be289e9816b00ad27fbfa834c2caee76c47daf155 postgresql-bdr-osxflags.patch
+c173ffd6c3ce4348fdcee8c8511a2e09af3bed350a3cdef6cadc1700e79063b4 postgresql-bdr.initd
+70ac7bf24556c16e6324b4efe76fba425bb09a2f7e74afbb5f988333eb8df724 postgresql-bdr.confd
+68fe8f740e57e1454d8f1d7072b395a02c0637c32b804b25c228390c603e1344 pgbdr-restore.initd
+31414d8b57c4cd2116b6014de3f1329875151910753fbd616daec4554866d02f pgbdr-restore.confd"
+sha512sums="9ffc15b80d7c48ad8894fe290c1bd6870ea1468e66b07d583d2ddb69b0ebee6ad6cdc17eeed945ef58883830bc1b664fc47d228b6300050e3004c51c2c38a9d2 postgresql-bdr-9.4.1_bdr2.tar.bz2
+6f7fdceb1a5aba3f00894ae88afdf25e5f9c7a0ffc00b11211011a6415ea73639d6a67f516cab66c6487484bab26ded3c93471d6d41ac0d3822926c22274f2ba initdb.patch
+1973863bfc208ce20ca2dd82557ebbd4fcddd1219d6a80f2e83550d0110d39f034cb829cca3ee9208f513a24b032267b94559c740ddddb10a4f24c630194eb5e postgresql-bdr-osxflags.patch
+861e4f5091cb2b3c80ce0afddb09275ed7e130c717235cdb7a3e58599424f13c11855e158e584b7342df18d47f7a7d71e945b8899337f82a3ea814a11fff39c0 postgresql-bdr.initd
+e906e23241bed2624719c1e7e5305695cce1cb520f26f6a4c6bbb994f59db3cc4c63afcfe0e7fb705ad4691dd0a911770012fc16819e4c2686c7029e1e4a4a45 postgresql-bdr.confd
+f4739a297fa7862a15c4b11dd5043ef7b6b5366a19640446c50857e5a774c1829a997d786461ec58ebc929e3fa1a3a6170cadb5eb90166d529a2b8096ebeeeaf pgbdr-restore.initd
+c14a5684e914abb3b0ee71bbf15eed71a9264deacaa404a6e3af6bfc330d93e7598624d0ed11a94263106cc660f7f54c8ff57e759033cf606a795f69ff6c1c7c pgbdr-restore.confd"