Commit 8bddde12 authored by AlmAck's avatar AlmAck

foo2zjs obsolete, removed

parent 25e108aa
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Description:
Hotplug script for HP1000/1005/1020 USB laser printers. The model number
that this script deals with is determined from the udev env.
Author: AlmAck <gluca86@gmail.com>
Last-Update: 2013-03-03
--- a/Makefile
+++ b/Makefile
@@ -166,6 +166,7 @@ FILES = \
gipddecode.1in \
hbpldecode.c \
hbpldecode.1in \
+ foo2zjs-loadfw.in \
foo2zjs-wrapper.in \
foo2zjs-wrapper.1in \
foo2hp2600-wrapper.in \
@@ -267,7 +266,7 @@ endif
SHELLS= foo2zjs-wrapper foo2oak-wrapper foo2hp2600-wrapper \
foo2xqx-wrapper foo2lava-wrapper foo2qpdl-wrapper \
foo2slx-wrapper foo2hiperc-wrapper foo2hbpl2-wrapper
-SHELLS+= foo2zjs-pstops
+SHELLS+= foo2zjs-loadfw foo2zjs-pstops
SHELLS+= printer-profile
MANPAGES= foo2zjs-wrapper.1 foo2zjs.1 zjsdecode.1
MANPAGES+= foo2oak-wrapper.1 foo2oak.1 oakdecode.1
@@ -476,6 +467,11 @@ foo2slx: foo2slx.o $(LIBJBG)
foo2hbpl2: foo2hbpl2.o $(LIBJBG)
$(CC) $(CFLAGS) -o $@ foo2hbpl2.o $(LIBJBG)
+foo2zjs-loadfw: foo2zjs-loadfw.in Makefile
+ [ ! -f $@ ] || chmod +w $@
+ sed < $@.in > $@ \
+ -e 's:@ZJSFWDIR@:$(SHAREZJS)/firmware:' -e 's:@XQXFWDIR@:$(SHAREXQX)/firmware/:' || (rm -f $@ && exit 1)
+ chmod 555 $@
foo2zjs-wrapper: foo2zjs-wrapper.in Makefile
[ ! -f $@ ] || chmod +w $@
@@ -953,70 +964,22@@ # ... OK!
#
install-hotplug-prog:
- #
- # remove HPLIP (proprietary) files and install our version
- #
- if [ -d $(UDEVDIR) ]; then \
- rm -f $(UDEVDIR)/*hpmud*laserjet_1000*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_1005*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_1018*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_1020*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_p1005*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_p1006*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_p1007*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_p1008*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_p1505*; \
- rm -f $(UDEVDIR)/*hpmud_support.rules; \
- rm -f $(UDEVDIR)/*hpmud_plugin.rules; \
- rm -f $(LIBUDEVDIR)/*hpmud_support.rules; \
- rm -f $(LIBUDEVDIR)/*hpmud_plugin.rules; \
- rm -f $(LIBUDEVDIR)/*-hplj10xx.rules; \
- if [ -x /sbin/udevd ]; then \
- version=`/sbin/udevd --version 2>/dev/null`; \
- elif [ -x /usr/lib/udev/udevd ]; then \
- version=`/usr/lib/udev/udevd --version 2>/dev/null`; \
- elif [ -x /usr/lib/systemd/systemd-udevd ]; then \
- version=`/usr/lib/systemd/systemd-udevd --version 2>/dev/null`; \
- fi; \
- if [ "$$version" = "" ]; then version=0; fi; \
- echo "*** udev version $$version"; \
- if [ "$$version" -lt 148 ]; then \
- $(INSTALL) -c -m 644 $(RULES).old $(UDEVDIR)/11-$(RULES); \
- else \
- $(INSTALL) -c -m 644 $(RULES) $(UDEVDIR)/11-$(RULES); \
- fi \
- fi
+ install -d -m 755 $(DESTDIR)$(UDEVDIR)
+ $(INSTALL) -c -m 644 $(RULES) $(DESTDIR)$(UDEVDIR)/11-$(RULES); \
if [ -d $(DEVDDIR) ]; then \
$(INSTALL) -c -m 644 hplj10xx.conf $(DEVDDIR)/; \
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
- ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hpljP1005
- ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hpljP1006
- ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hpljP1007
- ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hpljP1008
- ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hpljP1505
- $(USBDIR)/hplj1000 install-usermap
- $(USBDIR)/hplj1005 install-usermap
- $(USBDIR)/hplj1018 install-usermap
- $(USBDIR)/hplj1020 install-usermap
- $(USBDIR)/hpljP1005 install-usermap
- $(USBDIR)/hpljP1006 install-usermap
- $(USBDIR)/hpljP1007 install-usermap
- $(USBDIR)/hpljP1008 install-usermap
- $(USBDIR)/hpljP1505 install-usermap
- # modprobe usblp
- $(USBDIR)/hplj1000 install-usblp
+ $(INSTALL) -d -m 755 $(DESTDIR)/sbin
+ $(INSTALL) -c -m 755 foo2zjs-loadfw $(DESTDIR)/sbin
install-hotplug-osx:
cd osx-hotplug; $(MAKE) PREFIX=$(PREFIX) install-hotplug
install-filter:
if [ "$(CUPS_SERVERBIN)" != "" ]; then \
+ install -d -m 755 $(CUPS_SERVERBIN)/filter; \
- ln -sf $(BIN)/command2foo2lava-pjl $(CUPS_SERVERBIN)/filter/; \
+ ln -sf ../../../bin/command2foo2lava-pjl $(CUPS_SERVERBIN)/filter/; \
fi
CUPSDCONF=/etc/cups/cupsd.conf
--- /dev/null
+++ b/foo2zjs-loadfw.in
@@ -0,0 +1,162 @@
+#!/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
+#
+ZJSFW=@ZJSFWDIR@
+XQXFW=@XQXFWDIR@
+
+#
+# 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
+P1005)
+ MODEL=P1005; FWMODEL=$MODEL
+ MODELNAME="HP LaserJet $MODEL"
+ FWDIR=$XQXFW
+ ;;
+P1006)
+ MODEL=P1006; FWMODEL=$MODEL
+ MODELNAME="HP LaserJet $MODEL"
+ FWDIR=$XQXFW
+ ;;
+P1007)
+ MODEL=P1007; FWMODEL=P1005 # Alias
+ MODELNAME="HP LaserJet $MODEL"
+ FWDIR=$XQXFW
+ ;;
+P1008)
+ MODEL=P1008; FWMODEL=P1006 # Alias
+ MODELNAME="HP LaserJet $MODEL"
+ FWDIR=$XQXFW
+ ;;
+P1505)
+ MODEL=P1505; FWMODEL=$MODEL
+ MODELNAME="HP LaserJet $MODEL"
+ FWDIR=$XQXFW
+ ;;
+P1505n)
+ MODEL=P1505n; FWMODEL=$MODEL
+ MODELNAME="HP LaserJet $MODEL"
+ FWDIR=$XQXFW
+ ;;
+1000)
+ MODEL=1000; FWMODEL=$MODEL
+ MODELNAME="hp LaserJet $MODEL"
+ FWDIR=$ZJSFW
+ ;;
+1005)
+ MODEL=1005; FWMODEL=$MODEL
+ MODELNAME="hp LaserJet $MODEL"
+ FWDIR=$ZJSFW
+ ;;
+1018)
+ MODEL=1018; FWMODEL=$MODEL
+ MODELNAME="HP LaserJet $MODEL"
+ FWDIR=$ZJSFW
+ ;;
+1020)
+ MODEL=1020; FWMODEL=$MODEL
+ MODELNAME="HP LaserJet $MODEL"
+ FWDIR=$ZJSFW
+ ;;
+*)
+ 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$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
+ 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
This diff is collapsed.
Description: Fix "precission" spelling error.
Author: Didier Raboud <odyx@debian.org>
Last-Update: 2011-07-25
--- a/icc2ps/cmsio1.c
+++ b/icc2ps/cmsio1.c
@@ -1161,7 +1161,7 @@
AdjustEndianessArray16(NewLUT ->T, NewLUT->Tsize / sizeof(WORD));
}
else {
- cmsSignalError(LCMS_ERRC_ABORTED, "Unknow precission of '%d'", CLUT.prec);
+ cmsSignalError(LCMS_ERRC_ABORTED, "Unknow precision of '%d'", CLUT.prec);
return FALSE;
}
--- a/icc2ps/icc2ps.c
+++ b/icc2ps/icc2ps.c
@@ -139,8 +139,8 @@
fprintf(stderr, "%cb - Black point compensation (CRD only)\n", SW);
fprintf(stderr, "%cu - Do NOT generate resource name on CRD\n", SW);
- fprintf(stderr, "%cc<0,1,2> - Precission (0=LowRes, 1=Normal (default), 2=Hi-res) (CRD only)\n", SW);
- fprintf(stderr, "%cn<gridpoints> - Alternate way to set precission, number of CLUT points (CRD only)\n", SW);
+ fprintf(stderr, "%cc<0,1,2> - Precision (0=LowRes, 1=Normal (default), 2=Hi-res) (CRD only)\n", SW);
+ fprintf(stderr, "%cn<gridpoints> - Alternate way to set precision, number of CLUT points (CRD only)\n", SW);
fprintf(stderr, "\n");
fprintf(stderr, "This program is intended to be a demo of the little cms\n"
Maintainer: Nicola Bignami <nicola@kernel-panic.dnsdojo.net>
Contributor: Muhammed Uluyol <uluyol0@gmail.com>
Subject: [PATCH] Destdir support
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,6 @@ VERSION=0.0
# Installation prefix...
PREFIX=/usr/local
-PREFIX=/usr
PREFIX=$(DESTDIR)/usr
# Pathnames for this package...
@@ -38,7 +37,7 @@ INSTALL=install
ROOT=root
# Pathnames for referenced packages...
-FOODB=$(DESTDIR)/usr/share/foomatic/db/source
+FOODB=$(PREFIX)/share/foomatic/db/source
# User ID's
LPuid=-oroot
@@ -249,7 +250,7 @@ # CUPS vars
CUPS_SERVERBIN := $(DESTDIR)$(shell cups-config --serverbin 2>/dev/null)
-CUPS_DEVEL := $(shell grep cupsSideChannelDoRequest /usr/include/cups/sidechannel.h 2>/dev/null)
+CUPS_DEVEL := $(DESTDIR)$(shell grep cupsSideChannelDoRequest /usr/include/cups/sidechannel.h 2>/dev/null)
-CUPS_GOODAPI := $(shell cups-config --api-version 2>/dev/null | sed "s/1\.[0123].*//")
+CUPS_GOODAPI := $(DESTDIR)$(shell cups-config --api-version | sed "s/1\.[0123].*//" 2>/dev/null)
# hpclj2600n-0.icm km2430_0.icm km2430_1.icm km2430_2.icm samclp300-0.icm
# sihp1000.img sihp1005.img sihp1020.img sihp1018.img
# sihpP1005.img sihpP1006.img sihpP1505.img
@@ -654,6 +657,8 @@ install-test:
UDEVBIN=$(DESTDIR)/bin/
install-prog:
+ [ -d $(BIN) ] || $(INSTALL) -d -m 755 $(BIN)/
+ [ -d $(DESTDIR)/usr/bin/ ] || $(INSTALL) -d -m 755 $(DESTDIR)/usr/bin/
#
# Install driver, wrapper, and development tools
#
@@ -661,7 +658,7 @@ install-prog:
$(INSTALL) -c $(PROGS) $(SHELLS) $(BIN)/
if [ "$(BINPROGS)" != "" ]; then \
$(INSTALL) -d $(UDEVBIN); \
- $(INSTALL) -c $(BINPROGS) $(UDEVBIN); \
+ $(INSTALL) -c $(BINPROGS) $(DESTDIR)/usr/bin/; \
fi
#
# Install gamma correction files. These are just templates,
@@ -715,10 +722,10 @@ install-foo:
#
# 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
@@ -847,10 +854,10 @@ install-extra:
fi; \
done
-MODEL=$(DESTDIR)/usr/share/cups/model
+MODEL=$(PREFIX)/share/cups/model
-LOCALMODEL=$(DESTDIR)/usr/local/share/cups/model
+LOCALMODEL=$(PREFIX)/usr/local/share/cups/model
MACMODEL=/Library/Printers/PPDs/Contents/Resources
-PPD=$(DESTDIR)/usr/share/ppd
+PPD=$(PREFIX)/share/ppd
VARPPD=/var/lp/ppd
install-ppd:
#
@@ -908,9 +908,9 @@ install-ppd:
done; \
fi
-APPL=$(DESTDIR)/usr/share/applications
-OLDAPPL=$(DESTDIR)/usr/share/gnome/apps/System
-PIXMAPS=$(DESTDIR)/usr/share/pixmaps
+APPL=$(PREFIX)/share/applications
+OLDAPPL=$(PREFIX)/share/gnome/apps/System
+PIXMAPS=$(PREFIX)/share/pixmaps
install-desktop:
#
@@ -934,7 +934,7 @@ install-gui:
$(INSTALL) -c -m 755 hplj10xx_gui.tcl $(SHAREZJS)
-USBDIR=/etc/hotplug/usb
+USBDIR=$(DESTDIR)/etc/hotplug/usb
UDEVDIR=/etc/udev/rules.d
LIBUDEVDIR=/lib/udev/rules.d
RULES=hplj10xx.rules
# Maintainer: AlmAck <almack@chakra-project.org>
# Arch Contributor: Nicola Bignami <nicola@kernel-panic.dnsdojo.net>
pkgname=foo2zjs
pkgver=20160313
pkgrel=1
pkgdesc="ZJStream Printer Drivers. Includes also foo2hp, foo2oak, foo2xqx, foo2qpdl, foo2slx, foo2hiperc and foo2lava drivers."
url="http://foo2zjs.rkkda.com/"
license=('GPL' 'custom')
depends=('psutils' 'cups' 'foomatic-db-engine' 'foomatic-db-foo2zjs>=4.0.17_20130331-1')
makedepends=('unzip' 'bc')
optdepends=('tix: required by hplj10xx_gui.tcl')
arch=('x86_64')
options=('!emptydirs')
changelog="$pkgname.changelog"
install='foo2zjs.install'
source=("$pkgname-$pkgver-$pkgrel.tar.gz"::"http://foo2zjs.rkkda.com/foo2zjs.tar.gz"
'destdir-support-20140329-1.patch'
'gen-fixes-20140329-1.patch'
'firmware-loader-20130602-1.patch'
'udev-firmware-loading-ruleset-20130601-1.patch')
md5sums=('395cf0a1bcd7d4b717c42fcb57f30399'
'26ed4b81ba769a620a249b7395dc7057'
'c080b84ca44714eff986e3cf4f8d4bae'
'edfa38b48ae6429b957190d2c05a971b'
'ab84c888e05378c4618e764fe946d17a')
build() {
cd "${srcdir}/${pkgname}"
patch -p1 -i ${srcdir}/${source[1]}
patch -p1 -i ${srcdir}/${source[2]}
patch -p1 -i ${srcdir}/${source[3]}
patch -p1 -i ${srcdir}/${source[4]}
make
}
package() {
cd "${srcdir}/${pkgname}"
for model in $(grep 'getone ' getweb.in | \
cut -d'#' -f1 | awk '{ print $2; }'); do
if [[ $model != '$i' ]]; then
./getweb $model || true
fi
done
install -d ${pkgdir}/usr/share/{applications,pixmaps,cups/model}
install -d ${pkgdir}/usr/share/foomatic/db/source/{driver,opt,printer}
make DESTDIR="${pkgdir}" install install-hotplug-prog
install -m755 getweb ${pkgdir}/usr/bin
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Maintainer: Nicola Bignami <nicola@kernel-panic.dnsdojo.net>
Contributor: Muhammed Uluyol <uluyol0@gmail.com>
Subject: [PATCH] Destdir support
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,6 @@ VERSION=0.0
# Installation prefix...
PREFIX=/usr/local
-PREFIX=/usr
PREFIX=$(DESTDIR)/usr
# Pathnames for this package...
@@ -38,7 +37,7 @@ INSTALL=install
ROOT=root
# Pathnames for referenced packages...
-FOODB=$(DESTDIR)/usr/share/foomatic/db/source
+FOODB=$(PREFIX)/share/foomatic/db/source
# User ID's
LPuid=-oroot
@@ -249,7 +250,7 @@ # CUPS vars
CUPS_SERVERBIN := $(DESTDIR)$(shell cups-config --serverbin 2>/dev/null)
-CUPS_DEVEL := $(shell grep cupsSideChannelDoRequest /usr/include/cups/sidechannel.h 2>/dev/null)
+CUPS_DEVEL := $(DESTDIR)$(shell grep cupsSideChannelDoRequest /usr/include/cups/sidechannel.h 2>/dev/null)
-CUPS_GOODAPI := $(shell cups-config --api-version 2>/dev/null | sed "s/1\.[0123].*//")
+CUPS_GOODAPI := $(DESTDIR)$(shell cups-config --api-version | sed "s/1\.[0123].*//" 2>/dev/null)
# hpclj2600n-0.icm km2430_0.icm km2430_1.icm km2430_2.icm samclp300-0.icm
# sihp1000.img sihp1005.img sihp1020.img sihp1018.img
# sihpP1005.img sihpP1006.img sihpP1505.img
@@ -654,6 +657,8 @@ install-test:
UDEVBIN=$(DESTDIR)/bin/
install-prog:
+ [ -d $(BIN) ] || $(INSTALL) -d -m 755 $(BIN)/
+ [ -d $(DESTDIR)/usr/bin/ ] || $(INSTALL) -d -m 755 $(DESTDIR)/usr/bin/
#
# Install driver, wrapper, and development tools
#
@@ -661,7 +658,7 @@ install-prog:
$(INSTALL) -c $(PROGS) $(SHELLS) $(BIN)/
if [ "$(BINPROGS)" != "" ]; then \
$(INSTALL) -d $(UDEVBIN); \
- $(INSTALL) -c $(BINPROGS) $(UDEVBIN); \
+ $(INSTALL) -c $(BINPROGS) $(DESTDIR)/usr/bin/; \
fi
#
# Install gamma correction files. These are just templates,
@@ -715,10 +722,10 @@ install-foo:
#
# 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
@@ -847,10 +854,10 @@ install-extra:
fi; \
done
-MODEL=$(DESTDIR)/usr/share/cups/model
+MODEL=$(PREFIX)/share/cups/model
-LOCALMODEL=$(DESTDIR)/usr/local/share/cups/model
+LOCALMODEL=$(PREFIX)/usr/local/share/cups/model
MACMODEL=/Library/Printers/PPDs/Contents/Resources
-PPD=$(DESTDIR)/usr/share/ppd
+PPD=$(PREFIX)/share/ppd
VARPPD=/var/lp/ppd
install-ppd:
#
@@ -908,9 +908,9 @@ install-ppd:
done; \
fi
-APPL=$(DESTDIR)/usr/share/applications
-OLDAPPL=$(DESTDIR)/usr/share/gnome/apps/System
-PIXMAPS=$(DESTDIR)/usr/share/pixmaps
+APPL=$(PREFIX)/share/applications
+OLDAPPL=$(PREFIX)/share/gnome/apps/System
+PIXMAPS=$(PREFIX)/share/pixmaps
install-desktop:
#
@@ -934,7 +934,7 @@ install-gui:
$(INSTALL) -c -m 755 hplj10xx_gui.tcl $(SHAREZJS)
-USBDIR=/etc/hotplug/usb
+USBDIR=$(DESTDIR)/etc/hotplug/usb
UDEVDIR=/etc/udev/rules.d
LIBUDEVDIR=/lib/udev/rules.d
RULES=hplj10xx.rules
Maintainer: Nicola Bignami <nicola@kernel-panic.dnsdojo.net>
Contributor: Muhammed Uluyol <uluyol0@gmail.com>
Subject: [PATCH] Firmware loader patch
--- a/Makefile
+++ b/Makefile
@@ -166,6 +166,7 @@ FILES = \
gipddecode.1in \
hbpldecode.c \
hbpldecode.1in \
+ foo2zjs-loadfw.in \
foo2zjs-wrapper.in \
foo2zjs-wrapper.1in \
foo2hp2600-wrapper.in \
@@ -267,7 +266,7 @@ endif
SHELLS= foo2zjs-wrapper foo2oak-wrapper foo2hp2600-wrapper \
foo2xqx-wrapper foo2lava-wrapper foo2qpdl-wrapper \
foo2slx-wrapper foo2hiperc-wrapper foo2hbpl2-wrapper
-SHELLS+= foo2zjs-pstops
+SHELLS+= foo2zjs-loadfw foo2zjs-pstops
SHELLS+= printer-profile
MANPAGES= foo2zjs-wrapper.1 foo2zjs.1 zjsdecode.1
MANPAGES+= foo2oak-wrapper.1 foo2oak.1 oakdecode.1
@@ -476,6 +467,11 @@ foo2slx: foo2slx.o $(LIBJBG)
foo2hbpl2: foo2hbpl2.o $(LIBJBG)
$(CC) $(CFLAGS) -o $@ foo2hbpl2.o $(LIBJBG)
+foo2zjs-loadfw: foo2zjs-loadfw.in Makefile
+ [ ! -f $@ ] || chmod +w $@
+ sed < $@.in > $@ \
+ -e 's:@ZJSFWDIR@:$(SHAREZJS)/firmware:' -e 's:@XQXFWDIR@:$(SHAREXQX)/firmware/:' || (rm -f $@ && exit 1)
+ chmod 555 $@
foo2zjs-wrapper: foo2zjs-wrapper.in Makefile
[ ! -f $@ ] || chmod +w $@
@@ -953,70 +964,22@@ # ... OK!
#
install-hotplug-prog:
- #
- # remove HPLIP (proprietary) files and install our version
- #
- if [ -d $(UDEVDIR) ]; then \
- rm -f $(UDEVDIR)/*hpmud*laserjet_1000*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_1005*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_1018*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_1020*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_p1005*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_p1006*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_p1007*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_p1008*; \
- rm -f $(UDEVDIR)/*hpmud*laserjet_p1505*; \
- rm -f $(UDEVDIR)/*hpmud_support.rules; \
- rm -f $(UDEVDIR)/*hpmud_plugin.rules; \
- rm -f $(LIBUDEVDIR)/*hpmud_support.rules; \
- rm -f $(LIBUDEVDIR)/*hpmud_plugin.rules; \
- rm -f $(LIBUDEVDIR)/*-hplj10xx.rules; \
- if [ -x /sbin/udevd ]; then \
- version=`/sbin/udevd --version 2>/dev/null`; \
- elif [ -x /usr/lib/udev/udevd ]; then \
- version=`/usr/lib/udev/udevd --version 2>/dev/null`; \
- elif [ -x /usr/lib/systemd/systemd-udevd ]; then \
- version=`/usr/lib/systemd/systemd-udevd --version 2>/dev/null`; \
- fi; \
- if [ "$$version" = "" ]; then version=0; fi; \
- echo "*** udev version $$version"; \
- if [ "$$version" -lt 148 ]; then \
- $(INSTALL) -c -m 644 $(RULES).old $(UDEVDIR)/11-$(RULES); \
- else \
- $(INSTALL) -c -m 644 $(RULES) $(UDEVDIR)/11-$(RULES); \
- fi \
- fi
+ install -d -m 755 $(DESTDIR)$(UDEVDIR)
+ $(INSTALL) -c -m 644 $(RULES) $(DESTDIR)$(UDEVDIR)/11-$(RULES); \
if [ -d $(DEVDDIR) ]; then \