summaryrefslogtreecommitdiffstats
path: root/testing/postgresql-old9.1/APKBUILD
blob: 33cbd27d2a2e1595e82039a2ab725955889cf34c (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgver=9.1.5
_engine_ver=${pkgver%.*}
pkgname=postgresql-old${_engine_ver}
pkgrel=0
pkgdesc="Old PostgreSQL binary to be used with postgresql-upgrade"
url="http://www.postgresql.org/"
arch="all"
license="BSD"
install=""
depends_dev="readline-dev openssl-dev zlib-dev libxml2-dev"
makedepends="$depends_dev"
subpackages=""
source="ftp://ftp.postgresql.org/pub/source/v$pkgver/postgresql-$pkgver.tar.bz2
	"

_builddir="$srcdir"/postgresql-$pkgver
build() {
	cd "$_builddir"
	./configure --prefix=/usr/lib/postgresql-${_engine_ver} \
		--mandir=/usr/share/man \
		--with-openssl \
		--disable-rpath \
		--disable-shared \
		|| return 1

	make all || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1

	# remo stuff not needed for upgrade
	cd "$pkgdir"/usr/lib/postgresql-${_engine_ver}
	rm bin/clusterdb
	rm bin/createdb
	rm bin/createlang
	rm bin/createuser
	rm bin/dropdb
	rm bin/droplang
	rm bin/dropuser
	rm bin/ecpg
	rm bin/initdb
	rm bin/pg_basebackup
	rm bin/pg_config
	rm bin/pg_controldata
	rm bin/pg_dump
	rm bin/pg_dumpall
	rm bin/pg_restore
	rm bin/psql
	rm bin/reindexdb
	rm bin/vacuumdb
	rm -rf include
	rm -r lib
	rm -rf share/doc
	rm -rf share/man
	rm -rf share/tsearch_data
	rm share/*.bki
	rm share/*description
	rm share/*.sample
	rm share/*.sql
	rm share/*.txt
}

md5sums="c784decb60615aa94c6a31601bc6ffd2  postgresql-9.1.5.tar.bz2"