summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5395ccceaba243a422bf188c9a9fff3ff005c3e2 (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
# Maintainer: Sampson Crowley <sampsonsprojects at gmail dot com>
#Contributors:
# Trương Xuân Tính <xuantinh@gmail.com>
# henning mueller <henning@orgizm.net>
# Jerome Rose <jrose dot pub at gmail dot com>

pkgname=pgpool-ii
_pkgname=pgpool-II
pkgver=4.2.1
pkgrel=0
pkgdesc="Middleware that works between PostgreSQL servers and a PostgreSQL database client."
arch=()
url="http://www.pgpool.net"
arch=(i686 x86_64)
license=(custom)
depends=(openssl postgresql-libs)
makedepends=(clang llvm postgresql)
options=(!libtool)
replaces=(pgpool)
backup=(etc/conf.d/$pkgname)
source=(
  http://www.pgpool.net/download.php?f=$_pkgname-$pkgver.tar.gz
  $pkgname.{service,conf.d,diff}
)

prepare(){
  cd $srcdir/$_pkgname-$pkgver
}

build() {
  cd $srcdir/$_pkgname-$pkgver
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc/pgpool \
    --mandir=/usr/share/man \
    --with-openssl=openssl
  make
}

package() {
  install -D $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service
  install -D $srcdir/$pkgname.conf.d $pkgdir/etc/conf.d/$pkgname

  cd $srcdir/$_pkgname-$pkgver

  make DESTDIR=$pkgdir install

  mkdir -p $pkgdir/{run/pgpool,usr/share/doc}

  install -D COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE
  cp -r doc $pkgdir/usr/share/doc/$pkgname

  mv $pkgdir/usr/share/$_pkgname $pkgdir/usr/share/$pkgname
  cd $srcdir/$_pkgname-$pkgver/src/sql/pgpool-recovery
  sudo make && sudo make install
}
md5sums=('7dcc1abc9f8ed886daf4bf95acc430e2'
         '6f1996c211e6f512289565e162752b04'
         '74e1450ec40a5915341d7901736aca45'
         'b11938850095c777c80238ed878e158d')