diff options
Diffstat (limited to 'system/postgresql/postgresql.SlackBuild')
-rw-r--r-- | system/postgresql/postgresql.SlackBuild | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/system/postgresql/postgresql.SlackBuild b/system/postgresql/postgresql.SlackBuild index 0c043fa2bc..f405f0e0ce 100644 --- a/system/postgresql/postgresql.SlackBuild +++ b/system/postgresql/postgresql.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for PostgreSQL # @@ -24,12 +24,18 @@ # Modified by the SlackBuilds.org Project +# 20220301 bkw: Modified by SlackBuilds.org, BUILD=2: +# - strip pg_config binary (install-strip misses that one). + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=postgresql -VERSION=${VERSION:-10.10} +VERSION=${VERSION:-14.9} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} -PG_VERSION=${PG_VERSION:-10.10} +PG_VERSION=${PG_VERSION:-14} PG_PORT=${PG_PORT:-5432} PG_UID=${PG_UID:-209} PG_GID=${PG_GID:-209} @@ -42,7 +48,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -51,11 +61,11 @@ OUTPUT=${OUTPUT:-/tmp} # For slackbuilds.org, assigned postgres uid/gid are 209/209 # See http://slackbuilds.org/uid_gid.txt # Other popular choice is 26/26 -if ! grep ^postgres: /etc/group 2>&1 > /dev/null; then +if ! grep ^postgres: /etc/group > /dev/null 2>&1 ; then echo " You must have a postgres group to run this script." echo " # groupadd -g $PG_GID postgres" exit 1 -elif ! grep ^postgres: /etc/passwd 2>&1 > /dev/null; then +elif ! grep ^postgres: /etc/passwd > /dev/null 2>&1 ; then echo " You must have a postgres user to run this script." echo " # useradd -u $PG_UID -g $PG_GID -d /var/lib/pgsql postgres" exit 1 @@ -97,6 +107,7 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ +PYTHON="/usr/bin/python3" \ ./configure \ --prefix=/usr/lib${LIBDIRSUFFIX}/$PRGNAM/$PG_VERSION \ --sysconfdir=/etc/$PRGNAM/$PG_VERSION \ @@ -120,6 +131,9 @@ make make install-strip DESTDIR=$PKG make install-docs DESTDIR=$PKG +# 20220414 bkw: this one binary wasn't getting stripped... +strip $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/$PG_VERSION/bin/pg_config + # create symlinks to shared library for other programs to link against ( cd $PKG/usr/lib${LIBDIRSUFFIX} for i in $(ls $PRGNAM/$PG_VERSION/lib/lib*.so*) ; do ln -sf $i ; done @@ -132,7 +146,7 @@ make install-docs DESTDIR=$PKG ) # Some interesting additional modules: -# http://www.postgresql.org/docs/10.2/static/contrib.html +# https://www.postgresql.org/docs/14/contrib.html # # adminpack - helper extension for pgAdmin # pgcrypto - extension for some business applications @@ -142,7 +156,7 @@ make install-docs DESTDIR=$PKG PG_EXTENSIONS=${PG_EXTENSIONS:-"adminpack pgcrypto ltree xml2 postgres_fdw file_fdw hstore citext"} -if [ "x$PG_EXTENSIONS" = "xALL" ];then +if [ "$PG_EXTENSIONS" = "ALL" ];then cd $TMP/$PRGNAM-$VERSION/contrib make all make install-strip DESTDIR=$PKG @@ -202,4 +216,4 @@ sed -e "s%@PG_VERSION@%$PG_VERSION%" \ $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |