Sisyphus repository
Last update: 18 october 2019 | SRPMs: 17501 | Visits: 15290158
en ru br
ALT Linux repos
S:20180519-alt1
D:20080605-alt2
5.0: 20081207-alt1
4.1: 20080923-alt1
4.0: 20080806-alt1.M40.1
+backports:20060523-alt0.9
3.0: 1.59-alt1
+backports:20060523-alt0.1.M30.1

Group :: System/Configuration/Printing
RPM: foo2zjs

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: foo2zjs.hplj1000_20120714.patch
Download


--- foo2zjs.orig/hplj1000	2012-06-02 03:38:32.000000000 +0400
+++ foo2zjs/hplj1000	2012-07-14 11:10:47.000000000 +0400
@@ -24,6 +24,9 @@
 #		Mike Morgan (2004)
 #
 
+# load usblp module
+/sbin/modprobe usblp
+
 # udev calls us twice on FC4! Just want /dev/usb/lp<N>
 case "$DEVNAME" in
 /dev/usb/usb*)	exit;;
@@ -47,7 +50,7 @@
 #
 # Directory to find downloadable HP firmware files sihpMMMM.dl
 #
-FWDIR=/usr/share/foo2zjs/firmware
+FWDIR=/var/lib/foo2zjs/firmware
 
 #
 # Program used to determine USB printer id information
@@ -89,37 +92,37 @@
     MODEL=P1005; FWMODEL=$MODEL
     USB1=0x03f0	#Vendor
     USB2=0x3d17	#Model
-    FWDIR=/usr/share/foo2xqx/firmware
+    FWDIR=/var/lib/foo2xqx/firmware
     ;;
 *P1006)
     MODEL=P1006; FWMODEL=$MODEL
     USB1=0x03f0	#Vendor
     USB2=0x3e17	#Model
-    FWDIR=/usr/share/foo2xqx/firmware
+    FWDIR=/var/lib/foo2xqx/firmware
     ;;
 *P1007)
     MODEL=P1007; FWMODEL=P1005		# Alias
     USB1=0x03f0	#Vendor
     USB2=0x4817	#Model
-    FWDIR=/usr/share/foo2xqx/firmware
+    FWDIR=/var/lib/foo2xqx/firmware
     ;;
 *P1008)
     MODEL=P1008; FWMODEL=P1006		# Alias
     USB1=0x03f0	#Vendor
     USB2=0x4917	#Model
-    FWDIR=/usr/share/foo2xqx/firmware
+    FWDIR=/var/lib/foo2xqx/firmware
     ;;
 *P1505)
     MODEL=P1505; FWMODEL=$MODEL
     USB1=0x03f0	#Vendor
     USB2=0x3f17	#Model
-    FWDIR=/usr/share/foo2xqx/firmware
+    FWDIR=/var/lib/foo2xqx/firmware
     ;;
 *P1505n)
     MODEL=P1505n; FWMODEL=$MODEL
     USB1=0x03f0	#Vendor
     USB2=0x4017	#Model
-    FWDIR=/usr/share/foo2xqx/firmware
+    FWDIR=/var/lib/foo2xqx/firmware
     ;;
 *1000)
     MODEL=1000; FWMODEL=$MODEL
@@ -215,8 +218,20 @@
     fw="$FWDIR/sihp$FWMODEL.dl"
     if [ ! -f "$fw" ]; then
 	log "Missing HP LaserJet $MODEL firmware file $fw"
-	log "...read foo2zjs installation instructions and run ./getweb $MODEL"
-	return 1
+#	Ёлы. Нет прошивки. Смотрим, установлен ли foo2zjs_download_fw. Если да, то пробуем скачать прошивку.
+	app_fwd="/usr/sbin/foo2zjs_download_fw"
+	if [ ! -f "$app_fwd" ]; then
+	    log "Firmware not installing. Read foo2zjs installation instructions (/usr/share/doc/foo2zjs-XXXXXXXX/README-UTF8.ALT)"
+	    return 1
+	else
+	    log "Yes! foo2zjs_download_fw installed. Try download firmware $MODEL ...."
+	    if $app_fwd $FWMODEL $FWDIR; then
+		log "Can't download firmware. Read foo2zjs installation instructions (/usr/share/doc/foo2zjs-XXXXXXXX/README-UTF8.ALT)"
+		return 1
+	    else
+		log "Firmware downloding, unpacking and installed"
+	    fi
+	fi
     fi
 
     log "loading HP LaserJet $MODEL firmware $fw to $_dev ..."
@@ -227,6 +242,8 @@
 	else
 	    log "... download failed."
 	fi
+	log ".... remove usblp module if it blacklisted"
+	! grep -qs "^blacklist usblp" /etc/modprobe.d/* || /sbin/rmmod usblp
     ) &
     return 0
 }
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin