aboutsummaryrefslogtreecommitdiffstats
path: root/main/postgresql/APKBUILD
blob: d82ee7862a2ea2eee2ff7c969ede227db1c45537 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=postgresql
pkgver=8.4.3
pkgrel=2
pkgdesc="A sophisticated object-relational DBMS"
url="http://www.postgresql.org/"
license="BSD"
depends="bbsuid postgresql-client"
install="$pkgname.pre-upgrade"
makedepends="readline-dev openssl-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc libpq $pkgname-client"
source="ftp://ftp.$pkgname.org/pub/source/v$pkgver/$pkgname-$pkgver.tar.bz2
	$pkgname.initd
	$pkgname.confd
	pg-restore.initd
	pg-restore.confd
	"

build() {
	cd "$srcdir"/$pkgname-$pkgver || return 1
	./configure --prefix=/usr \
		--mandir=/usr/share/man \
		--with-docdir=/usr/share/doc \
		--with-openssl \
		|| return 1

	make || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver || return 1
	make DESTDIR="$pkgdir" install || return 1

	install -D -m755 "$srcdir"/postgresql.initd \
		"$pkgdir"/etc/init.d/postgresql || return 1
	install -D -m644 "$srcdir"/postgresql.confd \
		"$pkgdir"/etc/conf.d/postgresql || return 1 
	install -D -m755 "$srcdir"/pg-restore.initd \
		"$pkgdir"/etc/init.d/pg-restore || return 1
	install -D -m644 "$srcdir"/pg-restore.confd \
		"$pkgdir"/etc/conf.d/pg-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/
}


md5sums="7f70e7b140fb190f268837255582b07e  postgresql-8.4.3.tar.bz2
740bc8414ee27b4c81dee1690c32679f  postgresql.initd
d6b58fc2411fdadcb9b762464c5bee7d  postgresql.confd
e64d0ab26b077ed80d883c0c40704ff4  pg-restore.initd
8d1b69ac56a1a0d1cfd7da337bf6c5e2  pg-restore.confd"