aboutsummaryrefslogtreecommitdiffstats
path: root/print/foo2zjs/files/patch-Makefile
blob: 0f4488be27d86f121f6c400f933934076aca029e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
--- Makefile.orig   2016-12-03 21:16:15 UTC
+++ Makefile
@@ -17,28 +17,26 @@ SYSNAME := $(shell uname -n)
 VERSION=0.0
 
 # Installation prefix...
-PREFIX=/usr/local
-PREFIX=/usr
-PREFIX=$(DESTDIR)/usr
+PREFIX?=/usr/local
 
 # Pathnames for this package...
-BIN=$(PREFIX)/bin
-SHAREZJS=$(PREFIX)/share/foo2zjs
-SHAREOAK=$(PREFIX)/share/foo2oak
-SHAREHP=$(PREFIX)/share/foo2hp
-SHAREXQX=$(PREFIX)/share/foo2xqx
-SHARELAVA=$(PREFIX)/share/foo2lava
-SHAREQPDL=$(PREFIX)/share/foo2qpdl
-SHARESLX=$(PREFIX)/share/foo2slx
-SHAREHC=$(PREFIX)/share/foo2hiperc
-SHAREHBPL=$(PREFIX)/share/foo2hbpl
-MANDIR=$(PREFIX)/share/man
-DOCDIR=$(PREFIX)/share/doc/foo2zjs/
-INSTALL=install
+BIN=$(DESTDIR)$(PREFIX)/bin
+SHAREZJS=$(DESTDIR)$(PREFIX)/share/foo2zjs
+SHAREOAK=$(DESTDIR)$(PREFIX)/share/foo2oak
+SHAREHP=$(DESTDIR)$(PREFIX)/share/foo2hp
+SHAREXQX=$(DESTDIR)$(PREFIX)/share/foo2xqx
+SHARELAVA=$(DESTDIR)$(PREFIX)/share/foo2lava
+SHAREQPDL=$(DESTDIR)$(PREFIX)/share/foo2qpdl
+SHARESLX=$(DESTDIR)$(PREFIX)/share/foo2slx
+SHAREHC=$(DESTDIR)$(PREFIX)/share/foo2hiperc
+SHAREHBPL=$(DESTDIR)$(PREFIX)/share/foo2hbpl
+MANDIR=$(DESTDIR)$(PREFIX)/man
+DOCDIR=$(DESTDIR)$(PREFIX)/share/doc/foo2zjs
+INSTALL?=install
 ROOT=root
 
 # Pathnames for referenced packages...
-FOODB=$(DESTDIR)/usr/share/foomatic/db/source
+FOODB=$(DESTDIR)$(PREFIX)/foomatic/db/source
 
 # User ID's
 LPuid=-oroot
@@ -295,7 +293,7 @@ endif
 
 # Compiler flags
 #CFLAGS += -O2 -Wall -Wno-unused-but-set-variable
-CFLAGS +=  -O2 -Wall 
+CFLAGS ?=  -O2 -Wall 
 #CFLAGS += -g
 
 #
@@ -612,10 +610,9 @@ command2foo2lava-pjl.o: command2foo2lava
 #
 # Installation rules
 #
-install: all install-test install-prog install-icc2ps install-osx-hotplug \
-       install-extra install-crd install-foo install-ppd \
-       install-gui install-desktop install-filter \
-       install-man install-doc
+install: all install-prog install-icc2ps \
+       install-crd install-foo install-ppd
+
    #
    # If you use CUPS, then restart the spooler:
    #   make cups
@@ -630,6 +627,7 @@ install: all install-test install-prog i
    # On Ubuntu 7.10/8.x/9.x, run "system-config-printer".
 
 install-test:
+   echo "install-test:"
    #
    # Installation Dependencies...
    #
@@ -649,19 +647,22 @@ install-test:
    fi
    # ... OK!
    #
+   echo "install-test: exit"
     
 
-UDEVBIN=$(DESTDIR)/bin/
+UDEVBIN=$(DESTDIR)$(PREFIX)/bin
 
 install-prog:
+   echo "install-prog:"
    #
    # Install driver, wrapper, and development tools
    #
    $(INSTALL) -d $(BIN)
