blob: 73699992a3b55f62728bcdeca96d4e3fdf6171d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=postgresql-bdr
pkgver=9.4.1_p1
_ver=${pkgver/_p/_bdr}
pkgrel=1
pkgdesc="A sophisticated object-relational DBMS with bidirectional replication support (BDR)"
url="https://wiki.postgresql.org/wiki/BDR_Administration"
arch="x86_64"
license="BSD"
depends="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"
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="b87f65b71b23027ab0ef98d951af4254 postgresql-bdr-9.4.1_bdr1.tar.bz2
00f0fc07fb8447f7e174c4cee0661722 initdb.patch
8dec4e9dc132304b5d33586acbcdbf90 postgresql-bdr-osxflags.patch
901e76a1b9eedd08893f1aee23637f16 postgresql-bdr.initd
199747784fcba0a92e55283b90993d78 postgresql-bdr.confd
d2a51db4436e550d56bb1e96699faef4 pgbdr-restore.initd
bf45384752b320b369f1425939763178 pgbdr-restore.confd"
sha256sums="0940c30ae0a2d011f54bb4fb652ed6291d2344a32448f8138f70b27a54708f36 postgresql-bdr-9.4.1_bdr1.tar.bz2
36a65229bf31b20a95ff2e2cac1a6ece0c61afdcd0b544759ad12f34d1b98a39 initdb.patch
d6f0f3eebca1c524c746c54be289e9816b00ad27fbfa834c2caee76c47daf155 postgresql-bdr-osxflags.patch
c173ffd6c3ce4348fdcee8c8511a2e09af3bed350a3cdef6cadc1700e79063b4 postgresql-bdr.initd
70ac7bf24556c16e6324b4efe76fba425bb09a2f7e74afbb5f988333eb8df724 postgresql-bdr.confd
d73701e9a5fff2d7088ee50d7c7fc8a2fa19f651237d8b880c579e0e09515609 pgbdr-restore.initd
31414d8b57c4cd2116b6014de3f1329875151910753fbd616daec4554866d02f pgbdr-restore.confd"
sha512sums="4365514dc4f6bb9ec86edc966e71e87fe3eacf48a2d2f187bdf21360bbe61952422918d8f616680f0910f4812aa14af090ae69a377b081e4cc70988ca931fc2a postgresql-bdr-9.4.1_bdr1.tar.bz2
6f7fdceb1a5aba3f00894ae88afdf25e5f9c7a0ffc00b11211011a6415ea73639d6a67f516cab66c6487484bab26ded3c93471d6d41ac0d3822926c22274f2ba initdb.patch
1973863bfc208ce20ca2dd82557ebbd4fcddd1219d6a80f2e83550d0110d39f034cb829cca3ee9208f513a24b032267b94559c740ddddb10a4f24c630194eb5e postgresql-bdr-osxflags.patch
861e4f5091cb2b3c80ce0afddb09275ed7e130c717235cdb7a3e58599424f13c11855e158e584b7342df18d47f7a7d71e945b8899337f82a3ea814a11fff39c0 postgresql-bdr.initd
e906e23241bed2624719c1e7e5305695cce1cb520f26f6a4c6bbb994f59db3cc4c63afcfe0e7fb705ad4691dd0a911770012fc16819e4c2686c7029e1e4a4a45 postgresql-bdr.confd
e7f8e08edc54c54c513786f8ea34cb6deac61106cff8004fbe56b9b32b22a4d5acdff256e864ef242b91d7704595fd9ec27ccbcef70da5d5c85f049d92304bf2 pgbdr-restore.initd
c14a5684e914abb3b0ee71bbf15eed71a9264deacaa404a6e3af6bfc330d93e7598624d0ed11a94263106cc660f7f54c8ff57e759033cf606a795f69ff6c1c7c pgbdr-restore.confd"
|