diff -Nur foo2zjs.orig/Makefile foo2zjs/Makefile --- foo2zjs.orig/Makefile 2008-02-16 05:58:26.000000000 -0900 +++ foo2zjs/Makefile 2008-02-25 20:50:15.000000000 -0900 @@ -17,7 +17,7 @@ # Installation prefix... PREFIX=/usr/local -PREFIX=/usr +PREFIX=$(DESTDIR)/usr # Pathnames for this package... BIN=$(PREFIX)/bin @@ -34,7 +34,7 @@ INSTALL=install # Pathnames for referenced packages... -FOODB=/usr/share/foomatic/db/source +FOODB=$(PREFIX)/share/foomatic/db/source # User ID's LPuid=-olp @@ -245,7 +245,7 @@ endif # Compiler flags -CFLAGS += -O2 -Wall +CFLAGS ?= -O2 -Wall #CFLAGS += -g # @@ -537,12 +537,14 @@ UDEVBIN=/bin/ 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) $(UDEVBIN); \ + install -c $(BINPROGS) $(DESTDIR)/bin/; \ fi # # Install gamma correction files. These are just templates, @@ -575,6 +577,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 \ @@ -592,10 +595,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 @@ -709,9 +712,9 @@ fi; \ done -MODEL=/usr/share/cups/model +MODEL=$(PREFIX)/share/cups/model LOCALMODEL=/usr/local/share/cups/model -PPD=/usr/share/ppd +PPD=$(PREFIX)/share/ppd VARPPD=/var/lp/ppd install-ppd: # @@ -727,13 +730,6 @@ done; \ ppdmgr -u; \ elif [ -d $(PPD) ]; then \ - find $(PPD) -name '*foo2zjs*' | xargs rm -rf; \ - find $(PPD) -name '*foo2hp*' | xargs rm -rf; \ - find $(PPD) -name '*foo2xqx*' | xargs rm -rf; \ - find $(PPD) -name '*foo2lava*' | xargs rm -rf; \ - find $(PPD) -name '*foo2qpdl*' | xargs rm -rf; \ - find $(PPD) -name '*foo2slx*' | xargs rm -rf; \ - find $(PPD) -name '*foo2hiperc*' | xargs rm -rf; \ [ -d $(PPD)/foo2zjs ] || mkdir $(PPD)/foo2zjs; \ cd PPD; \ for ppd in *.ppd; do \ @@ -752,9 +748,9 @@ done; \ fi -APPL=/usr/share/applications -OLDAPPL=/usr/share/gnome/apps/System -PIXMAPS=/usr/share/pixmaps +APPL=$(PREFIX)/usr/share/applications +OLDAPPL=$(PREFIX)/usr/share/gnome/apps/System +PIXMAPS=$(PREFIX)/usr/share/pixmaps install-desktop: # # Install GNOME desktop @@ -777,10 +773,8 @@ $(INSTALL) -c -m 755 hplj10xx_gui.tcl $(SHAREZJS) -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: # @@ -798,9 +792,6 @@ # 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 @@ -809,13 +800,13 @@ ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hpljP1005 ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hpljP1006 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)/hpljP1505 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 \ @@ -1169,7 +1160,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 -Nur foo2zjs.orig/hplj.usermap foo2zjs/hplj.usermap --- foo2zjs.orig/hplj.usermap 1969-12-31 14:00:00.000000000 -1000 +++ foo2zjs/hplj.usermap 2008-02-25 20:49:33.000000000 -0900 @@ -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-11-27 12:13:53.000000000 -0900 +++ foo2zjs/icc2ps/Makefile 2008-02-25 20:49:33.000000000 -0900 @@ -1,11 +1,11 @@ UNAME := $(shell uname) -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 INSTALL=install ifeq ($(UNAME),SunOS) INSTALL=/usr/ucb/install