From 6dc0dbc7a94aac8162913c518d9e19140d07a0b7 Mon Sep 17 00:00:00 2001 From: uzakmat Date: Mon, 25 Jan 2010 10:03:13 +0000 Subject: [PATCH] postinst and postrm scripts added into the debian tree --- data/Makefile | 2 +- debian/changelog | 2 +- debian/control | 4 ++-- debian/postinst | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ debian/postrm | 49 ++++++++++++++++++++++++++++++++++++++++++++++ debian/rules | 2 +- 6 files changed, 105 insertions(+), 5 deletions(-) create mode 100755 debian/postinst create mode 100755 debian/postrm diff --git a/data/Makefile b/data/Makefile index 3b0c9e0..5e6ab6c 100644 --- a/data/Makefile +++ b/data/Makefile @@ -3,7 +3,7 @@ PKG = fosdem PREFIX = $(INSTALL_ROOT)/usr/share INSTALL_FILE = install -m 644 -p -CHK_DIR = test -d +CHK_DIR = test -d MKDIR = mkdir -p .PHONY: install uninstall clean distclean diff --git a/debian/changelog b/debian/changelog index e0f68be..f14db61 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -fosdem-schedtool (0.1) unstable; urgency=low +fosdem-schedule (0.1) unstable; urgency=low * Initial release diff --git a/debian/control b/debian/control index a557620..032adc7 100644 --- a/debian/control +++ b/debian/control @@ -1,11 +1,11 @@ -Source: fosdem-maemo +Source: fosdem-schedule Section: user/support Priority: optional Maintainer: Matus Uzak Build-Depends: debhelper (>= 5) libqt4-dev (>= 4.5) Standards-Version: 3.7.2 -Package: fosdem-schedtool +Package: fosdem-schedule Architecture: armel Depends: ${shlibs:Depends}, ${misc:Depends} Description: FOSDEM 2010 scheduler diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..4341d68 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,51 @@ +#!/bin/sh +# postinst script for helloworld +# +# see: dh_installdeb(1) + +set -e +DIR_NAME=.fosdem + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + + if test -d ~/$DIR_NAME; then + echo "postinst: removing ~/$DIR_NAME" + rm -rf ~/$DIR_NAME + fi + if test -d ~user/$DIR_NAME; then + echo "postinst: removing ~user/$DIR_NAME" + rm -rf ~user/$DIR_NAME + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/postrm b/debian/postrm new file mode 100755 index 0000000..75aa83d --- /dev/null +++ b/debian/postrm @@ -0,0 +1,49 @@ +#!/bin/sh +# postrm script for helloworld +# +# see: dh_installdeb(1) + +set -e +DIR_NAME=.fosdem + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + if test -d ~/$DIR_NAME; then + echo "postrm: removing ~/$DIR_NAME" + rm -rf ~/$DIR_NAME + fi + if test -d ~user/$DIR_NAME; then + echo "postrm: removing ~user/$DIR_NAME" + rm -rf ~user/$DIR_NAME + fi + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/rules b/debian/rules index 1851f5f..a4a8ba4 100755 --- a/debian/rules +++ b/debian/rules @@ -9,7 +9,7 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -PKG_NAME = fosdem-schedtool +PKG_NAME = fosdem-schedule CFLAGS = -Wall -g -- 2.39.5