From 249ab79fe16c4dff89b2738648764a1b8ca3a22f Mon Sep 17 00:00:00 2001 Message-Id: <249ab79fe16c4dff89b2738648764a1b8ca3a22f.1713958307.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 31 Oct 2007 18:57:15 +0000 Subject: [PATCH] correct menu support. update-menus.1 fibs l-) Organization: Straylight/Edgeware From: Richard Kettlewell --- debian/Makefile.am | 3 ++- debian/autorules.m4 | 8 ++++---- debian/postinst.disobedience | 30 ++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 debian/postinst.disobedience diff --git a/debian/Makefile.am b/debian/Makefile.am index 725d10f..162d244 100644 --- a/debian/Makefile.am +++ b/debian/Makefile.am @@ -33,4 +33,5 @@ EXTRA_DIST=README.Debian autorules.m4 config.disorder control copyright \ etc.disorder.options etc.disorder.config htaccess \ postinst.disorder prerm.disorder postrm.disorder \ templates.disorder conffiles.disorder \ - rules.m4 rules changelog usr.share.menu.disobedience + rules.m4 rules changelog usr.share.menu.disobedience \ + postinst.disobedience diff --git a/debian/autorules.m4 b/debian/autorules.m4 index 262335c..63c8e28 100644 --- a/debian/autorules.m4 +++ b/debian/autorules.m4 @@ -71,15 +71,15 @@ pkg-$1: [build] $(MKDIR) debian/$1 $(MKDIR) debian/$1/DEBIAN $(MKDIR) debian/$1/usr/share/doc/$1 - cp debian/copyright \ + $(INSTALL_DATA) debian/copyright \ debian/$1/usr/share/doc/$1/copyright - cp debian/changelog \ + $(INSTALL_DATA) debian/changelog \ debian/$1/usr/share/doc/$1/changelog.Debian gzip -9 debian/$1/usr/share/doc/$1/changelog.Debian @for f in preinst postinst prerm postrm conffiles templates config; do\ if test -e debian/$$f.$1; then\ - echo cp debian/$$f.$1 debian/$1/DEBIAN/$$f; \ - cp debian/$$f.$1 debian/$1/DEBIAN/$$f; \ + echo $(INSTALL_SCRIPT) debian/$$f.$1 debian/$1/DEBIAN/$$f; \ + $(INSTALL_SCRIPT) debian/$$f.$1 debian/$1/DEBIAN/$$f; \ fi;\ done $2 dpkg-gencontrol -isp -p$1 -Pdebian/$1 -Tdebian/substvars.$1 diff --git a/debian/postinst.disobedience b/debian/postinst.disobedience new file mode 100644 index 0000000..db2a492 --- /dev/null +++ b/debian/postinst.disobedience @@ -0,0 +1,30 @@ +#! /bin/sh +# +# This file is part of DisOrder +# Copyright (C) 2007 Richard Kettlewell +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA +# + +set -e + +case "$1" in +configure ) + if type update-menus >/dev/null 2>&1; then + update-menus + fi + ;; +esac -- [mdw]