summaryrefslogtreecommitdiffstats
path: root/debian/postgresql-doc-13.postinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:20 +0000
commit983ee639b550634d447cd203c4644705f1a8b471 (patch)
tree5f499905dc2dbbf1625be1afc09d14f0e96c4b14 /debian/postgresql-doc-13.postinst
parentAdding upstream version 13.4. (diff)
downloadpostgresql-13-983ee639b550634d447cd203c4644705f1a8b471.tar.xz
postgresql-13-983ee639b550634d447cd203c4644705f1a8b471.zip
Adding debian version 13.4-3.debian/13.4-3debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/postgresql-doc-13.postinst')
-rw-r--r--debian/postgresql-doc-13.postinst29
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/postgresql-doc-13.postinst b/debian/postgresql-doc-13.postinst
new file mode 100644
index 0000000..58b2fee
--- /dev/null
+++ b/debian/postgresql-doc-13.postinst
@@ -0,0 +1,29 @@
+#!/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|egrep '/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)
+
+ section=$(echo "$2" | sed -e 's/.*\.\(.*\)\..*/man\1/')
+ update-alternatives --install /usr/share/man/$section/$2 \
+ $2 /usr/share/postgresql/$1/man/$section/$2 \
+ $(echo "$1" | tr -cd 0-9) $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#