From 98d4237849a19331645be65fd9ea153e372aa5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 12 Feb 2022 00:14:20 +0100 Subject: [PATCH 1/3] postgresql13: update to 13.7. --- srcpkgs/postgresql13/template | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/srcpkgs/postgresql13/template b/srcpkgs/postgresql13/template index 0f7b79fd6710..08e67ba226bd 100644 --- a/srcpkgs/postgresql13/template +++ b/srcpkgs/postgresql13/template @@ -1,7 +1,7 @@ # Template file for 'postgresql13' pkgname=postgresql13 -version=13.5 -revision=2 +version=13.7 +revision=1 wrksrc="postgresql-${version}" build_style=gnu-configure make_build_target=world @@ -21,7 +21,8 @@ license="PostgreSQL" homepage="https://www.postgresql.org" changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html" distfiles="https://ftp.postgresql.org/pub/source/v${version}/postgresql-${version}.tar.bz2" -checksum=9b81067a55edbaabc418aacef457dd8477642827499560b00615a6ea6c13f6b3 +checksum=1b905bf4f3d83614a393b3c51fd345910fd261e4f5124a68d9a1fdd3a2a46399 +make_check=ci-skip # Postgres server can't be run as root conf_files=" /${_prefix}/etc/default/postgresql @@ -223,5 +224,6 @@ postgresql13-contrib_package() { short_desc="PostgreSQL contributed programs and extensions" pkg_install() { make -C contrib install DESTDIR=${PKGDESTDIR} + mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix} } } From 4189e75ad3b592434ac91d917a04ff39a165516f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 12 Feb 2022 00:14:20 +0100 Subject: [PATCH 2/3] postgresql14: update to 14.4. --- srcpkgs/postgresql14/template | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/srcpkgs/postgresql14/template b/srcpkgs/postgresql14/template index 94ba16bffbc6..2aa65e684a1d 100644 --- a/srcpkgs/postgresql14/template +++ b/srcpkgs/postgresql14/template @@ -1,6 +1,6 @@ # Template file for 'postgresql14' pkgname=postgresql14 -version=14.1 +version=14.4 revision=1 wrksrc="postgresql-${version}" build_style=gnu-configure @@ -22,7 +22,8 @@ license="PostgreSQL" homepage="https://www.postgresql.org" changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html" distfiles="https://ftp.postgresql.org/pub/source/v${version}/postgresql-${version}.tar.bz2" -checksum=4d3c101ea7ae38982f06bdc73758b53727fb6402ecd9382006fa5ecc7c2ca41f +checksum=c23b6237c5231c791511bdc79098617d6852e9e3bdf360efd8b5d15a1a3d8f6a +make_check=ci-skip # Postgres server can't be run as root conf_files=" /${_sysconfdir}/default/postgresql @@ -224,5 +225,6 @@ postgresql14-contrib_package() { short_desc="PostgreSQL contributed programs and extensions" pkg_install() { make -C contrib install DESTDIR=${PKGDESTDIR} + mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix} } } From 00c1ff8f6e919756c8a44a509457d217a0ad5efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 12 Feb 2022 00:14:20 +0100 Subject: [PATCH 3/3] postgresql: turn into meta package 9.6 is EOL --- srcpkgs/postgresql-full | 1 + srcpkgs/postgresql/files/pg_config.sh.in | 143 ------------- srcpkgs/postgresql/files/postgresql.confd | 17 -- srcpkgs/postgresql/files/postgresql.pam | 3 - srcpkgs/postgresql/files/postgresql/control/t | 2 - srcpkgs/postgresql/files/postgresql/log/run | 2 - srcpkgs/postgresql/files/postgresql/run | 30 --- .../patches/pg_config-cross-value.patch | 46 ----- srcpkgs/postgresql/template | 189 +++--------------- 9 files changed, 30 insertions(+), 403 deletions(-) create mode 120000 srcpkgs/postgresql-full delete mode 100644 srcpkgs/postgresql/files/pg_config.sh.in delete mode 100644 srcpkgs/postgresql/files/postgresql.confd delete mode 100644 srcpkgs/postgresql/files/postgresql.pam delete mode 100755 srcpkgs/postgresql/files/postgresql/control/t delete mode 100755 srcpkgs/postgresql/files/postgresql/log/run delete mode 100755 srcpkgs/postgresql/files/postgresql/run delete mode 100644 srcpkgs/postgresql/patches/pg_config-cross-value.patch diff --git a/srcpkgs/postgresql-full b/srcpkgs/postgresql-full new file mode 120000 index 000000000000..360e6d1a1f45 --- /dev/null +++ b/srcpkgs/postgresql-full @@ -0,0 +1 @@ +postgresql \ No newline at end of file diff --git a/srcpkgs/postgresql/files/pg_config.sh.in b/srcpkgs/postgresql/files/pg_config.sh.in deleted file mode 100644 index 4598753f6931..000000000000 --- a/srcpkgs/postgresql/files/pg_config.sh.in +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/sh -# Released to Public Domain by Doan Tran Cong Danh - -print() { - printf '%s\n' "$@" -} - -sysroot="$(cd "${0%/*}" && cd ../.. && pwd)" - -BINDIR="$sysroot/usr/bin" -DOCDIR="$sysroot/usr/share/doc/postgresql" -HTMLDIR="$sysroot/usr/share/doc/postgresql" -INCLUDEDIR="$sysroot/usr/include" -PKGINCLUDEDIR="$sysroot/usr/include/postgresql" -INCLUDEDIR_SERVER="$sysroot/usr/include/postgresql/server" -LIBDIR="$sysroot/usr/lib" -PKGLIBDIR="$sysroot/usr/lib/postgresql" -LOCALEDIR="$sysroot/usr/share/locale" -MANDIR="$sysroot/usr/share/man" -SHAREDIR="$sysroot/usr/share/postgresql" -SYSCONFDIR="$sysroot/etc/postgresql" -PGXS="$sysroot/usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk" - -CONFIGURE="@configure_args@" -CC="@CC@" -CPPFLAGS="@CPPFLAGS@" -CFLAGS="@CFLAGS@" -CFLAGS_SL="@CFLAGS_SL@" -LDFLAGS="@LDFLAGS@" -LDFLAGS_EX="@LDFLAGS_EX@" -LDFLAGS_SL="@LDFLAGS_SL@" -LIBS="@LIBS@" -VERSION="PostgreSQL @VERSION@" - -if [ "$sysroot" != "/" ]; then - CPPFLAGS="$(print "$CPPFLAGS" | sed "s,-I *\\(/usr/include\\),-I$sysroot\\1,g")" - CFLAGS="$(print "$CFLAGS" | sed "s,-I *\\(/usr/include\\),-I$sysroot\\1,g")" - LDFLAGS="$(print "$LDFLAGS" | sed "s,-L *\\(/usr/lib\\),-L$sysroot\\1,g")" -fi - -usage() { - cat <<-EOF - $0 provides information about the installed version of PostgreSQL. - - Usage: - $0 [OPTION]... - - Options: - --bindir show location of user executables - --docdir show location of documentation files - --htmldir show location of HTML documentation files - --includedir show location of C header files of the client interfaces - --pkgincludedir show location of other C header files - --includedir-server show location of C header files for the server - --libdir show location of object code libraries - --pkglibdir show location of dynamically loadable modules - --localedir show location of locale support files - --mandir show location of manual pages - --sharedir show location of architecture-independent support files - --sysconfdir show location of system-wide configuration files - --pgxs show location of extension makefile - --configure show options given to PostgreSQL was built - --cc show CC value used when PostgreSQL was built - --cppflags show CPPFLAGS value used when PostgreSQL was built - --cflags show CFLAGS value used when PostgreSQL was built - --cflags_sl show CFLAGS_SL value used when PostgreSQL was built - --ldflags show LDFLAGS value used when PostgreSQL was built - --ldflags_ex show LDFLAGS_EX value used when PostgreSQL was built - --ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built - --libs show LIBS value used when PostgreSQL was built - --version show the PostgreSQL version - -?, --help show this help, then exit - - With no arguments, all known items are shown. - - Report bugs to . - EOF -} - -if test $# -eq 0; then - cat <<-EOF - BINDIR = $BINDIR - DOCDIR = $DOCDIR - HTMLDIR = $HTMLDIR - INCLUDEDIR = $INCLUDEDIR - PKGINCLUDEDIR = $PKGINCLUDEDIR - INCLUDEDIR-SERVER = $INCLUDEDIR_SERVER - LIBDIR = $LIBDIR - PKGLIBDIR = $PKGLIBDIR - LOCALEDIR = $LOCALEDIR - MANDIR = $MANDIR - SHAREDIR = $SHAREDIR - SYSCONFDIR = $SYSCONFDIR - PGXS = $PGXS - CONFIGURE = $CONFIGURE - CC = $CC - CPPFLAGS = $CPPFLAGS - CFLAGS = $CFLAGS - CFLAGS_SL = $CFLAGS_SL - LDFLAGS = $LDFLAGS - LDFLAGS_EX = $LDFLAGS_EX - LDFLAGS_SL = $LDFLAGS_SL - LIBS = $LIBS - VERSION = $VERSION - EOF -fi - -for arg -do - if test "x$arg" = "x--help" || test "x$arg" = "x-?"; then - usage - exit 0 - fi -done - -for arg -do - case "$arg" in - --bindir) print "$BINDIR" ;; - --docdir) print "$DOCDIR" ;; - --htmldir) print "$HTMLDIR" ;; - --includedir) print "$INCLUDEDIR" ;; - --pkgincludedir) print "$PKGINCLUDEDIR" ;; - --includedir-server) print "$INCLUDEDIR_SERVER" ;; - --libdir) print "$LIBDIR" ;; - --pkglibdir) print "$PKGLIBDIR" ;; - --localedir) print "$LOCALEDIR" ;; - --mandir) print "$MANDIR" ;; - --sharedir) print "$SHAREDIR" ;; - --sysconfdir) print "$SYSCONFDIR" ;; - --pgxs) print "$PGXS" ;; - --configure) print "$CONFIGURE" ;; - --cc) print "$CC" ;; - --cppflags) print "$CPPFLAGS" ;; - --cflags) print "$CFLAGS" ;; - --cflags_sl) print "$CFLAGS_SL" ;; - --ldflags) print "$LDFLAGS" ;; - --ldflags_ex) print "$LDFLAGS_EX" ;; - --ldflags_sl) print "$LDFLAGS_SL" ;; - --libs) print "$LIBS" ;; - --version) print "$VERSION" ;; - esac -done diff --git a/srcpkgs/postgresql/files/postgresql.confd b/srcpkgs/postgresql/files/postgresql.confd deleted file mode 100644 index 2a3cd1469b05..000000000000 --- a/srcpkgs/postgresql/files/postgresql.confd +++ /dev/null @@ -1,17 +0,0 @@ -# Configuration file for the PostgreSQL server. - -# PostgreSQL's database directory -PGROOT="/var/lib/postgresql" - -# PostgreSQL's log file. -PGLOG="/var/log/postgresql.log" - -# Passed to initdb if necessary -INITOPTS="-A peer --auth-host=md5 --auth-local=peer --locale en_US.UTF-8" - -# Extra options to run postmaster with, e.g.: -# -N is the maximal number of client connections -# -B is the number of shared buffers and has to be at least 2x the value for -N -# Please read the man-page to postmaster for more options. Many of these options -# can be set directly in the configuration-file. -#PGOPTS="-N 512 -B 1024" diff --git a/srcpkgs/postgresql/files/postgresql.pam b/srcpkgs/postgresql/files/postgresql.pam deleted file mode 100644 index 53724d1f86a7..000000000000 --- a/srcpkgs/postgresql/files/postgresql.pam +++ /dev/null @@ -1,3 +0,0 @@ -auth required pam_unix.so -account required pam_unix.so -session required pam_unix.so diff --git a/srcpkgs/postgresql/files/postgresql/control/t b/srcpkgs/postgresql/files/postgresql/control/t deleted file mode 100755 index b0026e5661b4..000000000000 --- a/srcpkgs/postgresql/files/postgresql/control/t +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/usr/bin/kill -INT `/usr/bin/head -1 /run/runit/supervise.postgresql/pid` diff --git a/srcpkgs/postgresql/files/postgresql/log/run b/srcpkgs/postgresql/files/postgresql/log/run deleted file mode 100755 index e564447b60db..000000000000 --- a/srcpkgs/postgresql/files/postgresql/log/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec logger -p daemon.info -t postgres diff --git a/srcpkgs/postgresql/files/postgresql/run b/srcpkgs/postgresql/files/postgresql/run deleted file mode 100755 index 3982873cde69..000000000000 --- a/srcpkgs/postgresql/files/postgresql/run +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -. /etc/default/postgresql -: ${PGDATA:="$PGROOT/data"} - -if [ "$PGROOT" != "/var/lib/postgresql" ]; then - echo "Creating symlink /var/lib/postgresql -> $PGROOT" - - # Remove /var/lib/postgres if empty dir, but not if symlink - if [ ! -L /var/lib/postgres ] && [ -d /var/lib/postgres ]; then - rmdir /var/lib/postgres - fi - - ln -sf "$PGROOT" /var/lib/postgresql -fi - - -if [ ! -d "$PGDATA" ]; then - echo "Initializing database in $PGDATA" - - mkdir -p "$PGDATA" - chown -R postgres:postgres "$PGDATA" - chmod 0700 "$PGDATA" - su - postgres -m -c "/usr/bin/initdb $INITOPTS -D '$PGDATA'" >/dev/null - - if [ -f /etc/postgresql/postgresql.conf ]; then - ln -sf /etc/postgresql/postgresql.conf "$PGDATA/postgresql.conf" - fi -fi - -exec chpst -u postgres:postgres postgres -D "$PGDATA" $PGOPTS 2>&1 diff --git a/srcpkgs/postgresql/patches/pg_config-cross-value.patch b/srcpkgs/postgresql/patches/pg_config-cross-value.patch deleted file mode 100644 index 214344520d7f..000000000000 --- a/srcpkgs/postgresql/patches/pg_config-cross-value.patch +++ /dev/null @@ -1,46 +0,0 @@ -Sources: Doan Tran Cong Danh -Upstream: No - - First part needs to be rework in configure script to be usable - upstream - - Second part would un-usable for Windows -diff --git src/common/Makefile src/common/Makefile -index ec04710..2af845f 100644 ---- a/src/common/Makefile -+++ b/src/common/Makefile -@@ -22,11 +22,14 @@ include $(top_builddir)/src/Makefile.global - - # don't include subdirectory-path-dependent -I and -L switches - STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS)) -+STD_CPPFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_CPPFLAGS)) -+STD_CFLAGS := $(subst @XBPS_SYSROOT@,,$(CFLAGS)) - STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS)) -+STD_LDFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_LDFLAGS)) - override CPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\"" - override CPPFLAGS += -DVAL_CC="\"$(CC)\"" - override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\"" --override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\"" -+override CPPFLAGS += -DVAL_CFLAGS="\"$(STD_CFLAGS)\"" - override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\"" - override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\"" - override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\"" -@@ -44,7 +47,19 @@ OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o restricted_token.o - - OBJS_SRV = $(OBJS_COMMON:%.o=%_srv.o) - --all: libpgcommon.a libpgcommon_srv.a -+all: libpgcommon.a libpgcommon_srv.a pg_config.sh -+ -+pg_config.sh: pg_config.sh.in -+ sed -e "s/@configure_args@/$(subst /,\\/,$(configure_args))/" \ -+ -e "s/@CC@/$(subst /,\\/,$(CC))/" \ -+ -e "s/@CPPFLAGS@/$(subst /,\\/,$(STD_CPPFLAGS))/" \ -+ -e "s/@CFLAGS@/$(subst /,\\/,$(STD_CFLAGS))/" \ -+ -e "s/@CFLAGS_SL@/$(subst /,\\/,$(CFLAGS_SL))/" \ -+ -e "s/@LDFLAGS@/$(subst /,\\/,$(STD_LDFLAGS))/" \ -+ -e "s/@LDFLAGS_EX@/$(subst /,\\/,$(LDFLAGS_EX))/" \ -+ -e "s/@LDFLAGS_SL@/$(subst /,\\/,$(LDFLAGS_SL))/" \ -+ -e "s/@LIBS@/$(subst /,\\/,$(LIBS))/" \ -+ $< >$@ - - # libpgcommon is needed by some contrib - install: all installdirs diff --git a/srcpkgs/postgresql/template b/srcpkgs/postgresql/template index d9fcad13bbf8..4f539b0df9ff 100644 --- a/srcpkgs/postgresql/template +++ b/srcpkgs/postgresql/template @@ -1,191 +1,60 @@ # Template file for 'postgresql' pkgname=postgresql -version=9.6.24 +version=14 revision=1 -build_style=gnu-configure -make_build_target=world -configure_args="--with-openssl --with-python - --with-pam --datadir=/usr/share/postgresql --enable-thread-safety - --with-perl --with-tcl --without-ldap --without-gssapi --without-krb5 - --without-bonjour --with-libxml --with-libxslt --disable-rpath - --with-system-tzdata=/usr/share/zoneinfo --enable-nls --with-uuid=e2fs" -hostmakedepends="docbook2x flex gettext openjade" -makedepends="libfl-devel openssl-devel libuuid-devel libxslt-devel pam-devel perl - python-devel readline-devel tcl-devel" -short_desc="Sophisticated open-source Object-Relational DBMS" +build_style=meta +depends="postgresql${version}" +short_desc="PostgreSQL server meta package" maintainer="Piotr Wójcik " license="PostgreSQL" homepage="https://www.postgresql.org" -changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html" -distfiles="https://ftp.postgresql.org/pub/source/v${version}/${pkgname}-${version}.tar.bz2" -checksum=aeb7a196be3ebed1a7476ef565f39722187c108dd47da7489be9c4fcae982ace -# initdb fails on github actions, works locally with xbps-uunshare -make_check=ci-skip -conf_files=" - /etc/default/${pkgname} - /etc/pam.d/${pkgname} - /etc/${pkgname}/${pkgname}.conf" - -# Create 'postgres' user for the server. -system_accounts="postgres" -postgres_homedir="/var/lib/${pkgname}" -postgres_shell="/bin/sh" -postgres_descr="PostgreSQL database server user" -make_dirs="/var/lib/postgresql 0750 postgres postgres" - -if [ "$CROSS_BUILD" ]; then - configure_args+=" --without-perl --without-python --without-tcl" +build_options="languages" +desc_option_languages="Include procedural languages as dependency" +if [ -z "$CROSS_BUILD" ]; then + build_options_default="languages" fi -post_patch() { - sed -e "s/@VERSION@/$version/" \ - "$FILESDIR"/pg_config.sh.in >src/common/pg_config.sh.in - vsed -i -e "s,@XBPS_SYSROOT@,${XBPS_CROSS_BASE%/}," src/common/Makefile -} - -pre_build() { - # http://www.postgresql.org/docs/9.3/static/docguide-toolsets.html - export SGML_CATALOG_FILES="/usr/share/sgml/openjade/catalog:/usr/share/sgml/iso8879/catalog:/usr/share/sgml/docbook/dsssl/modular/catalog:/usr/share/sgml/docbook/4.2/catalog" -} - -post_build() { - make -C contrib ${makejobs} -} - -post_install() { - make -C contrib install - - vmkdir usr/share/man - cp -r doc/src/sgml/man? ${DESTDIR}/usr/share/man - vmkdir usr/share/doc/postgresql - cp -r doc/src/sgml/html ${DESTDIR}/usr/share/doc/postgresql - vsv postgresql - vlicense COPYRIGHT - - vinstall ${FILESDIR}/${pkgname}.confd 644 etc/default ${pkgname} - vinstall ${FILESDIR}/${pkgname}.pam 644 etc/pam.d ${pkgname} - vinstall ${DESTDIR}/usr/share/${pkgname}/${pkgname}.conf.sample \ - 644 etc/${pkgname} ${pkgname}.conf - vbin src/common/pg_config.sh - - sed -i 's/install_bin = .*/install_bin = install/g' \ - ${DESTDIR}/usr/lib/postgresql/pgxs/src/Makefile.global -} - postgresql-doc_package() { - short_desc="PostgreSQL documentation" - pkg_install() { - vmove usr/share/doc - } -} - -postgresql9.6-libs_package() { - short_desc="PostgreSQL shared libraries" - pkg_install() { - vmove "usr/lib/*.so*" - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name libpq5\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - } -} - -postgresql9.6-libs-devel_package() { - depends="postgresql-libs>=$version" - short_desc="PostgreSQL shared libraries (development files)" - pkg_install() { - for f in pg_config ecpg; do - vmove usr/bin/${f} - vmove "usr/share/man/man1/$(basename ${f})*" - done - vmove usr/bin/pg_config.sh - vmove usr/include - vmove "usr/lib/*.a" - vmove "usr/lib/pkgconfig/*" - vmove usr/share/man/man3 - vmove usr/lib/postgresql/pgxs - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name pg_config\* -o -name ecpg\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - } + depends="postgresql${version}-doc" + short_desc="PostgreSQL documentation meta package" } # XXX disabled for now in cross builds. -if [ -z "$CROSS_BUILD" ]; then +if [ "$build_option_languages" ]; then postgresql-plperl_package() { - depends="postgresql>=$version" - short_desc="PL/Perl procedural language for PostgreSQL" - pkg_install() { - vmove "usr/lib/postgresql/plperl*" - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name plperl\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - } + depends="postgresql${version}-plperl" + short_desc="PL/Perl language meta package" } postgresql-plpython_package() { - depends="postgresql>=$version" - short_desc="PL/Python procedural language for PostgreSQL" - pkg_install() { - vmove "usr/lib/postgresql/plpython*" - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name plpython\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - } + depends="postgresql${version}-plpython" + short_desc="PL/Python language meta package" } postgresql-pltcl_package() { - depends="postgresql>=$version" - short_desc="PL/Tcl procedural language for PostgreSQL" - pkg_install() { - vmove "usr/bin/pltcl*" - vmove "usr/lib/postgresql/pltcl*" - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name pltcl\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - vmove "usr/share/postgresql/*.pltcl" - } + depends="postgresql${version}-pltcl" + short_desc="PL/Tcl language meta package" } -fi # !CROSS_BUILD +fi # build_option_languages postgresql-client_package() { + depends="postgresql${version}-client" short_desc="Client frontends programs for PostgreSQL" - pkg_install() { - for f in clusterdb createdb createlang createuser dropdb droplang \ - dropuser pg_dump pg_dumpall pg_isready pg_restore psql reindexdb \ - vacuumdb; do - vmove usr/bin/${f} - vmove usr/share/man/man1/$(basename ${f}).1 - done - vmove usr/share/man/man7 - for d in $(find ${DESTDIR}/usr/share/locale \ - -type f -name pgscripts\* -o \ - -name psql\* -o \ - -name pg_dump\*); do - mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}}) - done - vmkdir usr/share/postgresql - mv ${DESTDIR}/usr/share/postgresql/psqlrc.* \ - ${PKGDESTDIR}/usr/share/postgresql - } } postgresql-contrib_package() { + depends="postgresql${version}-contrib" short_desc="PostgreSQL contributed programs and extensions" - pkg_install() { - make -C contrib install DESTDIR=${PKGDESTDIR} - } +} + +postgresql-full() { + depends="postgresql postgresql-client postgresql-doc postgresql-contrib postgresql-libs" + short_desc="PostgreSQL all packages meta package" + + if [ "$build_option_languages" ]; then + depends+=" postgresql-plpython postgresql-plperl postgresql-pltcl" + fi }