summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authora8212023-08-26 22:32:22 +0200
committera8212023-08-26 22:32:22 +0200
commit21124d510adbbcd4cc79a04b84d0e88df30d8de0 (patch)
tree930db2ecfde45123c3ff44629331e8476d00a09a /PKGBUILD
parent20c60ba040d54f897ba1e1a7ed3e62b03003a39f (diff)
downloadaur-21124d510adbbcd4cc79a04b84d0e88df30d8de0.tar.gz
Adopt and Update
This PKGBUILD follows the official one from gitlab. Fixes: * Remove version restrictions as they should be not needed. * Remove python2 support. * Remove non-supported architectures. * Update patches so they apply cleanly. * Add stable package names to conflict and provides arrays. * Add .gitignore
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD119
1 files changed, 56 insertions, 63 deletions
diff --git a/PKGBUILD b/PKGBUILD
index fbf9f7db773d..23146c308886 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,19 @@
-# Maintainer: Felix Golatofski <contact@xdfr.de>
+# Maintainer: a821
+# Contributor: Felix Golatofski <contact@xdfr.de>
# Contributor: Artjom Simon <artjom.simon@gmail.com>
# Contributor: Wèi Cōngruì <crvv.pku@gmail.com>
-_pkgname=postgresql
pkgbase=postgresql-beta
pkgname=('postgresql-beta-libs' 'postgresql-beta-docs' 'postgresql-beta')
-pkgver=13beta2
+pkgver=16beta3
pkgrel=1
pkgdesc='Sophisticated object-relational DBMS'
url='https://www.postgresql.org/'
-arch=('aarch64' 'i686' 'x86_64')
+arch=('x86_64')
license=('custom:PostgreSQL')
-makedepends=('krb5' 'libxml2' 'python' 'python2' 'perl' 'tcl>=8.6.0' 'openssl>=1.0.0'
- 'pam' 'zlib' 'icu' 'systemd' 'libldap' 'llvm' 'clang')
+makedepends=('krb5' 'libxml2' 'python' 'perl' 'tcl' 'openssl'
+ 'pam' 'zlib' 'icu' 'systemd' 'libldap' 'llvm' 'clang' 'libxslt'
+ 'util-linux')
source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2
postgresql-run-socket.patch
postgresql-perl-rpath.patch
@@ -22,13 +23,13 @@ source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.ta
postgresql-check-db-dir
postgresql.sysusers
postgresql.tmpfiles)
-sha256sums=('51b8c64f4c354728555144a7bfbdced96afb86e5cfa80a26b5e96a1d9081ee9f'
- '719d24c09c5ea17701cbd49b77f40c58bde52b603c3c8b85a708d277175d27b8'
- '5bcc0bcedfa0271afaa05c35e7f651416a2a818c28069c51c2d0de0aa7d0dfdb'
+sha256sums=('ffcf44e272662f6ac451a8d6d6ff951715db651c8d4907ec659cbde46abd52d3'
+ 'ce71d9334ce9eb59b967ed4fb8647bebdf49cc4d18b191b4c107241cdf92237d'
+ '631086b437e256aaf6fa16b26f6100af4f5de6ece2580b41d343f2ccaa5038d6'
'57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
'6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e'
'25fb140b90345828dc01a4f286345757e700a47178bab03d217a7a5a79105b57'
- '7db9626c322928b2465aa126b48ba7f0eebd366bf2aa19c9c0a92b488cb469c5'
+ 'a768b6c8093fef56349fa61e56fae093cb962376fb0d8d0d4c98bf5fe53d29ed'
'7fa8f0ef3f9d40abd4749cc327c2f52478cb6dfb6e2405bd0279c95e9ff99f12'
'4a4c0bb9ceb156cc47e9446d8393d1f72b4fe9ea1d39ba17213359df9211da57')
@@ -40,7 +41,7 @@ prepare() {
build() {
cd postgresql-${pkgver}
- local options=(
+ local configure_options=(
--prefix=/usr
--mandir=/usr/share/man
--datadir=/usr/share/postgresql
@@ -52,61 +53,54 @@ build() {
--with-python
--with-tcl
--with-pam
+ --with-readline
--with-system-tzdata=/usr/share/zoneinfo
--with-uuid=e2fs
--with-icu
--with-systemd
--with-ldap
--with-llvm
+ --with-libxslt
+ --with-lz4
+ --with-zstd
--enable-nls
--enable-thread-safety
--disable-rpath
)
- # 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
+ # Fix static libs
+ CFLAGS+=" -ffat-lto-objects"
# regular build with everything
- ./configure ${options[@]} \
- PYTHON=/usr/bin/python2
+ ./configure "${configure_options[@]}"
make world
}
-#_postgres_check() {
-# make "${1}" || (find . -name regression.diffs | \
-# while read -r line; do
-# error "make ${1} failure: ${line}"
-# cat "${line}"
-# done; exit 1)
-#}
+_postgres_check() {
+ make "${1}" || (find . -name regression.diffs | \
+ while read -r line; do
+ echo "make ${1} failure: ${line}"
+ cat "${line}"
+ done; exit 1)
+}
-#check() {
-# cd postgresql-${pkgver}
-# _postgres_check check
-# _postgres_check check-world
-#}
+check() {
+ export LANG=C
+ cd postgresql-${pkgver}
+ _postgres_check check
+ _postgres_check check-world
+}
package_postgresql-beta-libs() {
pkgdesc="Libraries for use with PostgreSQL"
- depends=('krb5' 'openssl>=1.0.0' 'readline>=6.0' 'zlib' 'libldap')
- provides=('postgresql-client')
- conflicts=('postgresql-client')
+ depends=('krb5' 'openssl' 'readline' 'zlib' 'libldap')
+ provides=('postgresql-libs' 'libpq.so' 'libecpg.so' 'libecpg_compat.so' 'libpgtypes.so')
+ conflicts=('postgresql-libs')
cd postgresql-${pkgver}
# install license
- install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${_pkgname}"
+ install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
# install libs and non-server binaries
for dir in src/interfaces src/bin/pg_config src/bin/pg_dump src/bin/psql src/bin/scripts; do
@@ -139,11 +133,13 @@ package_postgresql-beta-libs() {
package_postgresql-beta-docs() {
pkgdesc="HTML documentation for PostgreSQL"
- options=('docs')
+ provides=('postgresql-docs')
+ conflicts=('postgresql-docs')
+ options+=('docs')
cd postgresql-${pkgver}
- install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${_pkgname}"
+ install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
make -C doc/src/sgml DESTDIR="${pkgdir}" install-html
chown -R root:root "${pkgdir}/usr/share/doc/postgresql/html"
@@ -156,13 +152,18 @@ package_postgresql-beta-docs() {
package_postgresql-beta() {
pkgdesc='Sophisticated object-relational DBMS'
backup=('etc/pam.d/postgresql' 'etc/logrotate.d/postgresql')
- depends=("postgresql-beta-libs>=${pkgver}" 'krb5' 'libxml2' 'readline>=6.0' 'openssl>=1.0.0' 'pam' 'icu' 'systemd-libs' 'libldap' 'llvm-libs')
- optdepends=('python2: for PL/Python 2 support'
- 'python: for PL/Python 3 support'
+ depends=("postgresql-beta-libs" 'krb5' 'libxml2' 'readline'
+ 'openssl' 'pam' 'icu' 'systemd-libs' 'libldap' 'llvm-libs'
+ 'libxslt' 'lz4' 'zstd')
+ optdepends=('python: for PL/Python 3 support'
'perl: for PL/Perl support'
'tcl: for PL/Tcl support'
- 'postgresql-old-upgrade: upgrade from previous major version using pg_upgrade')
- options=('staticlibs')
+ 'postgresql-old-upgrade: upgrade from previous major version using pg_upgrade'
+ 'logrotate: rotates system logs automatically')
+ provides=('postgresql')
+ conflicts=('postgresql')
+ options+=('staticlibs')
+ install=postgresql.install
cd postgresql-${pkgver}
@@ -171,14 +172,6 @@ package_postgresql-beta() {
make -C contrib DESTDIR="${pkgdir}" install
make -C doc/src/sgml DESTDIR="${pkgdir}" install-man
- # 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
-
# we don't want these, they are in the -libs package
for dir in src/interfaces src/bin/pg_config src/bin/pg_dump src/bin/psql src/bin/scripts; do
make -C ${dir} DESTDIR="${pkgdir}" uninstall
@@ -188,17 +181,17 @@ package_postgresql-beta() {
rm "${pkgdir}"/usr/share/man/man1/${util}.1
done
- install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${_pkgname}"
+ install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
cd "${srcdir}"
install -Dm 755 postgresql-check-db-dir -t "${pkgdir}/usr/bin"
- install -Dm 644 ${_pkgname}.pam "${pkgdir}/etc/pam.d/${_pkgname}"
- install -Dm 644 ${_pkgname}.logrotate "${pkgdir}/etc/logrotate.d/${_pkgname}"
+ install -Dm 644 postgresql.pam "${pkgdir}/etc/pam.d/postgresql"
+ install -Dm 644 postgresql.logrotate "${pkgdir}/etc/logrotate.d/postgresql"
- install -Dm 644 ${_pkgname}.service -t "${pkgdir}/usr/lib/systemd/system"
- install -Dm 644 ${_pkgname}.sysusers "${pkgdir}/usr/lib/sysusers.d/${_pkgname}.conf"
- install -Dm 644 ${_pkgname}.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/${_pkgname}.conf"
+ install -Dm 644 postgresql.service -t "${pkgdir}/usr/lib/systemd/system"
+ install -Dm 644 postgresql.sysusers "${pkgdir}/usr/lib/sysusers.d/postgresql.conf"
+ install -Dm 644 postgresql.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/postgresql.conf"
# clean up unneeded installed items
rm -rf "${pkgdir}/usr/include/postgresql/internal"