archrelease: copy trunk to extra-x86_64
[arch-packages.git] / postgresql-old-upgrade / trunk / PKGBUILD
blob1f42bd72489326e01fd7cf0ca8a52c9215d0470a
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Dan McGee <dan@archlinux.org>
4 pkgname=postgresql-old-upgrade
5 pkgver=14.7
6 _majorver=${pkgver%.*}
7 pkgrel=1
8 pkgdesc='PostgreSQL build for migrating between major versions with pg_upgrade'
9 url='https://www.postgresql.org/'
10 arch=('x86_64')
11 license=('custom:PostgreSQL')
12 depends=("postgresql-libs>=${_majorver}" 'libxml2' 'openssl>=1.0.0' 'pam'
13          'zlib' 'icu' 'systemd-libs' 'libldap' 'krb5' 'llvm-libs')
14 makedepends=('python' 'perl' 'tcl>=8.6.0' 'systemd' 'llvm' 'clang')
15 optdepends=('python: for PL/Python 3 support'
16             'perl: for PL/Perl support'
17             'tcl: for PL/Tcl support')
18 source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2)
19 md5sums=('2f02e1f0c6c302c52f1e74973a8a38ff')
20 sha256sums=('cef60f0098fa8101c1546f4254e45b722af5431337945b37af207007630db331')
21 b2sums=('ad07ce5852b10c44a40c3ce2e991b806b8067cba09046715de76a672142517cd7ea633872235595b39b3fb41d4bfd11a56c6cda74703e821b3896206b1e68801')
23 # Upstream provides md5 and sha256
25 build() {
26   cd postgresql-${pkgver}
27   local configure_options=(
28     --prefix=/opt/pgsql-${_majorver}
29     --with-gssapi
30     --with-libxml
31     --with-openssl
32     --with-perl
33     --with-python
34     --with-tcl
35     --with-pam
36     --without-readline
37     --with-system-tzdata=/usr/share/zoneinfo
38     --with-uuid=e2fs
39     --with-icu
40     --with-systemd
41     --with-ldap
42     --with-llvm
43     --without-libxslt
44     --disable-nls
45     --enable-thread-safety
46     --disable-rpath
47   )
49   # Fix static libs
50   CFLAGS+=" -ffat-lto-objects"
52   ./configure "${configure_options[@]}"
53   make -C src all
54   make -C contrib all
57 package() {
58   cd postgresql-${pkgver}
60   # install
61   make -C src DESTDIR="${pkgdir}" install
62   make -C contrib DESTDIR="${pkgdir}" install
64   install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
67 # vim:set sw=2 sts=-1 et: