przepraszam nowy klient pocztowy.
teraz wszystko jest ok.
# $Revision: $, $Date: $

Summary:        Linux printer driver for ZjStream protocol
Summary(pl.UTF-8):Linuksowy sterownik drukarek dla protokołu ZjStream
Name:           foo2zjs
Version:        0.0
Release:        1
License:        GPL v2
Group:          Applications/System
Source0:        http://foo2zjs.rkkda.com/%{name}.tar.gz
# Source0-md5:  68a1547c33d22f293986805ecec7146a
Source1:        http://foo2zjs.rkkda.com/sihp1000.tar.gz
# Source1-md5:
Source2:        http://foo2zjs.rkkda.com/sihp1005.tar.gz
# Source2-md5:
Source3:        http://foo2zjs.rkkda.com/sihp1018.tar.gz
# Source3-md5:
Source4:        http://foo2zjs.rkkda.com/sihp1020.tar.gz
# Source4-md5:
Patch0:         %{name}-make.patch
Patch1:         %{name}-udev-rules.patch
Patch2:         %{name}-hplj1000.patch
URL:            http//foo2zjs.rkkda.com
BuildRequires:  cups-filter-foomatic
BuildRequires:  ghostscript
Requires:       foomatic-db
BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
foo2zjs is an open source printer driver for printers that use the
Zenographics ZjStream wire protocol for their print data. With
foo2zjs, you can print to some HP and Minolta/QMS ZjStream printers,
such as these:

- HP LaserJet 1000 B/W
- HP LaserJet 1005 B/W
- HP LaserJet 1018 B/W
- HP LaserJet 1020 B/W
- Konica Minolta magicolor 2430 DL B/W and color
- Minolta/QMS 2300 DL B/W and color
- Minolta/QMS 2200 DL B/W and color

%description -l pl.UTF-8
foo2zjs to otwarty sterownik dla drukarek używających do druku
protokołu Zenographics ZjStream. Dzięki foo2zjs możesz drukować na
drukarkach HP oraz Minolta/QMS ZjStream takich jak:

- HP LaserJet 1000 B/W
- HP LaserJet 1005 B/W
- HP LaserJet 1018 B/W
- HP LaserJet 1020 B/W
- Konica Minolta magicolor 2430 DL B/W and color
- Minolta/QMS 2300 DL B/W and color
- Minolta/QMS 2200 DL B/W and color

%package firmware
Summary:        Firmware for HP LaserJet 10xx printers
Summary(pl.UTF-8):Firmware dla drukarek HP LaserJet 10xx
License:        distributable
Group:          Applications/System
Requires:       %{name}-udev-rules

%description firmware
Firmware for HP LaserJet 10xx printers
- HP LaserJet 1000, 1005, 1018, 1020

%description firmware -l pl.UTF-8
Firmware dla drukarek HP LaserJet 10xx
- HP LaserJet 1000, 1005, 1018, 1020

%package udev-rules
Summary:        udev rules for HP LaserJet 10xx printers
Summary(pl.UTF-8):reguły udev dla drukarek HP LaserJet 10xx
Group:          Applications/System
Requires:       %{name}-firmware
Requires:       cups-foomatic-db-HP
Requires:       foo2zjs
Requires:       udev

%description udev-rules
udev rules for printers:
- HP LaserJet 1000, 1005, 1018, 1020

%description udev-rules -l pl.UTF-8
reguły udev dla drukarek:
- HP LaserJet 1000, 1005, 1018, 1020

%prep
%setup -q -n %{name}
%patch0 -p0
%patch1 -p0
%patch2 -p0

%build
%{__make}

%install
rm -rf $RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_bindir}
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{firmware,crd}
install -d $RPM_BUILD_ROOT/etc/udev/rules.d
install -d $RPM_BUILD_ROOT%{_mandir}/man1
install {arm2hpdl,foo2zjs,foo2zjs-wrapper,zjsdecode,usb_printerid} \
    $RPM_BUILD_ROOT%{_bindir}/
install hplj1000 $RPM_BUILD_ROOT%{_bindir}/hplj10xx
install hplj10xx.rules $RPM_BUILD_ROOT/etc/udev/rules.d/11-hplj10xx.rules

