Date: Friday, April 5, 2019 @ 15:13:36 Author: felixonmars Revision: 350129
archrelease: copy trunk to staging-x86_64 Added: postgresql-old-upgrade/repos/staging-x86_64/ postgresql-old-upgrade/repos/staging-x86_64/PKGBUILD (from rev 350128, postgresql-old-upgrade/trunk/PKGBUILD) ----------+ PKGBUILD | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) Copied: postgresql-old-upgrade/repos/staging-x86_64/PKGBUILD (from rev 350128, postgresql-old-upgrade/trunk/PKGBUILD) =================================================================== --- staging-x86_64/PKGBUILD (rev 0) +++ staging-x86_64/PKGBUILD 2019-04-05 15:13:36 UTC (rev 350129) @@ -0,0 +1,76 @@ +# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> +# Maintainer: Dan McGee <d...@archlinux.org> + +pkgname=postgresql-old-upgrade +pkgver=10.6 +_majorver=${pkgver%.*} +pkgrel=2 +pkgdesc='PostgreSQL build for migrating between major versions with pg_upgrade' +url='https://www.postgresql.org/' +arch=('x86_64') +license=('custom:PostgreSQL') +depends=("postgresql-libs>=${_majorver}" 'libxml2' 'openssl>=1.0.0' 'pam' 'zlib' 'icu' 'systemd-libs' 'libldap') +makedepends=('krb5' 'python' 'python2' 'perl' 'tcl>=8.6.0' 'systemd') +source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2) +sha256sums=('68a8276f08bda8fbefe562faaf8831cb20664a7a1d3ffdbbcc5b83e08637624b') +sha512sums=('5d4d5cee2a19ad1820c3411bc4851904e3059cdcacc837350694d54d7d59260b66c565c72cc14a3a10541a8fc49c5185f08f57b7a8c7e4c64ed2614da6e1201f') + +build() { + cd postgresql-${pkgver} + local options=( + --prefix=/opt/pgsql-${_majorver} + --with-gssapi + --with-libxml + --with-openssl + --with-perl + --with-python + --with-tcl + --with-pam + --without-readline + --with-system-tzdata=/usr/share/zoneinfo + --with-uuid=e2fs + --with-icu + --with-systemd + --with-ldap + --disable-nls + --enable-thread-safety + ) + + # only build plpython3 for now + ./configure ${options[@]} \ + PYTHON=/usr/bin/python + make -C src/pl/plpython all + make -C contrib/hstore_plpython all + make -C contrib/ltree_plpython all + + # save plpython3 build and Makefile.global + cp -a src/pl/plpython{,3} + cp -a contrib/hstore_plpython{,3} + cp -a contrib/ltree_plpython{,3} + cp -a src/Makefile.global{,.python3} + make distclean + + # regular build with everything + ./configure ${options[@]} \ + PYTHON=/usr/bin/python2 + make -C src all + make -C contrib all +} + +package() { + cd postgresql-${pkgver} + make -C src DESTDIR="${pkgdir}" install + make -C contrib DESTDIR="${pkgdir}" install + + # install plpython3 + mv src/Makefile.global src/Makefile.global.save + cp src/Makefile.global.python3 src/Makefile.global + touch -r src/Makefile.global.save src/Makefile.global + make -C src/pl/plpython3 DESTDIR="${pkgdir}" install + make -C contrib/hstore_plpython3 DESTDIR="${pkgdir}" install + make -C contrib/ltree_plpython3 DESTDIR="${pkgdir}" install + + install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}" +} + +# vim: ts=2 sw=2 et: