From 81fc656b1367e59257951b4b0bf97a68807710ff Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 16 May 2011 15:30:53 +0100 Subject: [PATCH] Make the documentation directory in most binary packages be a symlink to that in grub-common. --- debian/changelog | 2 ++ debian/control | 2 +- debian/examples.in | 1 - debian/grub-efi.postinst | 19 +++++++++++++++++++ debian/grub-emu.postinst | 19 +++++++++++++++++++ debian/grub-linuxbios.postinst | 19 +++++++++++++++++++ debian/grub2.postinst | 19 +++++++++++++++++++ debian/postinst.in | 9 +++++++++ debian/rules | 5 +++-- 9 files changed, 91 insertions(+), 4 deletions(-) delete mode 100644 debian/examples.in create mode 100644 debian/grub-efi.postinst create mode 100644 debian/grub-emu.postinst create mode 100644 debian/grub-linuxbios.postinst create mode 100644 debian/grub2.postinst diff --git a/debian/changelog b/debian/changelog index db9fc5e41..2d6f556ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -81,6 +81,8 @@ grub2 (1.99~rc2-1) UNRELEASED; urgency=low images (e.g. d-i). The grub- packages now depend on these and include symlinks, so their behaviour will remain as before. * Make grub-emu depend on grub-common. + * Make the documentation directory in most binary packages be a symlink to + that in grub-common. [ Updated translations ] * Belarusian (Viktar Siarheichyk). Closes: #606864 diff --git a/debian/control b/debian/control index c81622ca4..da8a2dc8f 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: extra Maintainer: GRUB Maintainers Uploaders: Robert Millan , Felix Zielcke , Jordi Mallach , Colin Watson DM-Upload-Allowed: yes -Build-Depends: debhelper (>= 7.0.50~), +Build-Depends: debhelper (>= 7.4.2~), quilt (>= 0.46-7), patchutils, autoconf, diff --git a/debian/examples.in b/debian/examples.in deleted file mode 100644 index 5237b2a65..000000000 --- a/debian/examples.in +++ /dev/null @@ -1 +0,0 @@ -docs/grub.cfg diff --git a/debian/grub-efi.postinst b/debian/grub-efi.postinst new file mode 100644 index 000000000..4afa7ab79 --- /dev/null +++ b/debian/grub-efi.postinst @@ -0,0 +1,19 @@ +#! /bin/sh +set -e + +case "$1" in + configure) + if dpkg --compare-versions "$2" lt-nl 1.99~rc2-1; then + # Force dpkg to replace this directory with a symlink. + if [ ! -L /usr/share/doc/@PACKAGE@ ] && [ -d /usr/share/doc/@PACKAGE@ ]; then + if rmdir /usr/share/doc/@PACKAGE@ 2>/dev/null; then + ln -sf grub-common /usr/share/doc/@PACKAGE@ + fi + fi + fi + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/grub-emu.postinst b/debian/grub-emu.postinst new file mode 100644 index 000000000..4afa7ab79 --- /dev/null +++ b/debian/grub-emu.postinst @@ -0,0 +1,19 @@ +#! /bin/sh +set -e + +case "$1" in + configure) + if dpkg --compare-versions "$2" lt-nl 1.99~rc2-1; then + # Force dpkg to replace this directory with a symlink. + if [ ! -L /usr/share/doc/@PACKAGE@ ] && [ -d /usr/share/doc/@PACKAGE@ ]; then + if rmdir /usr/share/doc/@PACKAGE@ 2>/dev/null; then + ln -sf grub-common /usr/share/doc/@PACKAGE@ + fi + fi + fi + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/grub-linuxbios.postinst b/debian/grub-linuxbios.postinst new file mode 100644 index 000000000..4afa7ab79 --- /dev/null +++ b/debian/grub-linuxbios.postinst @@ -0,0 +1,19 @@ +#! /bin/sh +set -e + +case "$1" in + configure) + if dpkg --compare-versions "$2" lt-nl 1.99~rc2-1; then + # Force dpkg to replace this directory with a symlink. + if [ ! -L /usr/share/doc/@PACKAGE@ ] && [ -d /usr/share/doc/@PACKAGE@ ]; then + if rmdir /usr/share/doc/@PACKAGE@ 2>/dev/null; then + ln -sf grub-common /usr/share/doc/@PACKAGE@ + fi + fi + fi + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/grub2.postinst b/debian/grub2.postinst new file mode 100644 index 000000000..4afa7ab79 --- /dev/null +++ b/debian/grub2.postinst @@ -0,0 +1,19 @@ +#! /bin/sh +set -e + +case "$1" in + configure) + if dpkg --compare-versions "$2" lt-nl 1.99~rc2-1; then + # Force dpkg to replace this directory with a symlink. + if [ ! -L /usr/share/doc/@PACKAGE@ ] && [ -d /usr/share/doc/@PACKAGE@ ]; then + if rmdir /usr/share/doc/@PACKAGE@ 2>/dev/null; then + ln -sf grub-common /usr/share/doc/@PACKAGE@ + fi + fi + fi + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/postinst.in b/debian/postinst.in index fe1b0e69f..1eaaff609 100644 --- a/debian/postinst.in +++ b/debian/postinst.in @@ -291,6 +291,15 @@ case "$1" in configure) . /usr/share/debconf/confmodule + if dpkg --compare-versions "$2" lt-nl 1.99~rc2-1; then + # Force dpkg to replace this directory with a symlink. + if [ ! -L /usr/share/doc/@PACKAGE@ ] && [ -d /usr/share/doc/@PACKAGE@ ]; then + if rmdir /usr/share/doc/@PACKAGE@ 2>/dev/null; then + ln -sf grub-common /usr/share/doc/@PACKAGE@ + fi + fi + fi + devicemap_regenerated= if egrep -q '^[[:space:]]*post(inst|rm)_hook[[:space:]]*=[[:space:]]*(/sbin/|/usr/sbin/)?update-grub' /etc/kernel-img.conf 2>/dev/null; then diff --git a/debian/rules b/debian/rules index e59520fb9..7bca9182a 100755 --- a/debian/rules +++ b/debian/rules @@ -34,7 +34,7 @@ export GRUB_CONTRIB := $(CURDIR)/debian/grub-extras confflags = PACKAGE_VERSION="$(deb_version)" PACKAGE_STRING="GRUB $(deb_version)" CC=$(CC) TARGET_CC=$(CC) --enable-grub-mkfont -AUTOGEN_DEB_FILES = examples config templates preinst postinst postrm dirs install links +AUTOGEN_DEB_FILES = config templates preinst postinst postrm dirs install links BUILD_PACKAGES := $(strip $(shell dh_listpackages)) REAL_PACKAGES = grub-emu grub-pc grub-coreboot grub-efi-ia32 grub-efi-amd64 grub-ieee1275 grub-firmware-qemu grub-yeeloong @@ -244,7 +244,8 @@ override_dh_install: dh_install -pgrub-emu --sourcedir=debian/tmp-grub-emu override_dh_installdocs: - dh_installdocs -A AUTHORS NEWS README THANKS TODO + dh_installdocs -pgrub-common -pgrub-rescue-pc -pgrub-firmware-qemu -A AUTHORS NEWS README THANKS TODO + dh_installdocs -Ngrub-common -Ngrub-rescue-pc -Ngrub-firmware-qemu --link-doc=grub-common override_dh_strip: dh_strip -X/usr/bin/grub-emu