summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2007-04-24 22:13:07 +0000
committerStefan Schweizer <genstef@gentoo.org>2007-04-24 22:13:07 +0000
commit7ac9465be221d12c02a350f5e19b8875bc8b4505 (patch)
tree98d3c049e35d7fb7c15395a8e36302817b535a06 /net-print/foo2zjs
parentMIPS love. (diff)
downloadhistorical-7ac9465be221d12c02a350f5e19b8875bc8b4505.tar.gz
historical-7ac9465be221d12c02a350f5e19b8875bc8b4505.tar.bz2
historical-7ac9465be221d12c02a350f5e19b8875bc8b4505.zip
New version with much improved udev rules thanks to zzam. Fixes bug 154235 thanks to Sergey Zolotorev <sergey.zolotorev@gmail.com> and hopefully also fixes #166537
Package-Manager: portage-2.1.2.4
Diffstat (limited to 'net-print/foo2zjs')
-rw-r--r--net-print/foo2zjs/ChangeLog11
-rw-r--r--net-print/foo2zjs/Manifest24
-rw-r--r--net-print/foo2zjs/files/digest-foo2zjs-2007042430
-rw-r--r--net-print/foo2zjs/files/foo2zjs-Makefile-20070424.diff163
-rw-r--r--net-print/foo2zjs/files/foo2zjs-udevfwld-20070424.diff197
-rw-r--r--net-print/foo2zjs/foo2zjs-20070424.ebuild116
6 files changed, 536 insertions, 5 deletions
diff --git a/net-print/foo2zjs/ChangeLog b/net-print/foo2zjs/ChangeLog
index 6066e7cf58e1..e1088d5d0543 100644
--- a/net-print/foo2zjs/ChangeLog
+++ b/net-print/foo2zjs/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-print/foo2zjs
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-print/foo2zjs/ChangeLog,v 1.22 2007/02/19 22:34:49 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-print/foo2zjs/ChangeLog,v 1.23 2007/04/24 22:13:06 genstef Exp $
+
+*foo2zjs-20070424 (24 Apr 2007)
+
+ 24 Apr 2007; Stefan Schweizer <genstef@gentoo.org>
+ +files/foo2zjs-Makefile-20070424.diff,
+ +files/foo2zjs-udevfwld-20070424.diff, +foo2zjs-20070424.ebuild:
+ New version with much improved udev rules thanks to zzam. Fixes bug 154235
+ thanks to Sergey Zolotorev <sergey.zolotorev@gmail.com> and hopefully also
+ fixes #166537
19 Feb 2007; <genstef@gentoo.org> files/foo2zjs-Makefile-20070204.diff:
Avoid sandbox violations thanks to Jason Bucata <jbucata@tulsaconnect.com>
diff --git a/net-print/foo2zjs/Manifest b/net-print/foo2zjs/Manifest
index a0f035ea04a5..2a093722080b 100644
--- a/net-print/foo2zjs/Manifest
+++ b/net-print/foo2zjs/Manifest
@@ -2,12 +2,21 @@ AUX foo2zjs-Makefile-20070204.diff 4934 RMD160 2b320f76c6b1625f01040bc03bb4e5784
MD5 46bb57d642637a31389577cb3780af92 files/foo2zjs-Makefile-20070204.diff 4934
RMD160 2b320f76c6b1625f01040bc03bb4e5784d02e353 files/foo2zjs-Makefile-20070204.diff 4934
SHA256 6a14093f5ee6f4a2d39bdbbc44a5d44ae2a1033df6dad15a0236b7b7ada3c85d files/foo2zjs-Makefile-20070204.diff 4934
+AUX foo2zjs-Makefile-20070424.diff 4992 RMD160 48fb9a37604015aff0cb0e726b3f6eb05088ea01 SHA1 2108cec46ad1a10763312c2436d8b47006132043 SHA256 574c9c7ee1cd7aeba33ddf647bbdb553f6fd1d0dcf8fbbf541c8206ce4ae9545
+MD5 c079d2c5553251c17daabfc942178056 files/foo2zjs-Makefile-20070424.diff 4992
+RMD160 48fb9a37604015aff0cb0e726b3f6eb05088ea01 files/foo2zjs-Makefile-20070424.diff 4992
+SHA256 574c9c7ee1cd7aeba33ddf647bbdb553f6fd1d0dcf8fbbf541c8206ce4ae9545 files/foo2zjs-Makefile-20070424.diff 4992
AUX foo2zjs-udevfwld-20070204.diff 6322 RMD160 ef0cdef133664fd191dab5efbe60e0a63c90ccd6 SHA1 6473adb9c22e29b19218185e51ea042af233925c SHA256 d8518ed1c0ee9e90adedd7f1cde11429c989c8b0420648bcb50a1a4f267df527
MD5 a127931b51f376647ce0b58e9323e440 files/foo2zjs-udevfwld-20070204.diff 6322
RMD160 ef0cdef133664fd191dab5efbe60e0a63c90ccd6 files/foo2zjs-udevfwld-20070204.diff 6322
SHA256 d8518ed1c0ee9e90adedd7f1cde11429c989c8b0420648bcb50a1a4f267df527 files/foo2zjs-udevfwld-20070204.diff 6322
+AUX foo2zjs-udevfwld-20070424.diff 6255 RMD160 e02a10cb8658d7fee164d53f630c5d0af8858536 SHA1 a65ce9e5b2c51e7665dacfbad629f5b5250453bc SHA256 66e289e872e06151949fd1b99c12cb5413a642f033e528f42fd5b50ec8641c48
+MD5 4aaecb8d5505b8dc63ac422def03508c files/foo2zjs-udevfwld-20070424.diff 6255
+RMD160 e02a10cb8658d7fee164d53f630c5d0af8858536 files/foo2zjs-udevfwld-20070424.diff 6255
+SHA256 66e289e872e06151949fd1b99c12cb5413a642f033e528f42fd5b50ec8641c48 files/foo2zjs-udevfwld-20070424.diff 6255
DIST cpplxp.exe 4799488 RMD160 bcd5ceecca248c90a0d3e99dd55c6e1eedd4de6d SHA1 952ad6557f2a78ec30e9786f52e95f012e39ac1c SHA256 5f4c8b6f20ccf2d525f683847f5dc24bb4c7f58131d6704047d6c9a90d6895af
DIST foo2zjs-20070204.tar.gz 936419 RMD160 4e6160fed4e642106ff62bff64e5a4cf637d9f0b SHA1 df40152952a0d9d27bfebaddf33e2fd39faa0ac6 SHA256 9dc978b208ee7762b6b16ff445103722f45c341457014fa9b3bad7dd2a0bd5d3
+DIST foo2zjs-20070424.tar.gz 1444695 RMD160 d51c6492bab14f9cc416d18fa8aa354d1f21aa81 SHA1 56f7cf76e0c468581f305b2e949fc4abeeeb2a78 SHA256 1aedafd2791bdfb1d59c0e649514142e7f93f6280b2258d71bcdd86e3551832a
DIST hpclj2600n.tar.gz 573660 RMD160 a0c03c901cb722bbc61347e9159b0a4faa72329d SHA1 9157061f8796f6f5e0038baa26b9882e875b758b SHA256 b5ed74e50b88152a09d9ad17bca94e2299d348ed6d343ff015344757b72d390a
DIST km2430.tar.gz 929112 RMD160 ddd2d5375611a41d62e436ed6f3b3d62356b90a5 SHA1 353b86223d35d73de60231e32a8fb840e4a02823 SHA256 59b559d5f885e0e8870148795674366b527782a062c6cac1dc2048c2759a356b
DIST m22dlicc.exe 634368 RMD160 392922135a3f517a76a2b5e8b7200c83e6104ef6 SHA1 4f2de3e9e5418361763805b76722cd5284543110 SHA256 1d57413f4c36941c64599dae2ac2b1f8a397e128796c2796a108be5b8fd282b3
@@ -20,10 +29,14 @@ EBUILD foo2zjs-20070204.ebuild 4096 RMD160 e41d450654e26401421e579fdd579cb6100c3
MD5 2aa1a4b0f99e3b183417cf3b0f2e1469 foo2zjs-20070204.ebuild 4096
RMD160 e41d450654e26401421e579fdd579cb6100c3953 foo2zjs-20070204.ebuild 4096
SHA256 258bb8ba74b13a91a07e66bf957252c795483f90663b7f36c28f5d7986ec3066 foo2zjs-20070204.ebuild 4096
-MISC ChangeLog 5777 RMD160 0a60f078df798a878a8fb6245d3390efec196cad SHA1 1d64eaefe8b28e98863fd0838195fdcdd0ddc877 SHA256 5ecc4645166ddfa171428079ec0b12cc0e9bc7bc2a163612420e82a5b24c1354
-MD5 cdf80444a704a10ae90b5d3dcecdc4bd ChangeLog 5777
-RMD160 0a60f078df798a878a8fb6245d3390efec196cad ChangeLog 5777
-SHA256 5ecc4645166ddfa171428079ec0b12cc0e9bc7bc2a163612420e82a5b24c1354 ChangeLog 5777
+EBUILD foo2zjs-20070424.ebuild 4488 RMD160 1c9b62217e55db0ccf85fe633ab97968f29cff08 SHA1 6e11f9043148174287010d029763863a2de97984 SHA256 31e04a08c5e793eba3dda405e7e145f13b21b34c76a867f3eb153d27bbcf63a9
+MD5 3d972308417391505df165089ed8ab67 foo2zjs-20070424.ebuild 4488
+RMD160 1c9b62217e55db0ccf85fe633ab97968f29cff08 foo2zjs-20070424.ebuild 4488
+SHA256 31e04a08c5e793eba3dda405e7e145f13b21b34c76a867f3eb153d27bbcf63a9 foo2zjs-20070424.ebuild 4488
+MISC ChangeLog 6142 RMD160 7bf1f16c962548896a6f545a178cd2b1604acdf1 SHA1 abcbb8ab869d7aaffacffd32d42676903b8a38d0 SHA256 64ca8da6d6d56fd23bee13245a2f345b5391c09f62b711ec8a2992706d243379
+MD5 9aef493f9da961b70f61f924ab92c89b ChangeLog 6142
+RMD160 7bf1f16c962548896a6f545a178cd2b1604acdf1 ChangeLog 6142
+SHA256 64ca8da6d6d56fd23bee13245a2f345b5391c09f62b711ec8a2992706d243379 ChangeLog 6142
MISC metadata.xml 266 RMD160 71124c3803fd7ba3370f1b9b55b78d56c5e49201 SHA1 12efa221e1a3580f557896136ccece543c4dca39 SHA256 27d69d00958eb408ac3c397767f9104d5e85c85a977c094140a8169fc6750df7
MD5 6062bcaf60fde68c2418376f4cd91f3e metadata.xml 266
RMD160 71124c3803fd7ba3370f1b9b55b78d56c5e49201 metadata.xml 266
@@ -31,3 +44,6 @@ SHA256 27d69d00958eb408ac3c397767f9104d5e85c85a977c094140a8169fc6750df7 metadata
MD5 9ba1c2e1af7adcf6e8f534fd02698843 files/digest-foo2zjs-20070204 2242
RMD160 ee55960880a1a73a729c81bc9fcd37f2978dc8c4 files/digest-foo2zjs-20070204 2242
SHA256 5c224ebc4dd8ddc7336c8b0d805d481018f0b9b7d5835ca52507940aedcdeced files/digest-foo2zjs-20070204 2242
+MD5 fec1a97257d6c36b8a7f9ecf15d72025 files/digest-foo2zjs-20070424 2245
+RMD160 eb4d44dc664af1bed6bed98010082befd248c55c files/digest-foo2zjs-20070424 2245
+SHA256 67aa4076006f189f5d991a1895630fdd6af84e362107beb0d97b9239f693109b files/digest-foo2zjs-20070424 2245
diff --git a/net-print/foo2zjs/files/digest-foo2zjs-20070424 b/net-print/foo2zjs/files/digest-foo2zjs-20070424
new file mode 100644
index 000000000000..c1c7c33fa73c
--- /dev/null
+++ b/net-print/foo2zjs/files/digest-foo2zjs-20070424
@@ -0,0 +1,30 @@
+MD5 cae0d20d3c1d57cd3953d9b335014294 cpplxp.exe 4799488
+RMD160 bcd5ceecca248c90a0d3e99dd55c6e1eedd4de6d cpplxp.exe 4799488
+SHA256 5f4c8b6f20ccf2d525f683847f5dc24bb4c7f58131d6704047d6c9a90d6895af cpplxp.exe 4799488
+MD5 2041c2866c43666ed3de43bc2d96e540 foo2zjs-20070424.tar.gz 1444695
+RMD160 d51c6492bab14f9cc416d18fa8aa354d1f21aa81 foo2zjs-20070424.tar.gz 1444695
+SHA256 1aedafd2791bdfb1d59c0e649514142e7f93f6280b2258d71bcdd86e3551832a foo2zjs-20070424.tar.gz 1444695
+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-20070424.diff b/net-print/foo2zjs/files/foo2zjs-Makefile-20070424.diff
new file mode 100644
index 000000000000..52f751e63f7b
--- /dev/null
+++ b/net-print/foo2zjs/files/foo2zjs-Makefile-20070424.diff
@@ -0,0 +1,163 @@
+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-04-24 23:35:39.000000000 +0200
+@@ -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-04-24 23:36:19.000000000 +0200
++++ foo2zjs/icc2ps/Makefile 2007-04-24 23:35:39.000000000 +0200
+@@ -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 -Nur foo2zjs.orig/Makefile foo2zjs/Makefile
+--- foo2zjs.orig/Makefile 2007-04-24 23:36:19.000000000 +0200
++++ foo2zjs/Makefile 2007-04-24 23:36:09.000000000 +0200
+@@ -8,7 +8,7 @@
+
+ # Installation prefix...
+ PREFIX=/usr/local
+-PREFIX=/usr
++PREFIX=$(DESTDIR)/usr
+
+ # Pathnames for this package...
+ BIN=$(PREFIX)/bin
+@@ -22,7 +22,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
+@@ -192,7 +192,7 @@
+ endif
+
+ # Compiler flags
+-CFLAGS += -O2 -Wall
++CFLAGS ?= -O2 -Wall
+ #CFLAGS += -g
+
+ #
+@@ -396,12 +396,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,
+@@ -429,6 +431,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 \
+@@ -446,10 +449,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
+
+@@ -528,19 +531,14 @@
+ fi; \
+ done
+
+-MODEL=/usr/share/cups/model
+-LOCALMODEL=/usr/local/share/cups/model
+-PPD=/usr/share/ppd
++MODEL=$(PREFIX)/share/cups/model
++#LOCALMODEL=/usr/local/share/cups/model
++PPD=$(PREFIX)/share/ppd
+ install-ppd:
+ #
+ # Install PPD files for CUPS
+ #
+ if [ -d $(PPD) ]; then \
+- find $(PPD) -name '*foo2zjs*' | xargs rm -f; \
+- find $(PPD) -name '*foo2hp*' | xargs rm -f; \
+- find $(PPD) -name '*foo2xqx*' | xargs rm -f; \
+- find $(PPD) -name '*foo2lava*' | xargs rm -f; \
+- find $(PPD) -name '*foo2qpdl*' | xargs rm -f; \
+ [ -d $(PPD)/foo2zjs ] || mkdir $(PPD)/foo2zjs; \
+ cd PPD; \
+ for ppd in *.ppd; do \
+@@ -559,10 +557,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:
+ #
+@@ -580,18 +576,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 \
+@@ -916,7 +912,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 --git a/net-print/foo2zjs/files/foo2zjs-udevfwld-20070424.diff b/net-print/foo2zjs/files/foo2zjs-udevfwld-20070424.diff
new file mode 100644
index 000000000000..1478d68e0ac4
--- /dev/null
+++ b/net-print/foo2zjs/files/foo2zjs-udevfwld-20070424.diff
@@ -0,0 +1,197 @@
+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-04-24 23:21:12.000000000 +0200
+@@ -0,0 +1,127 @@
++#!/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
++
++#
++# Timeout to load firmware
++#
++TIMEOUT=6
++
++#
++# 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 [ -n "$2" ]; then
++ DEVNAME=$2
++elif [ -n "$DEVNAME" ]; then
++ log 'using $DEVNAME'
++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
++
++#
++# 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
++ sleep $TIMEOUT
++ 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-04-24 23:14:56.000000000 +0200
++++ foo2zjs/hplj1000 2007-04-24 23:18:43.000000000 +0200
+@@ -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-04-24 23:14:56.000000000 +0200
++++ foo2zjs/hplj10xx.rules 2007-04-24 23:24:19.000000000 +0200
+@@ -1,8 +1,4 @@
+-#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"
+-#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"
+-#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"
+-#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"
++ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0517", RUN+="/sbin/foo2zjs-loadfw 1000 $tempnode"
++ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1317", RUN+="/sbin/foo2zjs-loadfw 1005 $tempnode"
++ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="4117", RUN+="/sbin/foo2zjs-loadfw 1018 $tempnode"
++ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="2b17", RUN+="/sbin/foo2zjs-loadfw 1020 $tempnode"
+diff -Nur foo2zjs.orig/Makefile foo2zjs/Makefile
+--- foo2zjs.orig/Makefile 2007-04-24 23:14:56.000000000 +0200
++++ foo2zjs/Makefile 2007-04-24 23:18:43.000000000 +0200
+@@ -10,6 +10,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
+@@ -506,12 +510,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)
+@@ -586,6 +590,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 --git a/net-print/foo2zjs/foo2zjs-20070424.ebuild b/net-print/foo2zjs/foo2zjs-20070424.ebuild
new file mode 100644
index 000000000000..c54b7784ef63
--- /dev/null
+++ b/net-print/foo2zjs/foo2zjs-20070424.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-print/foo2zjs/foo2zjs-20070424.ebuild,v 1.1 2007/04/24 22:13:06 genstef Exp $
+
+inherit eutils
+
+DESCRIPTION="Support for printing to ZjStream-based printers"
+HOMEPAGE="http://foo2zjs.rkkda.com/"
+SRC_URI="
+ http://gentooexperimental.org/~genstef/dist/${P}.tar.gz
+ foo2zjs_devices_hp2600n? ( http://foo2zjs.rkkda.com/km2430.tar.gz http://foo2hp.rkkda.com/hpclj2600n.tar.gz )
+ foo2zjs_devices_hp1600? ( http://foo2zjs.rkkda.com/km2430.tar.gz http://foo2hp.rkkda.com/hpclj2600n.tar.gz )
+ foo2zjs_devices_km2530? ( http://foo2zjs.rkkda.com/km2430.tar.gz )
+ foo2zjs_devices_km2490? ( http://foo2zjs.rkkda.com/km2430.tar.gz )
+ foo2zjs_devices_km2430? ( http://foo2zjs.rkkda.com/km2430.tar.gz )
+ foo2zjs_devices_km2300? ( http://foo2zjs.rkkda.com/km2430.tar.gz ftp://ftp.minolta-qms.com/pub/crc/out_going/win/m23dlicc.exe )
+ foo2zjs_devices_km2200? ( ftp://ftp.minolta-qms.com/pub/crc/out_going/win2000/m22dlicc.exe )
+ foo2zjs_devices_kmcpwl? ( ftp://ftp.minolta-qms.com/pub/crc/out_going/windows/cpplxp.exe )
+ foo2zjs_devices_hp1020? ( http://foo2zjs.rkkda.com/sihp1020.tar.gz )
+ foo2zjs_devices_hp1018? ( http://foo2zjs.rkkda.com/sihp1018.tar.gz )
+ foo2zjs_devices_hp1005? ( http://foo2zjs.rkkda.com/sihp1005.tar.gz )
+ foo2zjs_devices_hp1000? ( http://foo2zjs.rkkda.com/sihp1000.tar.gz )
+ !foo2zjs_devices_hp2600n? ( !foo2zjs_devices_hp1600? (
+ !foo2zjs_devices_km2530? ( !foo2zjs_devices_km2490? (
+ !foo2zjs_devices_km2430? ( !foo2zjs_devices_km2300? (
+ !foo2zjs_devices_km2200? ( !foo2zjs_devices_kmcpwl? (
+ !foo2zjs_devices_hp1020? ( !foo2zjs_devices_hp1018? (
+ !foo2zjs_devices_hp1005? ( !foo2zjs_devices_hp1000? (
+ http://foo2zjs.rkkda.com/km2430.tar.gz
+ http://foo2hp.rkkda.com/hpclj2600n.tar.gz
+ 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://foo2zjs.rkkda.com/sihp1020.tar.gz
+ http://foo2zjs.rkkda.com/sihp1018.tar.gz
+ http://foo2zjs.rkkda.com/sihp1005.tar.gz
+ http://foo2zjs.rkkda.com/sihp1000.tar.gz ) ) ) ) ) ) ) ) ) ) ) )
+ "
+RESTRICT="nomirror"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cups foomaticdb usb
+ foo2zjs_devices_hp2600n foo2zjs_devices_hp1600
+ foo2zjs_devices_km2530 foo2zjs_devices_km2490
+ foo2zjs_devices_km2430 foo2zjs_devices_km2300
+ foo2zjs_devices_km2200 foo2zjs_devices_kmcpwl
+ foo2zjs_devices_hp1020 foo2zjs_devices_hp1018
+ foo2zjs_devices_hp1005 foo2zjs_devices_hp1000"
+DEPEND="app-arch/unzip
+ app-editors/vim"
+RDEPEND="cups? ( net-print/cups )
+ foomaticdb? ( net-print/foomatic-db-engine )
+ net-print/foomatic-filters
+ sys-fs/udev"
+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-20070424.diff
+ epatch ${FILESDIR}/foo2zjs-udevfwld-20070424.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/.*rm $.*//' \
+ -e "s/error \"Couldn't dow.*//" getweb
+
+ ln -s km2430.tar.gz km2530.tar.gz
+ # unpack files
+ use foo2zjs_devices_hp2600n && ./getweb 2600n
+ use foo2zjs_devices_hp1600 && ./getweb 1600
+ use foo2zjs_devices_km2530 && ./getweb 2530
+ use foo2zjs_devices_km2490 && ./getweb 2490
+ use foo2zjs_devices_km2430 && ./getweb 2430
+ use foo2zjs_devices_km2300 && ./getweb 2300
+ use foo2zjs_devices_km2200 && ./getweb 2200
+ use foo2zjs_devices_kmcpwl && ./getweb cpwl
+
+ use foo2zjs_devices_hp1020 && ./getweb 1020
+ use foo2zjs_devices_hp1018 && ./getweb 1018
+ use foo2zjs_devices_hp1005 && ./getweb 1005
+ use foo2zjs_devices_hp1000 && ./getweb 1000
+ use foo2zjs_devices_hp2600n || use foo2zjs_devices_hp1600 || use \
+ foo2zjs_devices_km2430 || use foo2zjs_devices_km2430 || use \
+ foo2zjs_devices_km2300 || use foo2zjs_devices_km2200 || use \
+ foo2zjs_devices_kmcpwl || use foo2zjs_devices_hp1020 || use \
+ foo2zjs_devices_hp1018 || use foo2zjs_devices_hp1005 || use \
+ foo2zjs_devices_hp1000 || ./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 install-udev \
+ || die "emake install failed"
+}
+
+pkg_postinst() {
+ udevcontrol reload_rules
+}