$OpenBSD: patch-Makefile,v 1.3 2009/08/03 13:10:09 giovanni Exp $ --- Makefile.orig Sun Jun 14 13:52:03 2009 +++ Makefile Sun Jul 19 13:16:11 2009 @@ -15,11 +15,6 @@ SYSNAME := $(shell uname -n) # No version number yet... VERSION=0.0 -# Installation prefix... -PREFIX=/usr/local -PREFIX=/usr -PREFIX=$(DESTDIR)/usr - # Pathnames for this package... BIN=$(PREFIX)/bin SHAREZJS=$(PREFIX)/share/foo2zjs @@ -30,12 +25,12 @@ SHARELAVA=$(PREFIX)/share/foo2lava SHAREQPDL=$(PREFIX)/share/foo2qpdl SHARESLX=$(PREFIX)/share/foo2slx SHAREHC=$(PREFIX)/share/foo2hiperc -MANDIR=$(PREFIX)/share/man +MANDIR=$(PREFIX)/man DOCDIR=$(PREFIX)/share/doc/foo2zjs/ INSTALL=install # Pathnames for referenced packages... -FOODB=$(DESTDIR)/usr/share/foomatic/db/source +FOODB=${PREFIX}/share/foomatic/db/source # User ID's LPuid=-oroot @@ -255,7 +250,6 @@ ifeq ($(UNAME),Linux) endif # Compiler flags -CFLAGS += -O2 -Wall #CFLAGS += -g # @@ -505,9 +499,8 @@ gipddecode: gipddecode.o $(LIBJBG) # # Installation rules # -install: all install-test install-prog install-icc2ps install-extra \ +install: all install-prog install-icc2ps install-extra \ install-crd install-foo install-ppd \ - install-gui install-desktop \ install-man install-doc # # If you use CUPS, then restart the spooler: @@ -564,11 +557,6 @@ install-prog: $(INSTALL) -d $(SHAREZJS)/ $(INSTALL) -c -m 644 gamma.ps $(SHAREZJS)/ $(INSTALL) -c -m 644 gamma-lookup.ps $(SHAREZJS)/ - $(INSTALL) -d $(SHAREOAK)/ - $(INSTALL) -d $(SHAREHP)/ - $(INSTALL) -d $(SHAREXQX)/ - $(INSTALL) -d $(SHARELAVA)/ - $(INSTALL) -d $(SHAREHC)/ install-foo: # @@ -723,49 +711,21 @@ install-extra: done MODEL=$(DESTDIR)/usr/share/cups/model -LOCALMODEL=$(DESTDIR)/usr/local/share/cups/model +LOCALMODEL=${PREFIX}/share/foomatic/db/source/PPD PPD=$(DESTDIR)/usr/share/ppd VARPPD=/var/lp/ppd install-ppd: # # Install PPD files for CUPS # - if [ -x /usr/sbin/ppdmgr -a -s $(VARPPD)/ppdcache ]; then \ - $(INSTALL) $(LPgid) -d $(VARPPD)/user; \ - cd PPD; \ - for ppd in *.ppd; do \ - manuf=`echo "$$ppd" | sed 's/-.*//'`; \ - $(INSTALL) $(LPgid) -d $(VARPPD)/user/$$manuf; \ - gzip < $$ppd > $(VARPPD)/user/$$manuf/$$ppd.gz; \ - 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 \ - gzip < $$ppd > $(PPD)/foo2zjs/$$ppd.gz; \ - done; \ - fi - if [ -d $(MODEL) ]; then \ - rm -f $(MODEL)/KonicaMinolta*; \ - cd PPD; \ - for ppd in *.ppd; do \ - gzip < $$ppd > $(MODEL)/$$ppd.gz; \ - done; \ - elif [ -d $(LOCALMODEL) ]; then \ + mkdir -p $(LOCALMODEL) + if [ -d $(LOCALMODEL) ]; then \ rm -f $(LOCALMODEL)/KonicaMinolta*; \ cd PPD; \ for ppd in *.ppd; do \ - gzip < $$ppd > $(LOCALMODEL)/$$ppd.gz; \ - done; \ - fi + gzip < $$ppd > $(LOCALMODEL)/$$ppd.gz; \ + done; \ + fi APPL=$(DESTDIR)/usr/share/applications OLDAPPL=$(DESTDIR)/usr/share/gnome/apps/System @@ -1225,11 +1185,8 @@ install-doc: doc # $(INSTALL) -d -m 755 $(DOCDIR) $(INSTALL) -c -m 644 manual.pdf $(DOCDIR) - $(INSTALL) -c -m 644 COPYING $(DOCDIR) $(INSTALL) -c -m 644 INSTALL $(DOCDIR) - $(INSTALL) -c -m 644 INSTALL.osx $(DOCDIR) $(INSTALL) -c -m 644 README $(DOCDIR) - $(INSTALL) -c -m 644 ChangeLog $(DOCDIR) GROFF=/usr/local/test/bin/groff GROFF=groff