updated on Thu Jan 5 13:17:10 UTC 2012
[aur-mirror.git] / foo2hp / Makefile.patch
blob7feafe7f32bc93f3e47e4279b157016659e86a22
1 --- Makefile.orig 2009-10-21 16:41:50.000000000 -0200
2 +++ Makefile 2009-11-10 17:15:16.615745732 -0200
3 @@ -55,7 +55,7 @@
4 ifeq ($(UNAME),SunOS)
5 LPuid=-oroot
6 LPgid=-glp
7 - INSTALL=/usr/ucb/install
8 + INSTALL=$(DESTDIR)/usr/ucb/install
9 endif
10 # If we aren't root, don't try to set ownership
11 ifneq ($(EUID),0)
12 @@ -586,7 +586,7 @@
14 # Install current database files
16 - @if [ -d $(FOODB) ]; then \
17 + @if [ -d /usr/share/foomatic/db/source ]; then \
18 for dir in driver printer opt; do \
19 echo install -m 644 foomatic-db/$$dir/*.xml $(FOODB)/$$dir/; \
20 $(INSTALL) -c -m 644 foomatic-db/$$dir/*.xml $(FOODB)/$$dir/; \
21 @@ -725,12 +725,12 @@
22 MODEL=$(DESTDIR)/usr/share/cups/model
23 LOCALMODEL=$(DESTDIR)/usr/local/share/cups/model
24 PPD=$(DESTDIR)/usr/share/ppd
25 -VARPPD=/var/lp/ppd
26 +VARPPD=$(DESTDIR)/var/lp/ppd
27 install-ppd:
29 # Install PPD files for CUPS
31 - if [ -x /usr/sbin/ppdmgr -a -s $(VARPPD)/ppdcache ]; then \
32 + if [ -x /usr/sbin/ppdmgr -a -s /var/lp/ppd/ppdcache ]; then \
33 $(INSTALL) $(LPgid) -d $(VARPPD)/user; \
34 cd PPD; \
35 for ppd in *.ppd; do \
36 @@ -739,7 +739,7 @@
37 gzip < $$ppd > $(VARPPD)/user/$$manuf/$$ppd.gz; \
38 done; \
39 ppdmgr -u; \
40 - elif [ -d $(PPD) ]; then \
41 + elif [ -d /usr/share/ppd ]; then \
42 find $(PPD) -name '*foo2zjs*' | xargs rm -rf; \
43 find $(PPD) -name '*foo2hp*' | xargs rm -rf; \
44 find $(PPD) -name '*foo2xqx*' | xargs rm -rf; \
45 @@ -753,13 +753,13 @@
46 gzip < $$ppd > $(PPD)/foo2zjs/$$ppd.gz; \
47 done; \
49 - if [ -d $(MODEL) ]; then \
50 + if [ -d /usr/share/cups/model ]; then \
51 rm -f $(MODEL)/KonicaMinolta*; \
52 cd PPD; \
53 for ppd in *.ppd; do \
54 gzip < $$ppd > $(MODEL)/$$ppd.gz; \
55 done; \
56 - elif [ -d $(LOCALMODEL) ]; then \
57 + elif [ -d /usr/local/share/cups/model ]; then \
58 rm -f $(LOCALMODEL)/KonicaMinolta*; \
59 cd PPD; \
60 for ppd in *.ppd; do \
61 @@ -775,13 +775,13 @@
63 # Install GNOME desktop
65 - if [ -d $(APPL) ]; then \
66 + if [ -d /usr/share/applications ]; then \
67 $(INSTALL) -c -m 644 hplj1020.desktop $(APPL); \
69 - if [ -d $(OLDAPPL) ]; then \
70 + if [ -d /usr/share/gnome/apps/System ]; then \
71 $(INSTALL) -c -m 644 hplj1020.desktop $(OLDAPPL); \
73 - if [ -d $(PIXMAPS) ]; then \
74 + if [ -d /usr/share/pixmaps ]; then \
75 $(INSTALL) -c -m 644 hplj1020_icon.png $(PIXMAPS); \
78 @@ -793,8 +793,8 @@
79 $(INSTALL) -c -m 755 hplj10xx_gui.tcl $(SHAREZJS)
82 -USBDIR=/etc/hotplug/usb
83 -UDEVDIR=/etc/udev/rules.d
84 +USBDIR=$(DESTDIR)/etc/hotplug/usb
85 +UDEVDIR=$(DESTDIR)/etc/udev/rules.d
86 RULES=hplj10xx.rules
87 install-hotplug: install-hotplug-test install-hotplug-prog
89 @@ -814,10 +814,10 @@
92 install-hotplug-prog:
93 - if [ -d $(UDEVDIR) ]; then \
94 + if [ -d /etc/udev/rules.d ]; then \
95 $(INSTALL) -c -m 644 $(RULES) $(UDEVDIR)/11-$(RULES); \
97 - [ -d $(USBDIR) ] || $(INSTALL) -d -m 755 $(USBDIR)/
98 + [ -d /etc/hotplug/usb ] || $(INSTALL) -d -m 755 $(USBDIR)/
99 $(INSTALL) -c -m 755 hplj1000 $(USBDIR)/
100 ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hplj1005
101 ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hplj1018
102 @@ -1100,9 +1100,9 @@
103 # Make phony print devices for testing full spooler interface without printing
105 tmpdev:
106 - DEV=/tmp/OAK; > $$DEV; chmod 666 $$DEV
107 - DEV=/tmp/OAKCM; > $$DEV; chmod 666 $$DEV
108 - DEV=/tmp/testfile; > $$DEV; chmod 666 $$DEV
109 + DEV=$(DESTDIR)/tmp/OAK; > $$DEV; chmod 666 $$DEV
110 + DEV=$(DESTDIR)/tmp/OAKCM; > $$DEV; chmod 666 $$DEV
111 + DEV=$(DESTDIR)/tmp/testfile; > $$DEV; chmod 666 $$DEV
114 # Test files for debugging
115 @@ -1234,7 +1234,7 @@
116 $(INSTALL) -c -m 644 README $(DOCDIR)
117 $(INSTALL) -c -m 644 ChangeLog $(DOCDIR)
119 -GROFF=/usr/local/test/bin/groff
120 +GROFF=$(DESTDIR)/usr/local/test/bin/groff
121 GROFF=groff
122 manual.pdf: $(MANPAGES)
123 -$(GROFF) -t -man $(MANPAGES) | ps2pdf - $@