cp %{SOURCE1} .
cp %{SOURCE2} .
cp %{SOURCE3} .
cp %{SOURCE4} .
for i in sihp1000 sihp1005 sihp1018 sihp1020; do
tar -xf $i.tar.gz --use=gzip
rm $i.tar.gz
./arm2hpdl $i.img > $i.dl
install $i.dl $RPM_BUILD_ROOT%{_datadir}/%{name}/firmware/
done
install *.ps $RPM_BUILD_ROOT%{_datadir}/%{name}
install crd/zjs/*.{crd,ps} \
        $RPM_BUILD_ROOT%{_datadir}/%{name}/crd
install {foo2zjs,foo2zjs-wrapper,zjsdecode}.1 \
        $RPM_BUILD_ROOT%{_mandir}/man1

%clean
rm -rf $RPM_BUILD_ROOT

%post
%service -q cups restart

%files
%defattr(644,root,root,755)
%doc ChangeLog README manual.pdf
%attr(755,root,root) %{_bindir}/*
%{_datadir}/%{name}/*.ps
%{_datadir}/%{name}/crd/*.crd
%{_datadir}/%{name}/crd/*.ps
%{_mandir}/man1/*.1*

%files firmware
%defattr(644,root,root,755)
%{_datadir}/%{name}/firmware/*.dl

%files udev-rules
%defattr(644,root,root,755)
/etc/udev/rules.d/11-hplj10xx.rules

%define date    %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <[EMAIL PROTECTED]>
All persons listed below can be reached at <cvs_login>@pld-linux.org

$Log: $
--- hplj1000.orig	2007-03-06 23:00:06.000000000 +0000
+++ hplj1000	2007-03-06 22:14:44.000000000 +0000
@@ -40,7 +40,7 @@
 #
 # Program used to determine USB id information
 #
-USBID=/bin/usb_printerid
+USBID=/usr/bin/usb_printerid
 
 #
 #	Figure out how to log our messages
@@ -65,7 +65,7 @@
 #
 #	Figure out the model number from the name of this script
 #
-case "$0" in
+case "$1" in
 *1000)
     MODEL=1000
     USB1=0x03f0	#Vendor
@@ -91,42 +91,6 @@
     exit
     ;;
 esac
-
-#
-#	The special command line argument "install-usermap" will install
-#	the proper entry into the /etc/hotplug/usb.usermap file
-#
-case "$1" in
-install-usermap)
-    if [ "$USB2" != "" ]; then
-	if [ -w /etc/hotplug/usb.usermap ]; then
-		USERMAP=/etc/hotplug/usb.usermap
-	elif [ -d /etc/hotplug/usb/ ]; then
-		USERMAP=/etc/hotplug/usb/foo2zjs.usermap
-		if [ ! -s $USERMAP ]; then
-			echo > $USERMAP
-		fi
-	else
-		log "No /etc/hotplug usermap!"
-		exit
-	fi
-	chmod 664 $USERMAP
-	ex - $USERMAP <<-EOF
-	g/^hplj$MODEL/d
-	\$a
-	hplj$MODEL 0x0003 $USB1 $USB2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
-	.
-	w
-	q
-	EOF
-    else
-	log "I don't know the USB info for this model yet.  Please run"
-	log "usb_printerid on the usb device and send the output to:"
-	log "[EMAIL PROTECTED]"
-    fi
-    exit 0
-    ;;
-esac
  
 #
 #	Procedure to load a single device with firmware
--- Makefile.orig	2007-02-20 13:12:48.000000000 +0000
+++ Makefile	2007-03-06 22:01:00.000000000 +0000
@@ -398,7 +398,7 @@
 	#
 	install -c $(PROGS) $(SHELLS) $(BIN)/
 	if [ "$(BINPROGS)" != "" ]; then \
-	    install -c $(BINPROGS) /bin/; \
+	    install -c $(BINPROGS) $(BIN)/ ; \
 	fi
 	#
 	# Install gamma correction files.  These are just templates,
--- hplj10xx.rules.orig	2007-01-25 15:49:10.000000000 +0000
+++ hplj10xx.rules	2007-03-06 22:31:55.000000000 +0000
@@ -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{product}=="hp LaserJet 1000", NAME="usb/%k", SYMLINK+="hplj1000%e", MODE="0666", RUN+="/usr/bin/hplj10xx 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" 
+KERNEL=="lp*", BUS=="usb", SYSFS{idVendor}=="03f0", SYSFS{product}=="hp LaserJet 1005 series", NAME="usb/%k", SYMLINK+="hplj1005%e", MODE="0666", RUN+="/usr/bin/hplj10xx 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" 
+KERNEL=="lp*", BUS=="usb", SYSFS{idVendor}=="03f0", SYSFS{product}=="HP LaserJet 1018", NAME="usb/%k", SYMLINK+="hplj1018%e", MODE="0666", RUN+="/usr/bin/hplj10xx 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" 
+KERNEL=="lp*", BUS=="usb", SYSFS{idVendor}=="03f0", SYSFS{product}=="HP LaserJet 1020", NAME="usb/%k", SYMLINK+="hplj1020%e", MODE="0666", RUN+="/usr/bin/hplj10xx  hplj1020" 
_______________________________________________
pld-devel-pl mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl

Odpowiedź listem elektroniczym