diff -Naur foo2zjs-orig/Makefile foo2zjs/Makefile --- foo2zjs-orig/Makefile 2006-05-23 19:30:02 +0400 +++ foo2zjs/Makefile 2006-05-24 17:27:06 +0400 @@ -1,13 +1,16 @@ UNAME := $(shell uname) -MACH := $(shell uname -m | sed 's/i.86/x86_32/') +MACH := $(shell uname -m | sed 's/i.86/x86_32/' | sed 's/athlon/x86_32/') EUID := $(shell id -u) # No version number yet... VERSION=0.0 +# (fake) Installation root... +DESTDIR= + # Installation prefix... PREFIX=/usr/local -PREFIX=/usr +PREFIX=$(DESTDIR)/usr # Pathnames for this package... BIN=$(PREFIX)/bin @@ -18,7 +21,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 @@ -321,7 +324,7 @@ # 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, @@ -364,11 +367,13 @@ # # 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; \ - foomatic-combo-xml -O >overview.xml; \ + if [ -d /var/cache/foomatic/ ]; then \ + rm -rf /var/cache/foomatic/*/*; \ + rm -f /var/cache/foomatic/printconf.pickle; \ + if [ -d /var/cache/foomatic/compiled ]; then \ + cd /var/cache/foomatic/compiled; \ + foomatic-combo-xml -O >overview.xml; \ + fi; \ fi install-icc2ps: @@ -431,7 +436,7 @@ fi; \ done -MODEL=/usr/share/cups/model +MODEL=$(DESTDIR)/usr/share/cups/model LOCALMODEL=/usr/local/share/cups/model install-ppd: # @@ -449,15 +454,15 @@ done; \ fi -USBDIR=/etc/hotplug/usb -UDEVDIR=/etc/udev/rules.d +USBDIR=$(DESTDIR)/etc/hotplug/usb +UDEVDIR=$(DESTDIR)/etc/udev/rules.d RULES=hplj10xx.rules install-hotplug: [ -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 hplj1000 $(USBDIR)/hplj1005 + ln -sf hplj1000 $(USBDIR)/hplj1018 + ln -sf hplj1000 $(USBDIR)/hplj1020 $(USBDIR)/hplj1000 install-usermap $(USBDIR)/hplj1005 install-usermap $(USBDIR)/hplj1018 install-usermap