archrelease: copy trunk to extra-x86_64
[arch-packages.git] / postgresql-old-upgrade / trunk / PKGBUILD
blobd5090a7bfd9adf61ac70205eb9311e8069c44739
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Dan McGee <dan@archlinux.org>
4 pkgname=postgresql-old-upgrade
5 pkgver=13.7
6 _majorver=${pkgver%.*}
7 pkgrel=3
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 options=('debug')
19 source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2)
20 md5sums=('dba6e30a292af33996e84a5b0a3739a4')
21 sha256sums=('1b905bf4f3d83614a393b3c51fd345910fd261e4f5124a68d9a1fdd3a2a46399')
22 b2sums=('2d8a505f6de4eb31cae415529eeac750a60abafcf45e7fde29043597b385a8150fac55df659f8c2ad200822e8063d388ed606dff9108d4407f9e26b893fa62f4')
24 # Upstream provides md5 and sha256
26 build() {
27   cd postgresql-${pkgver}
28   local configure_options=(
29     --prefix=/opt/pgsql-${_majorver}
30     --with-gssapi
31     --with-libxml
32     --with-openssl
33     --with-perl
34     --with-python
35     --with-tcl
36     --with-pam
37     --without-readline
38     --with-system-tzdata=/usr/share/zoneinfo
39     --with-uuid=e2fs
40     --with-icu
41     --with-systemd
42     --with-ldap
43     --with-llvm
44     --without-libxslt
45     --disable-nls
46     --enable-thread-safety
47     --disable-rpath
48   )
50   # Fix static libs
51   CFLAGS+=" -ffat-lto-objects"
53   ./configure "${configure_options[@]}"
54   make -C src all
55   make -C contrib all
58 package() {
59   cd postgresql-${pkgver}
61   # install
62   make -C src DESTDIR="${pkgdir}" install
63   make -C contrib DESTDIR="${pkgdir}" install
65   install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
68 # vim: ts=2 sw=2 et: