From b53e877de7d1a7c41208a1a7550f6d4e0d724f76 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Mon, 8 Sep 2014 19:11:19 +0200 Subject: [PATCH] Don't create docs symlinks from arch-dep to arch-indep packages. Closes: #760823 --- debian/changelog | 2 ++ debian/cmake-curses-gui.maintscript | 1 + debian/cmake-curses-gui.postinst | 17 ----------------- debian/cmake-dbg.maintscript | 1 + debian/cmake-dbg.postinst | 17 ----------------- debian/cmake-qt-gui.maintscript | 1 + debian/cmake-qt-gui.postinst | 17 ----------------- debian/cmake.maintscript | 1 + debian/cmake.postinst | 12 ------------ debian/control | 6 +++++- debian/rules | 6 +++++- 11 files changed, 16 insertions(+), 65 deletions(-) create mode 100644 debian/cmake-curses-gui.maintscript delete mode 100644 debian/cmake-curses-gui.postinst create mode 100644 debian/cmake-dbg.maintscript delete mode 100644 debian/cmake-dbg.postinst create mode 100644 debian/cmake-qt-gui.maintscript delete mode 100644 debian/cmake-qt-gui.postinst create mode 100644 debian/cmake.maintscript diff --git a/debian/changelog b/debian/changelog index b18d5802a..5a90a9bb5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ cmake (2.8.12.2-2) UNRELEASED; urgency=medium * Search for Python 3.4 in FindPython{Interp,Libs}. - Add search_for_python3.4.diff + * Don't create docs symlinks from arch-dep to arch-indep packages. + (Closes: #760823) -- Felix Geyer Sun, 31 Aug 2014 21:27:28 +0200 diff --git a/debian/cmake-curses-gui.maintscript b/debian/cmake-curses-gui.maintscript new file mode 100644 index 000000000..068e1b227 --- /dev/null +++ b/debian/cmake-curses-gui.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/cmake-curses-gui /usr/share/doc/cmake-data 2.8.12.2-2~ diff --git a/debian/cmake-curses-gui.postinst b/debian/cmake-curses-gui.postinst deleted file mode 100644 index 2734aab9c..000000000 --- a/debian/cmake-curses-gui.postinst +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -set -e - -pkgname=`basename "$0" .postinst` -docdir="/usr/share/doc/$pkgname" - -# Manually create /usr/share/doc/$pkgname symlink on upgrades (see #404850) -if [ "$1" = "configure" ] && [ -n "$2" ] && \ - [ ! -L "$docdir" ] && [ -d "$docdir" ] && \ - dpkg --compare-versions "$2" lt "2.8.3-3"; -then - rmdir "$docdir" - ln -s "cmake-data" "$docdir" -fi - -#DEBHELPER# diff --git a/debian/cmake-dbg.maintscript b/debian/cmake-dbg.maintscript new file mode 100644 index 000000000..ab59ae625 --- /dev/null +++ b/debian/cmake-dbg.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/cmake-dbg /usr/share/doc/cmake-data 2.8.12.2-2~ diff --git a/debian/cmake-dbg.postinst b/debian/cmake-dbg.postinst deleted file mode 100644 index 2734aab9c..000000000 --- a/debian/cmake-dbg.postinst +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -set -e - -pkgname=`basename "$0" .postinst` -docdir="/usr/share/doc/$pkgname" - -# Manually create /usr/share/doc/$pkgname symlink on upgrades (see #404850) -if [ "$1" = "configure" ] && [ -n "$2" ] && \ - [ ! -L "$docdir" ] && [ -d "$docdir" ] && \ - dpkg --compare-versions "$2" lt "2.8.3-3"; -then - rmdir "$docdir" - ln -s "cmake-data" "$docdir" -fi - -#DEBHELPER# diff --git a/debian/cmake-qt-gui.maintscript b/debian/cmake-qt-gui.maintscript new file mode 100644 index 000000000..e89fa9d8f --- /dev/null +++ b/debian/cmake-qt-gui.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/cmake-qt-gui /usr/share/doc/cmake-data 2.8.12.2-2~ diff --git a/debian/cmake-qt-gui.postinst b/debian/cmake-qt-gui.postinst deleted file mode 100644 index 2734aab9c..000000000 --- a/debian/cmake-qt-gui.postinst +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -set -e - -pkgname=`basename "$0" .postinst` -docdir="/usr/share/doc/$pkgname" - -# Manually create /usr/share/doc/$pkgname symlink on upgrades (see #404850) -if [ "$1" = "configure" ] && [ -n "$2" ] && \ - [ ! -L "$docdir" ] && [ -d "$docdir" ] && \ - dpkg --compare-versions "$2" lt "2.8.3-3"; -then - rmdir "$docdir" - ln -s "cmake-data" "$docdir" -fi - -#DEBHELPER# diff --git a/debian/cmake.maintscript b/debian/cmake.maintscript new file mode 100644 index 000000000..eed061553 --- /dev/null +++ b/debian/cmake.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/cmake /usr/share/doc/cmake-data 2.8.12.2-2~ diff --git a/debian/cmake.postinst b/debian/cmake.postinst index e1916881c..c2619c333 100644 --- a/debian/cmake.postinst +++ b/debian/cmake.postinst @@ -2,18 +2,6 @@ set -e -pkgname=`basename "$0" .postinst` -docdir="/usr/share/doc/$pkgname" - -# Manually create /usr/share/doc/$pkgname symlink on upgrades (see #404850) -if [ "$1" = "configure" ] && [ -n "$2" ] && \ - [ ! -L "$docdir" ] && [ -d "$docdir" ] && \ - dpkg --compare-versions "$2" lt "2.8.3-3"; -then - rmdir "$docdir" - ln -s "cmake-data" "$docdir" -fi - # Remove obsolete 50cmake.el dpkg-maintscript-helper rm_conffile /etc/emacs/site-start.d/50cmake.el 2.8.9~rc3-1~ cmake -- "$@" diff --git a/debian/control b/debian/control index 8a3d30fe5..331251097 100644 --- a/debian/control +++ b/debian/control @@ -24,6 +24,7 @@ Homepage: http://cmake.org/ Package: cmake Architecture: any Multi-Arch: foreign +Pre-Depends: dpkg (>= 1.17.5~) Depends: cmake-data (= ${source:Version}), procps [!hurd-any], ${misc:Depends}, @@ -56,6 +57,7 @@ Description: CMake data files (modules, templates and documentation) Package: cmake-curses-gui Architecture: any +Pre-Depends: dpkg (>= 1.17.5~) Depends: cmake (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Description: curses based user interface for CMake (ccmake) CMake is used to control the software compilation process using simple @@ -70,6 +72,7 @@ Description: curses based user interface for CMake (ccmake) Package: cmake-qt-gui Architecture: any +Pre-Depends: dpkg (>= 1.17.5~) Depends: cmake (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Provides: cmake-gui Description: Qt4 based user interface for CMake (cmake-gui) @@ -86,7 +89,7 @@ Description: Qt4 based user interface for CMake (cmake-gui) Package: cmake-doc Architecture: all Section: doc -Depends: ${misc:Depends} +Depends: ${misc:Depends}, cmake-data (= ${source:Version}) Recommends: doc-base Breaks: cmake (<= 2.8.2-1), cmake-curses-gui (<= 2.8.2-1), @@ -110,6 +113,7 @@ Package: cmake-dbg Architecture: any Section: debug Priority: extra +Pre-Depends: dpkg (>= 1.17.5~) Depends: cmake (= ${binary:Version}), ${misc:Depends} Description: debugging symbols for CMake CMake is used to control the software compilation process using simple diff --git a/debian/rules b/debian/rules index 29e8ac93a..b8ab8708e 100755 --- a/debian/rules +++ b/debian/rules @@ -45,7 +45,11 @@ override_dh_auto_clean: dh_auto_clean rm -f $(BUILD_FLAGS_FILE) -override_dh_installdocs: +override_dh_installdocs-arch: + # dh_installdocs --link-doc generates binNMU unsafe deps (Bug #747141) + dh_installdocs + +override_dh_installdocs-indep: dh_installdocs --link-doc=cmake-data %: