summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2006-06-14 23:14:18 +0000
committerStefan Schweizer <genstef@gentoo.org>2006-06-14 23:14:18 +0000
commita65cd769959cea0d44c34e8cd8686d537147c919 (patch)
treefde9c6b07620506f0d318c54fca5b0d22f41efb6 /net-print
parentadd udev for foo2zjs (diff)
downloadgentoo-2-a65cd769959cea0d44c34e8cd8686d537147c919.tar.gz
gentoo-2-a65cd769959cea0d44c34e8cd8686d537147c919.tar.bz2
gentoo-2-a65cd769959cea0d44c34e8cd8686d537147c919.zip
New version, digest fix, udev fix thanks to Kai Blaschke <webmaster@thw-theorie.de> and Ian Stakenvicius <ian@syndicated-productions.com> in bug 136550
(Portage version: 2.1)
Diffstat (limited to 'net-print')
-rw-r--r--net-print/foo2zjs/ChangeLog9
-rw-r--r--net-print/foo2zjs/files/digest-foo2zjs-2006060730
-rw-r--r--net-print/foo2zjs/files/foo2zjs-udevfwld-20060607.diff191
-rw-r--r--net-print/foo2zjs/foo2zjs-20060607.ebuild77
4 files changed, 306 insertions, 1 deletions
diff --git a/net-print/foo2zjs/ChangeLog b/net-print/foo2zjs/ChangeLog
index eef9bccd063f..b6e2509e2402 100644
--- a/net-print/foo2zjs/ChangeLog
+++ b/net-print/foo2zjs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-print/foo2zjs
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-print/foo2zjs/ChangeLog,v 1.15 2006/06/02 16:07:06 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-print/foo2zjs/ChangeLog,v 1.16 2006/06/14 23:14:18 genstef Exp $
+
+ 14 Jun 2006; Stefan Schweizer <genstef@gentoo.org>
+ -files/foo2zjs-udevfwld-20060523.diff,
+ +files/foo2zjs-udevfwld-20060607.diff:
+ New version, digest fix, udev fix thanks to Kai Blaschke
+ <webmaster@thw-theorie.de> and Ian Stakenvicius
+ <ian@syndicated-productions.com> in bug 136550
02 Jun 2006; Stefan Schweizer <genstef@gentoo.org>
-files/foo2zjs-Makefile-20060501.diff,
diff --git a/net-print/foo2zjs/files/digest-foo2zjs-20060607 b/net-print/foo2zjs/files/digest-foo2zjs-20060607
new file mode 100644
index 000000000000..2811689d0fb1
--- /dev/null
+++ b/net-print/foo2zjs/files/digest-foo2zjs-20060607
@@ -0,0 +1,30 @@
+MD5 cae0d20d3c1d57cd3953d9b335014294 cpplxp.exe 4799488
+RMD160 bcd5ceecca248c90a0d3e99dd55c6e1eedd4de6d cpplxp.exe 4799488
+SHA256 5f4c8b6f20ccf2d525f683847f5dc24bb4c7f58131d6704047d6c9a90d6895af cpplxp.exe 4799488
+MD5 42eafbaaf8224fcf2c418bd62bc1ae14 foo2zjs-20060607.tar.gz 917862
+RMD160 6cc9c46164dad2d2e0f9bcd8c0ce783a095cb825 foo2zjs-20060607.tar.gz 917862
+SHA256 5f292d3a7cd87afd2a764cc42815bfe88ef1ebd8d153ef2756edc982ab965d80 foo2zjs-20060607.tar.gz 917862
+MD5 8e6b7cd62e411fb3333f33712c0cc954 hpclj2600n.tar.gz 573671
+RMD160 1fe753ff90babd57d6f5eb289a13fba2359494a2 hpclj2600n.tar.gz 573671
+SHA256 54aa4648e986717f816a92f90d7c614924243c9279b9eec9246e94e0c539ee9c hpclj2600n.tar.gz 573671
+MD5 5118c4c83c560f023786e42420310ee8 km2430.tar.gz 929120
+RMD160 cc33cd6da46d2484f9fb4119aa52fcfd867af749 km2430.tar.gz 929120
+SHA256 8c3b4ed1f4a582442cb3c64f4b9a94fe52fef19b999c860a6694fde87de30c9b km2430.tar.gz 929120
+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-udevfwld-20060607.diff b/net-print/foo2zjs/files/foo2zjs-udevfwld-20060607.diff
new file mode 100644
index 000000000000..4400a6ed3511
--- /dev/null
+++ b/net-print/foo2zjs/files/foo2zjs-udevfwld-20060607.diff
@@ -0,0 +1,191 @@
+diff -Nupr foo2zjs.orig/foo2zjs-loadfw foo2zjs/foo2zjs-loadfw
+--- foo2zjs.orig/foo2zjs-loadfw 1970-01-01 01:00:00.000000000 +0100
++++ foo2zjs/foo2zjs-loadfw 2006-06-14 21:17:24.000000000 +0200
+@@ -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 -Nupr foo2zjs.orig/hplj1000 foo2zjs/hplj1000
+--- foo2zjs.orig/hplj1000 2006-06-14 21:17:18.000000000 +0200
++++ foo2zjs/hplj1000 2006-06-14 21:17:24.000000000 +0200
+@@ -35,7 +35,7 @@ DEV=""
+ #
+ # 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 -Nupr foo2zjs.orig/hplj10xx.rules foo2zjs/hplj10xx.rules
+--- foo2zjs.orig/hplj10xx.rules 2006-06-14 21:17:18.000000000 +0200
++++ foo2zjs/hplj10xx.rules 2006-06-14 21:20:24.000000000 +0200
+@@ -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="0666", 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="0666", 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="0666", 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="0666", RUN+="/sbin/foo2zjs-loadfw 1020"
+diff -Nupr foo2zjs.orig/Makefile foo2zjs/Makefile
+--- foo2zjs.orig/Makefile 2006-06-14 21:17:18.000000000 +0200
++++ foo2zjs/Makefile 2006-06-14 21:17:24.000000000 +0200
+@@ -9,6 +9,10 @@ VERSION=0.0
+ 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
+@@ -416,12 +420,12 @@ install-extra:
+ 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)
+@@ -464,6 +468,8 @@ install-hotplug:
+ 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 --git a/net-print/foo2zjs/foo2zjs-20060607.ebuild b/net-print/foo2zjs/foo2zjs-20060607.ebuild
new file mode 100644
index 000000000000..0a85852a5e18
--- /dev/null
+++ b/net-print/foo2zjs/foo2zjs-20060607.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-print/foo2zjs/foo2zjs-20060607.ebuild,v 1.1 2006/06/14 23:14:18 genstef Exp $
+
+inherit eutils
+
+DESCRIPTION="Support for printing to ZjStream-based printers"
+HOMEPAGE="http://foo2zjs.rkkda.com/"
+SRC_URI="ftp://ftp.minolta-qms.com/pub/crc/out_going/win/m23dlicc.exe
+ ftp://ftp.minolta-qms.com/pub/crc/out_going/win2000/m22dlicc.exe
+ ftp://ftp.minolta-qms.com/pub/crc/out_going/windows/cpplxp.exe
+ http://gentooexperimental.org/~genstef/dist/${P}.tar.gz
+ http://foo2zjs.rkkda.com/sihp1000.tar.gz
+ http://foo2zjs.rkkda.com/sihp1005.tar.gz
+ http://foo2zjs.rkkda.com/sihp1018.tar.gz
+ http://foo2zjs.rkkda.com/sihp1020.tar.gz
+ http://foo2zjs.rkkda.com/km2430.tar.gz
+ http://foo2hp.rkkda.com/hpclj2600n.tar.gz"
+RESTRICT="nomirror"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cups foomaticdb udev usb"
+DEPEND="app-arch/unzip"
+RDEPEND="cups? ( net-print/cups )
+ foomaticdb? ( net-print/foomatic-db-engine )
+ net-print/foomatic-filters
+ udev? ( sys-fs/udev )
+ usb? ( || ( sys-fs/udev sys-apps/hotplug ) )"
+KEYWORDS="~x86 ~amd64 ~ppc"
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${P}.tar.gz
+
+ # link getweb files in ${S} to get unpacked
+ for i in ${A}
+ do
+ ln -s ${DISTDIR}/${i} ${S}
+ done
+
+ cd ${S}
+ epatch ${FILESDIR}/foo2zjs-Makefile-20060523.diff
+ epatch ${FILESDIR}/foo2zjs-udevfwld-20060607.diff
+}
+
+src_compile() {
+ emake getweb || die "Failed building getweb script"
+
+ # remove wget as we got the firmware with portage
+ sed -i -e "s/.*wget.*//" \
+ -e "s/error \"Couldn't dow.*//" getweb
+ # unpack files
+ ./getweb all
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ use foomaticdb && dodir /usr/share/foomatic/db/source
+
+ use cups && dodir /usr/share/cups/model
+
+ emake DESTDIR=${D} install \
+ || die "make install failed"
+
+ if use udev; then
+ emake DESTDIR=${D} install-udev \
+ || die "make install-udev failed"
+ elif use usb; then
+ emake DESTDIR=${D} install-hotplug \
+ || die "make install-hotplug failed"
+ fi
+}
+
+pkg_postinst() {
+ rm -f ${ROOT}/etc/udev/rules.d/58-foo2zjs.rules
+}