[Foo2zjs-commits] r48 - trunk/foo2zjs_20070718dfsg/debian

bedo-guest at alioth.debian.org bedo-guest at alioth.debian.org
Fri Aug 3 21:53:43 UTC 2007


Author: bedo-guest
Date: 2007-08-03 21:53:43 +0000 (Fri, 03 Aug 2007)
New Revision: 48

Added:
   trunk/foo2zjs_20070718dfsg/debian/config
   trunk/foo2zjs_20070718dfsg/debian/postinst
   trunk/foo2zjs_20070718dfsg/debian/templates
Modified:
   trunk/foo2zjs_20070718dfsg/debian/rules
Log:
Added the basic files for debconf, for closing bug #419038.


Added: trunk/foo2zjs_20070718dfsg/debian/config
===================================================================
--- trunk/foo2zjs_20070718dfsg/debian/config	                        (rev 0)
+++ trunk/foo2zjs_20070718dfsg/debian/config	2007-08-03 21:53:43 UTC (rev 48)
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+db_reset foo2zjs/list
+db_input medium foo2zjs/list || true
+db_go
+
+#db_get foo2zjs/list
+
+#case "$RET" in
+#    "Hp Laserjet 1000")
+#        PRINTER="1000"
+#    ;;
+#esac


Property changes on: trunk/foo2zjs_20070718dfsg/debian/config
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/foo2zjs_20070718dfsg/debian/postinst
===================================================================
--- trunk/foo2zjs_20070718dfsg/debian/postinst	                        (rev 0)
+++ trunk/foo2zjs_20070718dfsg/debian/postinst	2007-08-03 21:53:43 UTC (rev 48)
@@ -0,0 +1,64 @@
+#!/bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+
+UDEVDIR=/etc/udev/rules.d
+RULESNAME=hplj10xx.rules
+RULES=/etc/udev/rules.d/11-hplj10xx.rules
+USBDIR=/etc/hotplug/usb
+
+
+if [ "$1" = configure ]; then
+    mkdir -p /var/cache/foo2zjs
+    cd /var/cache/foo2zjs
+
+    db_get foo2zjs/list
+
+    HOTPLUG=0
+
+    case "$RET" in
+        "Hp Laserjet 1000")
+            PRINTER="1000"
+            HOTPLUG=1
+            ;;
+        "Hp Laserjet 1005")
+            PRINTER="1005"
+            HOTPLUG=1
+            ;;
+        "Hp Laserjet 1018")
+            PRINTER="1018"
+            HOTPLUG=1
+            ;;
+        "Hp Laserjet 1020")
+            PRINTER="1020"
+            HOTPLUG=1
+            ;;
+        "Samsung CLP-300")
+            PRINTER="300"
+            ;;
+        "Samsung CLP-600")
+            PRINTER="600"
+            ;;
+        "Samsung CLX-3160")
+            PRINTER="3160"
+            ;;
+        "Xerox Phaser 6110")
+            PRINTER="6110"
+            ;;
+    esac
+
+    getweb $PRINTER
+    
+    if [ $HOTPLUG == 1 ]; then
+        [ -d $USBDIR ] || install -d -m 755 $USBDIR
+        install -c -m 755 /usr/sbin/hplj1000 $USBDIR
+        ln -sf $USBDIR/hplj1000 $USBDIR/hplj1005
+        ln -sf $USBDIR/hplj1000 $USBDIR/hplj1018
+        ln -sf $USBDIR/hplj1000 $USBDIR/hplj1020
+        $USBDIR/hplj1000 install-usermap
+        $USBDIR/hplj1005 install-usermap
+        $USBDIR/hplj1018 install-usermap
+        $USBDIR/hplj1020 install-usermap
+    fi
+fi

Modified: trunk/foo2zjs_20070718dfsg/debian/rules
===================================================================
--- trunk/foo2zjs_20070718dfsg/debian/rules	2007-07-20 08:07:30 UTC (rev 47)
+++ trunk/foo2zjs_20070718dfsg/debian/rules	2007-08-03 21:53:43 UTC (rev 48)
@@ -56,6 +56,9 @@
 	rm -f $(CURDIR)/debian/foo2zjs/usr/share/doc/foo2zjs/COPYING
 	rm -f $(CURDIR)/debian/foo2zjs/usr/share/doc/foo2zjs/INSTALL
 	rm -f $(CURDIR)/debian/foo2zjs/usr/share/doc/foo2zjs/INSTALL.osx
+	mkdir -p $(CURDIR)/debian/foo2zjs/DEBIAN
+	install -m 755 debian/config $(CURDIR)/debian/foo2zjs/DEBIAN
+	install -m 755 debian/templates $(CURDIR)/debian/foo2zjs/DEBIAN
 	install -D -m 644 hplj10xx.rules $(CURDIR)/debian/foo2zjs/etc/udev/rules.d/11-hplj10xx.rules
 	install -m 755 hplj1000 $(CURDIR)/debian/foo2zjs/usr/sbin/hplj1000
 	install -m 755 getweb $(CURDIR)/debian/foo2zjs/usr/bin/getweb

Added: trunk/foo2zjs_20070718dfsg/debian/templates
===================================================================
--- trunk/foo2zjs_20070718dfsg/debian/templates	                        (rev 0)
+++ trunk/foo2zjs_20070718dfsg/debian/templates	2007-08-03 21:53:43 UTC (rev 48)
@@ -0,0 +1,6 @@
+Template: foo2zjs/list
+Type: select
+Choices: Samsung CLP-300, Samsung CLP-600, Samsung CLX-3160, Xerox Phaser 3160, Hp Laserjet 1000, Hp Laserjet 1005, Hp Laserjet 1018, Hp Laserjet 1020
+Description: Choose your printer
+ Choose from the list below your printer, and the PPD file for it will be
+ downloaded and installed.




More information about the Foo2zjs-commits mailing list