author | Michael Krelin <hacker@klever.net> | 2007-04-19 17:50:17 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-04-22 23:41:30 (UTC) |
commit | ce0f4181dbecc877171c818a2facc91c88c5f419 (patch) (side-by-side diff) | |
tree | 4ce23c2851a403b217459bd1c7a1ed78329e1f34 /net-print/foo2zjs/files | |
parent | 683fcb5949708dace90bc9ca17a40568edce4d6e (diff) | |
download | misc-ce0f4181dbecc877171c818a2facc91c88c5f419.zip misc-ce0f4181dbecc877171c818a2facc91c88c5f419.tar.gz misc-ce0f4181dbecc877171c818a2facc91c88c5f419.tar.bz2 |
net-print/foo2zjs: imported from portage
-rw-r--r-- | net-print/foo2zjs/files/digest-foo2zjs-20070204 | 30 | ||||
-rw-r--r-- | net-print/foo2zjs/files/foo2zjs-Makefile-20070204.diff | 161 | ||||
-rw-r--r-- | net-print/foo2zjs/files/foo2zjs-udevfwld-20070204.diff | 191 |
3 files changed, 382 insertions, 0 deletions
diff --git a/net-print/foo2zjs/files/digest-foo2zjs-20070204 b/net-print/foo2zjs/files/digest-foo2zjs-20070204 new file mode 100644 index 0000000..0672f8a --- a/dev/null +++ b/net-print/foo2zjs/files/digest-foo2zjs-20070204 @@ -0,0 +1,30 @@ +MD5 cae0d20d3c1d57cd3953d9b335014294 cpplxp.exe 4799488 +RMD160 bcd5ceecca248c90a0d3e99dd55c6e1eedd4de6d cpplxp.exe 4799488 +SHA256 5f4c8b6f20ccf2d525f683847f5dc24bb4c7f58131d6704047d6c9a90d6895af cpplxp.exe 4799488 +MD5 29530f6815fe3268e00ebe2a3523de43 foo2zjs-20070204.tar.gz 936419 +RMD160 4e6160fed4e642106ff62bff64e5a4cf637d9f0b foo2zjs-20070204.tar.gz 936419 +SHA256 9dc978b208ee7762b6b16ff445103722f45c341457014fa9b3bad7dd2a0bd5d3 foo2zjs-20070204.tar.gz 936419 +MD5 72179915334290762193db0be09fceff hpclj2600n.tar.gz 573660 +RMD160 a0c03c901cb722bbc61347e9159b0a4faa72329d hpclj2600n.tar.gz 573660 +SHA256 b5ed74e50b88152a09d9ad17bca94e2299d348ed6d343ff015344757b72d390a hpclj2600n.tar.gz 573660 +MD5 f15687042e468cabed2e277bf313bbc8 km2430.tar.gz 929112 +RMD160 ddd2d5375611a41d62e436ed6f3b3d62356b90a5 km2430.tar.gz 929112 +SHA256 59b559d5f885e0e8870148795674366b527782a062c6cac1dc2048c2759a356b km2430.tar.gz 929112 +MD5 3b78a08aa968b4c1ed591947721d3e47 m22dlicc.exe 634368 +RMD160 392922135a3f517a76a2b5e8b7200c83e6104ef6 m22dlicc.exe 634368 +SHA256 1d57413f4c36941c64599dae2ac2b1f8a397e128796c2796a108be5b8fd282b3 m22dlicc.exe 634368 +MD5 d680f447a416c5f9041f27c0a1df57a0 m23dlicc.exe 170496 +RMD160 f72be93dfc5c8c9159c75d7204820f1305f47905 m23dlicc.exe 170496 +SHA256 1416cda7e2e3496ff1d121c87dd8984ad1d16ed3396096f05f4919dafd445ae4 m23dlicc.exe 170496 +MD5 5d47d54f9cc19225c6ad07763bd02801 sihp1000.tar.gz 50423 +RMD160 5cd97ca6944d421df213420fc5d1e1572f85ec84 sihp1000.tar.gz 50423 +SHA256 7bdb5387419a880e32c9280b8d3878b08eb8fbd614237f164a9ae1e81bc2cff6 sihp1000.tar.gz 50423 +MD5 10937cc743b03ea9776a9f6eb35159a0 sihp1005.tar.gz 52301 +RMD160 5ebc04fadafb2033cba9665840897c48eb0d0f70 sihp1005.tar.gz 52301 +SHA256 55820298cc441893b19d28ff82ff1c8438fb53bad24c2db40b06f24c356cb320 sihp1005.tar.gz 52301 +MD5 89bc9a1199abc2bd304694f0273a248a sihp1018.tar.gz 70547 +RMD160 f358ae6be52395070d7eea6aa2b0d3d6baf2d7ea sihp1018.tar.gz 70547 +SHA256 d95f26f302e4a6580aa83fd13b99911fe8ad7a1de88fd1545c1f2e384b1d2af7 sihp1018.tar.gz 70547 +MD5 290c2a03d665ceb4dfbbd60b471ebb3d sihp1020.tar.gz 68877 +RMD160 39e998123ad074231c6333ff70ccabbe513ea90f sihp1020.tar.gz 68877 +SHA256 c69504fa7a96f63a71fb507f5d61a846db60a9ed000abb4cb04b32cfe7c23704 sihp1020.tar.gz 68877 diff --git a/net-print/foo2zjs/files/foo2zjs-Makefile-20070204.diff b/net-print/foo2zjs/files/foo2zjs-Makefile-20070204.diff new file mode 100644 index 0000000..0770d1c --- a/dev/null +++ b/net-print/foo2zjs/files/foo2zjs-Makefile-20070204.diff @@ -0,0 +1,161 @@ +diff -Nur foo2zjs.orig/Makefile foo2zjs/Makefile +--- foo2zjs.orig/Makefile 2007-02-19 23:27:10.000000000 +0100 ++++ foo2zjs/Makefile 2007-02-19 23:26:56.000000000 +0100 +@@ -7,7 +7,7 @@ + + # Installation prefix... + PREFIX=/usr/local +-PREFIX=/usr ++PREFIX=$(DESTDIR)/usr + + # Pathnames for this package... + BIN=$(PREFIX)/bin +@@ -20,7 +20,7 @@ + DOCDIR=$(PREFIX)/share/doc/foo2zjs/ + + # Pathnames for referenced packages... +-FOODB=/usr/share/foomatic/db/source ++FOODB=$(PREFIX)/share/foomatic/db/source + + # User ID's + LPuid=-olp +@@ -180,7 +180,7 @@ + endif + + # Compiler flags +-CFLAGS += -O2 -Wall ++CFLAGS ?= -O2 -Wall + + # + # Rules to create test documents +@@ -368,12 +368,14 @@ + + + install-prog: ++ [ -d $(BIN) ] || install -d -m 755 $(BIN)/ ++ [ -d $(DESTDIR)/bin/ ] || install -d -m 755 $(DESTDIR)/bin/ + # + # Install driver, wrapper, and development tools + # + install -c $(PROGS) $(SHELLS) $(BIN)/ + if [ "$(BINPROGS)" != "" ]; then \ +- install -c $(BINPROGS) /bin/; \ ++ install -c $(BINPROGS) $(DESTDIR)/bin/; \ + fi + # + # Install gamma correction files. These are just templates, +@@ -401,6 +403,7 @@ + # + @if [ -d $(FOODB) ]; then \ + for dir in driver printer opt; do \ ++ [ -d $(FOODB)/$$dir/ ] || install -d -m 755 $(FOODB)/$$dir/; \ + echo install -m 644 foomatic-db/$$dir/*.xml $(FOODB)/$$dir/; \ + install -c -m 644 foomatic-db/$$dir/*.xml $(FOODB)/$$dir/; \ + done \ +@@ -418,10 +421,10 @@ + # + # Clear foomatic cache and rebuild database if needed + # +- rm -rf /var/cache/foomatic/*/* +- rm -f /var/cache/foomatic/printconf.pickle +- if [ -d /var/cache/foomatic/compiled ]; then \ +- cd /var/cache/foomatic/compiled; \ ++ rm -rf $(DESTDIR)/var/cache/foomatic/*/* ++ rm -f $(DESTDIR)/var/cache/foomatic/printconf.pickle ++ if [ -d $(DESTDIR)/var/cache/foomatic/compiled ]; then \ ++ cd $(DESTDIR)/var/cache/foomatic/compiled; \ + foomatic-combo-xml -O >overview.xml; \ + fi + +@@ -492,18 +495,12 @@ + fi; \ + done + +-MODEL=/usr/share/cups/model +-LOCALMODEL=/usr/local/share/cups/model ++MODEL=$(PREFIX)/share/cups/model ++#LOCALMODEL=/usr/local/share/cups/model + install-ppd: + # + # Install PPD files for CUPS + # +- if [ -d /usr/share/ppd/ ]; then \ +- find /usr/share/ppd/ -name '*foo2zjs*' | xargs rm -f; \ +- find /usr/share/ppd/ -name '*foo2hp*' | xargs rm -f; \ +- find /usr/share/ppd/ -name '*foo2xqx*' | xargs rm -f; \ +- find /usr/share/ppd/ -name '*foo2lava*' | xargs rm -f; \ +- fi + if [ -d $(MODEL) ]; then \ + cd PPD; \ + for ppd in *.ppd; do \ +@@ -516,10 +513,8 @@ + done; \ + fi + +-USBDIR=/etc/hotplug/usb +-UDEVDIR=/etc/udev/rules.d +-RULES=hplj10xx.rules +-install-hotplug: install-hotplug-test install-hotplug-prog ++USBDIR=$(DESTDIR)/etc/hotplug/usb ++install-hotplug: install-hotplug-test install-udev + + install-hotplug-test: + # +@@ -537,18 +532,18 @@ + # + + install-hotplug-prog: +- if [ -d $(UDEVDIR) ]; then \ +- install -c -m 644 $(RULES) $(UDEVDIR)/11-$(RULES); \ +- fi + [ -d $(USBDIR) ] || install -d -m 755 $(USBDIR)/ + install -c -m 755 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 ++ install -c -m 644 hplj.usermap $(USBDIR)/ ++ ++UDEVDIR=$(DESTDIR)/etc/udev/rules.d ++RULES=hplj10xx.rules ++install-udev: ++ [ -d $(UDEVDIR) ] || install -d -m 755 $(UDEVDIR)/ ++ install -c -m 644 $(RULES) $(UDEVDIR)/11-$(RULES) + + cups: FRC + if [ -x /etc/init.d/cups ]; then \ +@@ -862,7 +857,6 @@ + install -c -m 644 README $(DOCDIR) + install -c -m 644 ChangeLog $(DOCDIR) + +-GROFF=/usr/local/test/bin/groff + GROFF=groff + manual.pdf: $(MANPAGES) + -$(GROFF) -t -man $(MANPAGES) | ps2pdf - $@ +diff -Nur foo2zjs.orig/hplj.usermap foo2zjs/hplj.usermap +--- foo2zjs.orig/hplj.usermap 1970-01-01 01:00:00.000000000 +0100 ++++ foo2zjs/hplj.usermap 2007-02-19 23:26:08.000000000 +0100 +@@ -0,0 +1,4 @@ ++hplj1000 0x0003 0x03f0 0x0517 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 ++hplj1005 0x0003 0x03f0 0x1317 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 ++hplj1018 0x0003 0x03f0 0x4117 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 ++hplj1020 0x0003 0x03f0 0x2b17 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +diff -Nur foo2zjs.orig/icc2ps/Makefile foo2zjs/icc2ps/Makefile +--- foo2zjs.orig/icc2ps/Makefile 2007-02-19 23:27:10.000000000 +0100 ++++ foo2zjs/icc2ps/Makefile 2007-02-19 23:26:08.000000000 +0100 +@@ -1,10 +1,10 @@ +-PREFIX= /usr ++PREFIX= $(DESTDIR)/usr + BIN= $(PREFIX)/bin + SRC= icc2ps.c xgetopt.c + LIB= cmscam97.c cmscnvrt.c cmserr.c cmsgamma.c cmsgmt.c cmsintrp.c cmsio1.c \ + cmslut.c cmsmatsh.c cmsmtrx.c cmsnamed.c cmspack.c cmspcs.c cmsps2.c \ + cmssamp.c cmswtpnt.c cmsxform.c cmsio0.c cmsvirt.c +-CFLAGS= -O3 ++CFLAGS?= -O3 + + all: foo2zjs-icc2ps + diff --git a/net-print/foo2zjs/files/foo2zjs-udevfwld-20070204.diff b/net-print/foo2zjs/files/foo2zjs-udevfwld-20070204.diff new file mode 100644 index 0000000..5935d5e --- a/dev/null +++ b/net-print/foo2zjs/files/foo2zjs-udevfwld-20070204.diff @@ -0,0 +1,191 @@ +diff -Nur foo2zjs.orig/Makefile foo2zjs/Makefile +--- foo2zjs.orig/Makefile 2007-02-11 11:08:50.000000000 +0100 ++++ foo2zjs/Makefile 2007-02-11 11:12:11.000000000 +0100 +@@ -9,6 +9,10 @@ + PREFIX=/usr/local + PREFIX=$(DESTDIR)/usr + ++# USB_PRINTERID is also installed there because it is needed by the FWloader ++FWLOADERDIR=$(DESTDIR)/sbin ++FIRMWAREDIR=$(DESTDIR)/lib/firmware ++ + # Pathnames for this package... + BIN=$(PREFIX)/bin + SHAREZJS=$(PREFIX)/share/foo2zjs +@@ -470,12 +474,12 @@ + fi; \ + done + # foo2zjs Firmware files (if any) +- install $(LPuid) $(LPgid) -m 775 -d $(SHAREZJS)/firmware/ ++ install $(LPuid) $(LPgid) -m 775 -d $(FIRMWAREDIR)/ + for i in sihp*.img; do \ + if [ -f $$i ]; then \ + base=`basename $$i .img`; \ + ./arm2hpdl $$i >$$base.dl; \ +- install -c -m 644 $$base.dl $(SHAREZJS)/firmware/; \ ++ install -c -m 644 $$base.dl $(FIRMWAREDIR)/; \ + fi; \ + done + # foo2oak ICM files (if any) +@@ -548,6 +552,8 @@ + UDEVDIR=$(DESTDIR)/etc/udev/rules.d + RULES=hplj10xx.rules + install-udev: ++ [ -d $(FWLOADERDIR) ] || install -d -m 755 $(FWLOADERDIR)/ ++ install -c -m 755 foo2zjs-loadfw $(FWLOADERDIR)/ + [ -d $(UDEVDIR) ] || install -d -m 755 $(UDEVDIR)/ + install -c -m 644 $(RULES) $(UDEVDIR)/11-$(RULES) + +diff -Nur foo2zjs.orig/foo2zjs-loadfw foo2zjs/foo2zjs-loadfw +--- foo2zjs.orig/foo2zjs-loadfw 1970-01-01 01:00:00.000000000 +0100 ++++ foo2zjs/foo2zjs-loadfw 2007-02-11 11:12:11.000000000 +0100 +@@ -0,0 +1,121 @@ ++#!/bin/sh ++ ++# foo2zjs-loadfw: ++# ++# Hotplug script for HP1000/1005/1020 USB laser printers. The model number ++# that this script deals with is determined from the udev env. ++# ++# Used to download firmware automatically into the printer when it ++# is powered up or plugged into the USB port. ++# ++# The inspiration fo this script is from: ++# Oscar Santacreu. Alicante-Spain (2002) ++# Mike Morgan (2004) ++# Modified by Stefan Schweizer (2005) to work as a udev-RUN-script ++ ++# ++# Directory to find downloadable HP firmware files sihpMMMM.dl ++# ++FWDIR=/lib/firmware ++ ++# ++# Program used to determine USB id information ++# ++USBID=/bin/usb_printerid ++ ++# ++# Figure out how to log our messages ++# ++if [ -t 1 ]; then ++ # Running from a tty... ++ log() { ++ echo "$0: $@" ++ } ++elif [ -x /usr/bin/logger ]; then ++ # Have logger... ++ log() { ++ logger -t "$0" -- "$@" ++ } ++else ++ # No logger... ++ log() { ++ echo "$0: $@" >> /var/log/messages ++ } ++fi ++ ++# ++# Figure out the model number from the name of this script ++# ++case "$1" in ++1000) ++ MODEL=1000 ++ MODELNAME="hp LaserJet $MODEL" ++ ;; ++1005) ++ MODEL=1005 ++ MODELNAME="hp LaserJet $MODEL" ++ ;; ++1018) ++ MODEL=1018 ++ MODELNAME="HP LaserJet $MODEL" ++ ;; ++1020) ++ MODEL=1020 ++ MODELNAME="HP LaserJet $MODEL" ++ ;; ++*) ++ log "Only HP LaserJet 1000, 1005, 1018 and 1020 are supported" ++ log "You need to supply one of these on the cmdline: $0 10**" ++ exit ++ ;; ++esac ++ ++if [ -z "$DEVNAME" ]; then ++ if [ -n "$2" ]; then ++ DEVNAME=$2 ++ else ++ log "You need to either have $DEVNAME set in the environment or supply it on the cmdline, like:" ++ log "$0 10** /dev/usb/lp0" ++ exit 1 ++ fi ++fi ++ ++# ++# Procedure to load a single device with firmware ++# ++load1() { ++ fw="$FWDIR/sihp$MODEL.dl" ++ if [ ! -f "$fw" ]; then ++ log "Missing HP LaserJet $MODEL firmware file $fw" ++ log "...read foo2zjs installation instructions and run ./getweb $MODEL" ++ return 1 ++ fi ++ ++ log "loading HP LaserJet $MODEL firmware $fw to $DEVNAME ..." ++ if cat $fw > $DEVNAME; then ++ log "... download successful." ++ else ++ log "... download failed." ++ fi ++ return 0 ++} ++ ++# ++# OK, now download firmware to any printers that need it ++# ++if [ -x $USBID ]; then ++ if $USBID $DEVNAME | grep "$MODELNAME" 2> /dev/null; then ++ # This is a LaserJet 100x ++ if $USBID $DEVNAME | grep 'FWVER' 2> /dev/null; then ++ log "HP LaserJet $MODEL firmware already loaded into $DEVNAME" ++ else ++ # Firmware is not yet loaded ++ load1 "$DEVNAME" ++ fi ++ else ++ log "No supported printer found." ++ fi ++else ++ log "HP LaserJet $MODEL firmware was not downloaded..." ++ log "...couldn't find $USBID" ++fi +diff -Nur foo2zjs.orig/hplj1000 foo2zjs/hplj1000 +--- foo2zjs.orig/hplj1000 2007-02-11 11:02:46.000000000 +0100 ++++ foo2zjs/hplj1000 2007-02-11 11:12:11.000000000 +0100 +@@ -35,7 +35,7 @@ + # + # Directory to find downloadable HP firmware files sihpMMMM.dl + # +-FWDIR=/usr/share/foo2zjs/firmware ++FWDIR=/lib/firmware + + # + # Program used to determine USB id information +diff -Nur foo2zjs.orig/hplj10xx.rules foo2zjs/hplj10xx.rules +--- foo2zjs.orig/hplj10xx.rules 2007-02-11 11:02:46.000000000 +0100 ++++ foo2zjs/hplj10xx.rules 2007-02-11 11:12:11.000000000 +0100 +@@ -1,8 +1,8 @@ + #Own udev rule for HP Laserjet 1000 +-KERNEL=="lp*", BUS=="usb", SYSFS{idVendor}=="03f0", SYSFS{product}=="hp LaserJet 1000", NAME="usb/%k", SYMLINK+="hplj1000%e", MODE="0666", RUN+="/etc/hotplug/usb/hplj1000" ++KERNEL=="lp*", BUS=="usb", SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="0517", NAME="usb/%k", SYMLINK+="hplj1000%e", MODE="0660", GROUP="lp", RUN+="/sbin/foo2zjs-loadfw 1000" + #Own udev rule for HP Laserjet 1005 +-KERNEL=="lp*", BUS=="usb", SYSFS{idVendor}=="03f0", SYSFS{product}=="hp LaserJet 1005 series", NAME="usb/%k", SYMLINK+="hplj1005%e", MODE="0666", RUN+="/etc/hotplug/usb/hplj1005" ++KERNEL=="lp*", BUS=="usb", SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="1317", NAME="usb/%k", SYMLINK+="hplj1005%e", MODE="0660", GROUP="lp", RUN+="/sbin/foo2zjs-loadfw 1005" + #Own udev rule for HP Laserjet 1018 +-KERNEL=="lp*", BUS=="usb", SYSFS{idVendor}=="03f0", SYSFS{product}=="HP LaserJet 1018", NAME="usb/%k", SYMLINK+="hplj1018%e", MODE="0666", RUN+="/etc/hotplug/usb/hplj1018" ++KERNEL=="lp*", BUS=="usb", SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="4117", NAME="usb/%k", SYMLINK+="hplj1018%e", MODE="0660", GROUP="lp", RUN+="/sbin/foo2zjs-loadfw 1018" + #Own udev rule for HP Laserjet 1020 +-KERNEL=="lp*", BUS=="usb", SYSFS{idVendor}=="03f0", SYSFS{product}=="HP LaserJet 1020", NAME="usb/%k", SYMLINK+="hplj1020%e", MODE="0666", RUN+="/etc/hotplug/usb/hplj1020" ++KERNEL=="lp*", BUS=="usb", SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="2b17", NAME="usb/%k", SYMLINK+="hplj1020%e", MODE="0660", GROUP="lp", RUN+="/sbin/foo2zjs-loadfw 1020" |