summaryrefslogtreecommitdiff
path: root/debian/dh_doclink
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-09-29 13:40:02 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-09-29 13:40:02 +0300
commit424a50000a78fff715de4417dba9b4498aeeee4c (patch)
treed27f003c7d140fef24efd1b2ca1325ae099154b9 /debian/dh_doclink
downloadpython3.5-debian.tar.gz
Imported python3.5 3.5.4-4debian/3.5.4-4debian
Diffstat (limited to 'debian/dh_doclink')
-rw-r--r--debian/dh_doclink28
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/dh_doclink b/debian/dh_doclink
new file mode 100644
index 0000000..99a3f2a
--- /dev/null
+++ b/debian/dh_doclink
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+pkg=`echo $1 | sed 's/^-p//'`
+target=$2
+
+ln -sf $target debian/$pkg/usr/share/doc/$pkg
+
+f=debian/$pkg.postinst.debhelper
+if [ ! -e $f ] || [ "`grep -c '^# dh_doclink' $f`" -eq 0 ]; then
+cat >> $f <<EOF
+# dh_doclink
+if [ "\$1" = "configure" ]; then
+ if [ -d /usr/doc -a ! -e /usr/doc/$pkg -a -d /usr/share/doc/$pkg ]; then
+ ln -sf ../share/doc/$pkg /usr/doc/$pkg
+ fi
+fi
+EOF
+fi
+
+f=debian/$pkg.prerm.debhelper
+if [ ! -e $f ] || [ "`grep -c '^# dh_doclink' $f`" -eq 0 ]; then
+cat >> $f <<EOF
+# dh_doclink
+if [ \( "\$1" = "upgrade" -o "\$1" = "remove" \) -a -L /usr/doc/$pkg ]; then
+ rm -f /usr/doc/$pkg
+fi
+EOF
+fi