[Pkg-wmaker-commits] [wmaker] 03/03: Use dh_installwm to register Window Maker with update-alternatives instead of doing this manually with package maintainer scripts. In particular, we add a new file, debian/wmaker.wm, and a new target, override_dh_installwm, to debian/rules which sets the priority.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Tue Jul 25 02:23:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmaker.

commit f7878d2a46216e456a877551c5a7611adea949a6
Author: Doug Torrance <dtorrance at piedmont.edu>
Date:   Sat Mar 11 10:47:41 2017 -0500

    Use dh_installwm to register Window Maker
    with update-alternatives instead of doing this manually with package
    maintainer scripts.  In particular, we add a new file,
    debian/wmaker.wm, and a new target, override_dh_installwm, to
    debian/rules which sets the priority.
---
 debian/changelog       |  7 ++++++-
 debian/rules           |  3 +++
 debian/wmaker.postinst | 33 ---------------------------------
 debian/wmaker.prerm    | 22 ----------------------
 debian/wmaker.wm       |  1 +
 5 files changed, 10 insertions(+), 56 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e8e3099..a53746c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,8 +9,13 @@ wmaker (0.95.8-2) UNRELEASED; urgency=medium
   * Move wmaker manpage from wmaker-common to wmaker package.
     From Policy 12.1: "Each program, utility, and function should have
     an associated manual page included in the *same* package."
+  * Use dh_installwm to register Window Maker with update-alternatives.
+    In particular, we add a new file, debian/wmaker.wm, and a new target,
+    override_dh_installwm, to debian/rules which sets the priority.
+  * Remove maintainer scripts.  They either dealt with the Debian menu
+    or are now automatically generated by dh_installwm.
 
- -- Doug Torrance <profzoom at cayke>  Mon, 24 Jul 2017 22:17:44 -0400
+ -- Doug Torrance <dtorrance at piedmont.edu>  Mon, 24 Jul 2017 22:21:30 -0400
 
 wmaker (0.95.8-1) unstable; urgency=low
 
diff --git a/debian/rules b/debian/rules
index 2368151..c6d2075 100755
--- a/debian/rules
+++ b/debian/rules
@@ -58,3 +58,6 @@ override_dh_install:
 
 	# Install files
 	dh_install
+
+override_dh_installwm:
+	dh_installwm --priority=50
diff --git a/debian/wmaker.postinst b/debian/wmaker.postinst
deleted file mode 100644
index 2ac835a..0000000
--- a/debian/wmaker.postinst
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-set -e
-
-# Window Maker postinst.
-# 
-# Marcelo Magallon <mmagallo at debian.org>
-# Rodolfo "kix" García <kix at kix.es>
-
-x_wm_link=/etc/alternatives/x-window-manager
-x_wm_man_link=/usr/share/man/man1/x-window-manager.1.gz
-
-case "$1" in
-  configure)
-    update-alternatives --install /usr/bin/x-window-manager \
-        x-window-manager /usr/bin/wmaker 50 \
-        --slave /usr/share/man/man1/x-window-manager.1.gz \
-        x-window-manager.1.gz /usr/share/man/man1/wmaker.1.gz
-
-  ;;
-
-  abort-upgrade|abort-deconfigure|abort-remove)
-    # how did we got here? Force a non-zero exit code
-    exit 1
-  ;;
-
-  *)
-    echo "postinst called with unkown argument: \$1" >&2
-  ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/wmaker.prerm b/debian/wmaker.prerm
deleted file mode 100644
index d5c2e1e..0000000
--- a/debian/wmaker.prerm
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case "$1" in
-    failed-upgrade|abort-upgrade|deconfigure)
-        update-alternatives --remove x-window-manager /usr/bin/wmaker
-    ;;
-    remove)
-        update-alternatives --remove x-window-manager /usr/bin/wmaker
-    ;;
-    upgrade)
-    ;;
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/wmaker.wm b/debian/wmaker.wm
new file mode 100644
index 0000000..127da35
--- /dev/null
+++ b/debian/wmaker.wm
@@ -0,0 +1 @@
+/usr/bin/wmaker

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmaker.git



More information about the Pkg-wmaker-commits mailing list