vdr/vdr-plugin-remote/debian postrm templates changelog control postinst rules

Thomas Schmidt pkg-vdr-dvb-changes@lists.alioth.debian.org
Wed, 20 Oct 2004 13:05:38 +0000


Update of /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/debian
In directory haydn:/tmp/cvs-serv9881/vdr-plugin-remote/debian

Modified Files:
	changelog control postinst rules 
Added Files:
	postrm templates 
Log Message:
* added debconf-question for loading the evdev-module (still needs some testing)

Index: postinst
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/debian/postinst,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- postinst	16 Oct 2004 10:59:45 -0000	1.2
+++ postinst	20 Oct 2004 13:05:36 -0000	1.3
@@ -1,8 +1,60 @@
 #! /bin/sh
+# postinst script for vdr-plugin-remote
+#
+# see: dh_installdeb(1)
+
 set -e
 
-#/bin/grep -q "^evdev$" /etc/modules || echo "evdev" >> /etc/modules
-#/sbin/modprobe evdev 2> /dev/null || echo "Error loading evdev module"
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+
+		. /usr/share/debconf/confmodule
+
+		db_get vdr-plugin-remote/install_evdev
+	
+		if [ $RET = "true" ]
+		then
+	    	# Try to load the evdev-module
+
+			if modprobe evdev
+			then
+		   	if ! cat /etc/modules | grep -q ^evdev
+		   	then
+    				echo "evdev" >> /etc/modules
+		   	fi
+			else
+				echo "The evdev-module could not be loaded, probably your kernel \
+				has builtin-support for evdev, or your kernel is missing \
+				evdev-support"
+			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.

--- NEW FILE: templates ---
Template: vdr-plugin-remote/install_evdev
Type: boolean
_description: Try to automatically load the evdev-module?
 Enable this, if you want a setup that automatically loads the kernel-module
 evdev, needed by the remote-plugin.
 .
 This script will try to load the module evdev, and if this is successful, 
 it will add a new entry for evdev to your /etc/modules.
 .
 If this fails, your kernel maybe does not have evdev-support, and you will
 need to rebuild you kernel with the CONFIG_INPUT_EVDEV option enabled.
Default: false

Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/debian/changelog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- changelog	9 Oct 2004 16:11:14 -0000	1.1
+++ changelog	20 Oct 2004 13:05:36 -0000	1.2
@@ -5,8 +5,10 @@
     - Added Peter Siering <ps@ctmagazin.de> and myself as Uploaders
     - Cleaned up debian/rules a little bit
     - Converted debian/changelog to UTF8
+    - Added debconf-question about loading the evdev-module, which
+      is required to get the plugin working
 
- -- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>  Sat,  9 Oct 2004 17:49:13 +0200
+ -- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>  Wed, 20 Oct 2004 11:37:09 +0200
 
 vdr-plugin-remote (0.3.1-3) unstable; urgency=low
 

Index: rules
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/debian/rules,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- rules	9 Oct 2004 16:11:14 -0000	1.1
+++ rules	20 Oct 2004 13:05:36 -0000	1.2
@@ -49,6 +49,10 @@
 	rm -f build-stamp configure-stamp
 	$(MAKE) -o .dependencies clean
 	rm -f libvdr-*.so.*
+	
+	# Update debconf-templates:
+	debconf-updatepo
+	
 	dh_clean
 
 install: build
@@ -66,6 +70,7 @@
 binary-arch: build install
 	dh_testdir
 	dh_testroot
+	dh_installdebconf		
 	dh_installdocs
 	dh_installexamples
 	dh_installchangelogs HISTORY

--- NEW FILE: postrm ---
#! /bin/sh
# postrm script for vdr-plugin-remote
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <postrm> `remove'
#        * <postrm> `purge'
#        * <old-postrm> `upgrade' <new-version>
#        * <new-postrm> `failed-upgrade' <old-version>
#        * <new-postrm> `abort-install'
#        * <new-postrm> `abort-install' <old-version>
#        * <new-postrm> `abort-upgrade' <old-version>
#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
        purge)
        # purge debconf database
           . /usr/share/debconf/confmodule
           db_purge || echo "WARNING: db_purge failed"
        ;;

   remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
   ;;

   *)
        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

Index: control
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/debian/control,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- control	9 Oct 2004 16:11:14 -0000	1.1
+++ control	20 Oct 2004 13:05:36 -0000	1.2
@@ -8,7 +8,7 @@
 
 Package: vdr-plugin-remote
 Architecture: any
-Depends: ${shlibs:Depends}, vdr (>= 1.2.6-5)
+Depends: ${shlibs:Depends}, vdr (>= 1.2.6-5), debconf
 Conflicts: vdr (>= 1.2.7)
 Description: Plugin to vdr to support the build-in remote control port of DVB-Cards
  This plugin for vdr supports the build-in remote control