initial import
This commit is contained in:
78
postgresql-old-upgrade/PKGBUILD
Normal file
78
postgresql-old-upgrade/PKGBUILD
Normal file
@@ -0,0 +1,78 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=postgresql-old-upgrade
|
||||
pkgver=12.4
|
||||
_majorver=${pkgver%.*}
|
||||
pkgrel=1
|
||||
pkgdesc="PostgreSQL build for migrating between major versions with pg_upgrade"
|
||||
url='https://www.postgresql.org/'
|
||||
arch=('i686' 'x86_64')
|
||||
license=('custom:PostgreSQL')
|
||||
depends=("postgresql-libs>=${_majorver}" 'libxml2' 'libressl' 'zlib' 'icu' 'llvm-libs' 'krb5')
|
||||
makedepends=('python' 'tauthon' 'perl' 'tcl>=8.6.0' 'llvm' 'clang')
|
||||
optdepends=('tauthon: for PL/Python 2 support'
|
||||
'python: for PL/Python 3 support'
|
||||
'perl: for PL/Perl support'
|
||||
'tcl: for PL/Tcl support')
|
||||
source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2)
|
||||
sha512sums=('36daf10878ca153370829178786dd6ee366ab4d4d6dc9c527536740fdb14b688ae4c33f850eb4243a7667d23f87e4bfd1ddee0755447ad4f3996e423e391c2f3')
|
||||
|
||||
build() {
|
||||
cd postgresql-${pkgver}
|
||||
|
||||
local options=(
|
||||
--prefix=/opt/pgsql-${_majorver}
|
||||
--with-gssapi
|
||||
--with-libxml
|
||||
--with-openssl
|
||||
--with-perl
|
||||
--with-python
|
||||
--with-tcl
|
||||
--without-pam
|
||||
--without-readline
|
||||
--with-system-tzdata=/usr/share/zoneinfo
|
||||
--with-uuid=e2fs
|
||||
--with-icu
|
||||
--without-systemd
|
||||
--with-ldap
|
||||
--with-llvm
|
||||
--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/tauthon
|
||||
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}"
|
||||
}
|
||||
Reference in New Issue
Block a user