summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorGoliathLabs2020-05-10 12:34:47 +0200
committerGoliathLabs2020-05-10 12:34:47 +0200
commit2d1deb5a52c766b33039e1738de1622dbe92c6fc (patch)
tree4444fc60eaeb6189641475767c49eb431d389f77 /PKGBUILD
parent3f728fad9e23261520b6c11d1368349f69f55076 (diff)
downloadaur-2d1deb5a52c766b33039e1738de1622dbe92c6fc.tar.gz
Updated: PKGBUILD
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD197
1 files changed, 149 insertions, 48 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b1a4de9e3e9c..44aba5455239 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,80 +1,181 @@
-# Maintainer: Thomas Arnhold <thomas@arnhold.org
+# Maintainer: Felix Golatofski <contact@xdfr.de>
+# Contributor: Thomas Arnhold <thomas@arnhold.org
# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Dan McGee <dan@archlinux.org>
# Contributor: Kuba Kuźma <kuba@jah.pl>
# Contributor: Matthew Carter <m@ahungry.com>
# Contributor: Ariel Popper <a@arielp.com>
-pkgname=postgresql-9.6
+pkgbase=postgresql-9.6
+pkgname=('postgresql-libs-9.6' 'postgresql-docs-9.6' 'postgresql-9.6')
pkgver=9.6.17
-pkgrel=1
+pkgrel=2
+pkgdesc='Sophisticated object-relational DBMS'
+url="https://www.postgresql.org/"
arch=('i686' 'x86_64')
-url="http://www.postgresql.org/"
-pkgdesc="A powerful, open source object-relational database system"
license=('custom:PostgreSQL')
-conflicts=('postgresql' 'postgresql-libs' 'postgresql-testing' 'postgresql-client' 'postgresql-docs')
-provides=("postgresql=$pkgver" "postgresql-libs=$pkgver" "postgresql-client=$pkgver" "postgresql-docs=$pkgver")
-depends=('libxml2' 'krb5' 'openssl>=1.0.0' 'readline>=6.0' 'pam' 'zlib')
-makedepends=('python2' 'perl' 'tcl>=8.6.0')
-optdepends=('python2: for PL/Python support'
- 'perl: for PL/Perl support'
- 'tcl: for PL/Tcl support'
- 'postgresql-old-upgrade: upgrade from previous major version using pg_upgrade')
-install=postgresql.install
+makedepends=('krb5' 'libxml2' 'python' 'python2' 'perl' 'tcl>=8.6.0' 'openssl>=1.0.0'
+ 'pam' 'zlib' 'icu' 'systemd' 'libldap' 'llvm' 'clang')
source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2
postgresql-run-socket.patch
+ postgresql-perl-rpath.patch
postgresql.pam
postgresql.logrotate
postgresql.service
- postgresql-check-db-dir)
+ postgresql-check-db-dir
+ postgresql.sysusers
+ postgresql.tmpfiles)
sha256sums=('f6e1e32d32545f97c066f3c19f4d58dfab1205c01252cf85c5c92294ace1a0c2'
'8538619cb8bea51078b605ad64fe22abd6050373c7ae3ad6595178da52f6a7d9'
+ '5f73b54ca6206bd2c469c507830261ebd167baca074698d8889d769c33f98a31'
'57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
'6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e'
- 'b48fe97f8e43ed0d2041d519119a4dafb70fcae72870951bf4fb7350fe169ac8'
- '2340da0947bcb1c5602008d0ca00588ca0bfa8aca4fa6947a8bdb2c6df800b0e')
+ '25fb140b90345828dc01a4f286345757e700a47178bab03d217a7a5a79105b57'
+ '40da687da4fb1f6b35f406dd0f48922065d8c905d678e2a27da05806f874b780'
+ '7fa8f0ef3f9d40abd4749cc327c2f52478cb6dfb6e2405bd0279c95e9ff99f12'
+ '4a4c0bb9ceb156cc47e9446d8393d1f72b4fe9ea1d39ba17213359df9211da57')
+prepare() {
+ cd postgresql-${pkgver}
+ patch -p1 < ../postgresql-run-socket.patch
+ patch -p1 < ../postgresql-perl-rpath.patch
+}
build() {
cd "${srcdir}/postgresql-${pkgver}"
- patch -Np1 < ../postgresql-run-socket.patch
-
- ./configure --prefix=/usr \
- --mandir=/usr/share/man \
- --datadir=/usr/share/postgresql \
- --sysconfdir=/etc \
- --with-krb5 \
- --with-gssapi \
- --with-libxml \
- --with-openssl \
- --with-perl \
- --with-python PYTHON=/usr/bin/python2 \
- --with-tcl \
- --with-pam \
- --with-system-tzdata=/usr/share/zoneinfo \
- --with-uuid=e2fs \
- --enable-nls \
- --enable-thread-safety
-
+ local options=(
+ --prefix=/usr
+ --mandir=/usr/share/man
+ --datadir=/usr/share/postgresql
+ --sysconfdir=/etc
+ --with-gssapi
+ --with-libxml
+ --with-openssl
+ --with-perl
+ --with-python
+ --with-tcl
+ --with-pam
+ --with-system-tzdata=/usr/share/zoneinfo
+ --with-uuid=e2fs
+ --with-icu
+ --with-systemd
+ --with-ldap
+ --with-llvm
+ --enable-nls
+ --enable-thread-safety
+ --disable-rpath
+ )
+ # regular build with everything
+ ./configure ${options[@]} \
+ PYTHON=/usr/bin/python2
make world
}
-package() {
- cd "${srcdir}/postgresql-${pkgver}"
+package_postgresql-libs-9.6() {
+ pkgdesc="Libraries for use with PostgreSQL"
+ depends=('krb5' 'openssl>=1.0.0' 'readline>=6.0' 'zlib' 'libldap')
+ provides=('postgresql-client' "postgresql-libs=$pkgver")
+ conflicts=('postgresql-client' 'postgresql-libs')
- make DESTDIR="${pkgdir}" install-world
+ cd "${srcdir}/postgresql-${pkgver}"
# install license
- install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ 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
+ make -C ${dir} DESTDIR="${pkgdir}" install
+ done
+
+ for util in pg_config pg_dump pg_dumpall pg_restore psql \
+ clusterdb createdb createuser dropdb dropuser pg_isready reindexdb vacuumdb; do
+ install -Dm 644 doc/src/sgml/man1/${util}.1 "${pkgdir}"/usr/share/man/man1/${util}.1
+ done
+
+ cd src/include
+
+ install -d "${pkgdir}"/usr/include/{libpq,postgresql/internal/libpq}
+
+ # these headers are needed by the public headers of the interfaces
+ install -m 644 pg_config.h "${pkgdir}/usr/include"
+ install -m 644 pg_config_os.h "${pkgdir}/usr/include"
+ install -m 644 pg_config_ext.h "${pkgdir}/usr/include"
+ install -m 644 postgres_ext.h "${pkgdir}/usr/include"
+ install -m 644 libpq/libpq-fs.h "${pkgdir}/usr/include/libpq"
+ install -m 644 pg_config_manual.h "${pkgdir}/usr/include"
+
+ # these he aders are needed by the not-so-public headers of the interfaces
+ install -m 644 c.h "${pkgdir}/usr/include/postgresql/internal"
+ install -m 644 port.h "${pkgdir}/usr/include/postgresql/internal"
+ install -m 644 postgres_fe.h "${pkgdir}/usr/include/postgresql/internal"
+ install -m 644 libpq/pqcomm.h "${pkgdir}/usr/include/postgresql/internal/libpq"
+}
+
+package_postgresql-docs-9.6() {
+ pkgdesc="HTML documentation for PostgreSQL"
+ options=('docs')
+ provides=("postgresql-docs=$pkgver")
+ conflicts=('postgresql-docs')
- install -D -m644 "${srcdir}/postgresql.service" \
- "${pkgdir}/usr/lib/systemd/system/postgresql.service"
- install -D -m755 "${srcdir}/postgresql-check-db-dir" \
- "${pkgdir}/usr/bin/postgresql-check-db-dir"
+ cd postgresql-${pkgver}
- install -D -m644 "${srcdir}/postgresql.pam" \
- "${pkgdir}/etc/pam.d/postgresql"
+ install -Dm 644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
- install -D -m644 "${srcdir}/postgresql.logrotate" \
- "${pkgdir}/etc/logrotate.d/postgresql"
+ make -C doc/src/sgml DESTDIR="${pkgdir}" install-html
+ chown -R root:root "${pkgdir}/usr/share/doc/postgresql/html"
+
+ # clean up
+ rmdir "${pkgdir}"/usr/share/man/man{1,3,7}
+ rmdir "${pkgdir}"/usr/share/man
+}
+
+package_postgresql-9.6() {
+ pkgdesc='Sophisticated object-relational DBMS'
+ backup=('etc/pam.d/postgresql' 'etc/logrotate.d/postgresql')
+ depends=("postgresql-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'
+ 'perl: for PL/Perl support'
+ 'tcl: for PL/Tcl support'
+ 'postgresql-old-upgrade: upgrade from previous major version using pg_upgrade')
+ provides=("postgresql=$pkgver")
+ conflicts=('postgresql')
+ options=('staticlibs')
+ install=postgresql.install
+
+ cd postgresql-${pkgver}
+
+ # install
+ make DESTDIR="${pkgdir}" install
+ make -C contrib DESTDIR="${pkgdir}" install
+ make -C doc/src/sgml DESTDIR="${pkgdir}" install-man
+
+ # 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
+ done
+ for util in pg_config pg_dump pg_dumpall pg_restore psql \
+ clusterdb createdb createuser dropdb dropuser pg_isready reindexdb vacuumdb; do
+ rm "${pkgdir}"/usr/share/man/man1/${util}.1
+ done
+
+ 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 postgresql.pam "${pkgdir}/etc/pam.d/postgresql"
+ install -Dm 644 postgresql.logrotate "${pkgdir}/etc/logrotate.d/postgresql"
+
+ 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"
+ rm -rf "${pkgdir}/usr/include/libpq"
+ find "${pkgdir}/usr/include" -maxdepth 1 -type f -execdir rm {} +
+ rmdir "${pkgdir}/usr/share/doc/postgresql/html"
}
+
+# vim: ts=2 sw=2 et: