diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:17:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:17:36 +0000 |
commit | 3a769c868a5aa5095b46177fcf1245569b1d42b6 (patch) | |
tree | bb4e21e22f8a4905b7e6b441f5b8729550971828 /debian/postgresql-doc-15.postinst | |
parent | Adding upstream version 15.5. (diff) | |
download | postgresql-15-3a769c868a5aa5095b46177fcf1245569b1d42b6.tar.xz postgresql-15-3a769c868a5aa5095b46177fcf1245569b1d42b6.zip |
Adding debian version 15.5-0+deb12u1.debian/15.5-0+deb12u1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/postgresql-doc-15.postinst')
-rw-r--r-- | debian/postgresql-doc-15.postinst | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/postgresql-doc-15.postinst b/debian/postgresql-doc-15.postinst new file mode 100644 index 0000000..d647cf4 --- /dev/null +++ b/debian/postgresql-doc-15.postinst @@ -0,0 +1,30 @@ +#!/bin/sh + +set -e + +VERSION=${DPKG_MAINTSCRIPT_PACKAGE##*-} + +# arguments: version master package [package] +__link_manpages() { + MANS=$(unset GREP_OPTIONS; dpkg -L $3 $4 $5 2>/dev/null | grep -E '/man/.*\.[1-9](\.gz)?$' | grep -v "$2") || true + [ -n "$MANS" ] || return 0 + + SLAVES=$(for i in $MANS; do TARGET=$(echo $i | sed "s/postgresql\/$1\///"); echo -n " --slave $TARGET $(basename $i) $i"; done) + + mkdir -p /usr/share/man/man3 + section=$(echo "$2" | sed -e 's/.*\.\(.*\)\..*/man\1/') + update-alternatives --install /usr/share/man/$section/$2 \ + $2 /usr/share/postgresql/$1/man/$section/$2 \ + ${1}0 $SLAVES +} + +if [ "$1" = configure ]; then + if [ -f /usr/share/postgresql-common/maintscripts-functions ]; then + . /usr/share/postgresql-common/maintscripts-functions + configure_doc_version $VERSION "$2" + else + __link_manpages $VERSION SPI_connect.3.gz "postgresql-doc-$VERSION" + fi +fi + +#DEBHELPER# |