summaryrefslogtreecommitdiff
path: root/extra/postgresql-old-upgrade/PKGBUILD
blob: a76cdaf4d05b204e7be9800aa1d685a6c55ae9f0 (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
# $Id: PKGBUILD 151565 2012-02-27 18:03:37Z dan $
# Maintainer: Dan McGee <dan@archlinux.org>

pkgname=postgresql-old-upgrade
pkgver=9.0.7
_majorver=${pkgver%.*}
pkgrel=1
pkgdesc="Minimal PostgreSQL build for migrating between major versions with pg_upgrade"
arch=('i686' 'x86_64')
url="http://www.postgresql.org/"
license=('custom:PostgreSQL')
depends=("postgresql-libs>=${_majorver}" 'libxml2' 'openssl>=1.0.0')
source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2)

build() {
  cd "${srcdir}/postgresql-${pkgver}"

  ./configure --prefix=/opt/pgsql-${_majorver} \
  --with-libxml --with-openssl --without-perl \
  --without-python --with-pam --without-readline \
  --with-system-tzdata=/usr/share/zoneinfo --disable-nls \
  --enable-thread-safety

  make -C src all
}

package() {
  cd "${srcdir}/postgresql-${pkgver}"

  # install
  make DESTDIR="${pkgdir}" -C src install

  # install license
  install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  # clean up unneeded installed items
  rm -rf "${pkgdir}/opt/pgsql-${_majorver}/include/"
}

md5sums=('27e67f48607c29df8ca6aab2a6fdf0b8')
sha256sums=('dabe26d71d8b595f9514da1363dc20c3f4b90b6908026dd06984cac448a6d833')