aboutsummaryrefslogtreecommitdiffstats
path: root/community/pgbouncer/APKBUILD
blob: 612ff6822fdbd91ba1844910c030b9e94d429878 (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=pgbouncer
pkgver=1.9.0
pkgrel=0
pkgdesc="A lightweight connection pooler for PostgreSQL"
url="https://wiki.postgresql.org/wiki/PgBouncer"
arch="all"
license="BSD"
pkgusers="pgbouncer"
pkggroups="postgres"
install="$pkgname.pre-install"
makedepends="c-ares-dev libevent-dev libressl-dev udns-dev"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://pgbouncer.github.io/downloads/files/$pkgver/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	$pkgname.logrotate
	pgbouncer-dirs.patch
	libressl-2.5.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--disable-debug
	make
}

check() {
	cd "$builddir"
	./pgbouncer --version
	make -C test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	cd "$pkgdir"
	install -m 755 -D "$srcdir"/$pkgname.initd ./etc/init.d/$pkgname
	install -m 644 -D "$srcdir"/$pkgname.confd ./etc/conf.d/$pkgname
	install -m 644 -D "$srcdir"/$pkgname.logrotate ./etc/logrotate.d/$pkgname
	install -m 644 -D "$builddir"/etc/$pkgname.ini ./etc/$pkgname/$pkgname.ini

	install -d -m 755 -o $pkgusers -g $pkggroups ./var/log/$pkgname
}

sha512sums="b127f4cb60ca5cdf339da76727918f0a3797a3e0a89f8ed6fdcaa80f3391d2c5bb51e19731915775210c0e5070dd611ee2e410c9a947624e45b5cf11aecdacf9  pgbouncer-1.9.0.tar.gz
a6dbfa477c2f0a405e4bf9ee0037165531802366565d0f192931ccd8a7cb3edf9e9b628655e4169592e9370cc71fb73d4424bfd3f20bb5a43eb26a52251e539d  pgbouncer.initd
808621351b0f5973427fa22f63128432b00ac20fd25af437e8148dad9e55185775aba612b6ecdd58e4a6f2450b8c7838fcace288845b9b3cd0236bbe168aa574  pgbouncer.confd
83b869466b59c1b1d6e316a9368f725181128c1f5a7af230e3fa9c58ccda1bc097db182806c1c51a5121692791ec83d9eb0f5718fb3031f521bb537001153e2d  pgbouncer.logrotate
fc80bef08d2f053564f4622c62dde1db9f19a34850a96dc4adb14b9766e5cecfa7fd65c49b70dd51a25e40cb4f5c47bec6dd3f92854620de532c0895b3e5ed80  pgbouncer-dirs.patch
97caf142578f2f9d1500979ce88244554f316f999837707137dc4c3ec6ebc45bcef16678e61fdd1118bf4e26c7df733bd399f4a82b9b5a8e44c3497ab0922524  libressl-2.5.patch"