-   $(INSTALL) -c $(PROGS) $(SHELLS) $(BIN)/
+   $(INSTALL) -s -c $(PROGS) $(BIN)
+   $(INSTALL) -c $(SHELLS) $(BIN)
    if [ "$(BINPROGS)" != "" ]; then \
        $(INSTALL) -d $(UDEVBIN); \
-       $(INSTALL) -c $(BINPROGS) $(UDEVBIN); \
+       $(INSTALL) -s -c $(BINPROGS) $(UDEVBIN); \
    fi
    #
    # Install gamma correction files.  These are just templates,
@@ -678,24 +679,16 @@ install-prog:
    $(INSTALL) -d $(SHAREHC)/
 
 install-foo:
+   echo "install-foo:"
    #
    # Remove obsolete foomatic database files from previous versions
    #
-   rm -f $(FOODB)/opt/foo2zjs-Media.xml
-   rm -f $(FOODB)/opt/foo2zjs-PaperSize.xml
-   rm -f $(FOODB)/opt/foo2zjs-Source.xml
-   rm -f $(FOODB)/opt/foo2zjs-DitherPPI.xml
-   rm -f $(FOODB)/opt/foo2zjs-Copies.xml
-   rm -f $(FOODB)/opt/foo2zjs-Nup.xml
-   rm -f $(FOODB)/opt/foo2zjs-NupOrient.xml
-   rm -f $(FOODB)/opt/foo2*-Quality.xml
-   rm -f $(FOODB)/opt/foo2hp-AlignCMYK.xml
-   rm -f $(FOODB)/printer/KonicaMinolta*.xml
    #
    # Install current database files
    #
+   mkdir -p $(FOODB)
    @if [ -d $(FOODB) ]; then \
-       for dir in driver printer opt; do \
+       for dir in printer opt; do \
        echo install -d $(FOODB)/$$dir/; \
        $(INSTALL) -d $(FOODB)/$$dir/; \
        echo install -m 644 foomatic-db/$$dir/*.xml $(FOODB)/$$dir/; \
@@ -712,28 +705,20 @@ install-foo:
        echo "*** ... wherever foomatic is stashed on your machine."; \
        echo "***"; \
    fi
-   #
-   # 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; \
-   fi
+   echo "install-foo: exit"
 
 install-icc2ps:
    #
    # Install ICM to Postscript file conversion utility
    #
-   cd icc2ps; $(MAKE) PREFIX=$(PREFIX) install
+   cd icc2ps; $(MAKE) PREFIX=$(DESTDIR)$(PREFIX) install
 
 install-osx-hotplug:
 ifeq ($(UNAME),Darwin)
    #
    # Install Mac OSX hotplug utility
    #
-   cd osx-hotplug; $(MAKE) PREFIX=$(PREFIX) install
+   cd osx-hotplug; $(MAKE) PREFIX=$(DESTDIR)$(PREFIX) install
 endif
 
 install-crd:
@@ -840,10 +825,10 @@ install-extra:
        fi; \
    done
 
-MODEL=$(PREFIX)/share/cups/model
-LOCALMODEL=$(DESTDIR)/usr/local/share/cups/model
+MODEL=$(DESTDIR)$(PREFIX)/share/cups/model
+LOCALMODEL=$(DESTDIR)$(PREFIX)/share/cups/model
 MACMODEL=/Library/Printers/PPDs/Contents/Resources
-PPD=$(PREFIX)/share/ppd
+PPD=$(DESTDIR)$(PREFIX)/ppd
 VARPPD=/var/lp/ppd
 install-ppd:
    #
@@ -878,6 +863,7 @@ install-ppd:
    fi
    #
    export PATH=$$PATH:`pwd`:; \
+   mkdir -p $(MODEL) ; \
    if [ -d $(MODEL) ]; then \
        rm -f $(MODEL)/KonicaMinolta*; \
        cd PPD; \
@@ -908,9 +894,9 @@ install-ppd:
        done; \
    fi
 
-APPL=$(DESTDIR)/usr/share/applications
-OLDAPPL=$(DESTDIR)/usr/share/gnome/apps/System
-PIXMAPS=$(DESTDIR)/usr/share/pixmaps
+APPL=$(DESTDIR)$(PREFIX)/share/applications
+OLDAPPL=$(DESTDIR)$(PREFIX)/share/gnome/apps/System
+PIXMAPS=$(DESTDIR)$(PREFIX)/share/pixmaps
 
 install-desktop:
    #