Package: foo2zjs / 20200505dfsg0-1

0001-Update-makefiles-to-Debian-best-practices.patch Patch series | download
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
From: Steffen Joeris <white@debian.org>
Date: Tue, 4 Oct 2016 11:43:43 +0200
Subject: Update makefiles to Debian best-practices

Author: Luca Capello <luca@pca.it>
Author: Didier Raboud <odyx@debian.org>
---
 Makefile        | 71 +++++++++++++++++++++++++++------------------------------
 icc2ps/Makefile |  4 ++--
 2 files changed, 35 insertions(+), 40 deletions(-)

diff --git a/Makefile b/Makefile
index e198d57..ea8b2a4 100644
--- a/Makefile
+++ b/Makefile
@@ -17,9 +17,7 @@ SYSNAME := $(shell uname -n)
 VERSION=0.0
 
 # Installation prefix...
-PREFIX=/usr/local
 PREFIX=/usr
-PREFIX=$(DESTDIR)/usr
 
 # Pathnames for this package...
 BIN=$(PREFIX)/bin
@@ -39,7 +37,7 @@ INSTALL=install
 ROOT=root
 
 # Pathnames for referenced packages...
-FOODB=$(DESTDIR)/usr/share/foomatic/db/source
+FOODB=$(DESTDIR)/share/foomatic/db/source
 
 # User ID's
 LPuid=-oroot
@@ -473,34 +471,34 @@ all-done:
 
 
 foo2ddst: foo2ddst.o $(LIBJBG)
-	$(CC) $(CFLAGS) -o $@ foo2ddst.o $(LIBJBG)
+	$(CC) $(CFLAGS) -o $@ foo2ddst.o $(LIBJBG) $(LDFLAGS)
 
 foo2hbpl2: foo2hbpl2.o $(LIBJBG)
-	$(CC) $(CFLAGS) -o $@ foo2hbpl2.o $(LIBJBG)
+	$(CC) $(CFLAGS) -o $@ foo2hbpl2.o $(LIBJBG) $(LDFLAGS)
 
 foo2hp: foo2hp.o $(LIBJBG)
-	$(CC) $(CFLAGS) -o $@ foo2hp.o $(LIBJBG)
+	$(CC) $(CFLAGS) -o $@ foo2hp.o $(LIBJBG) $(LDFLAGS)
 
 foo2hiperc: foo2hiperc.o $(LIBJBG)
-	$(CC) $(CFLAGS) -o $@ foo2hiperc.o $(LIBJBG)
+	$(CC) $(CFLAGS) -o $@ foo2hiperc.o $(LIBJBG) $(LDFLAGS)
 
 foo2lava: foo2lava.o $(LIBJBG)
-	$(CC) $(CFLAGS) -o $@ foo2lava.o $(LIBJBG)
+	$(CC) $(CFLAGS) -o $@ foo2lava.o $(LIBJBG) $(LDFLAGS)
 
 foo2oak: foo2oak.o $(LIBJBG)
-	$(CC) $(CFLAGS) -o $@ foo2oak.o $(LIBJBG)
+	$(CC) $(CFLAGS) -o $@ foo2oak.o $(LIBJBG) $(LDFLAGS)
 
 foo2qpdl: foo2qpdl.o $(LIBJBG)
-	$(CC) $(CFLAGS) -o $@ foo2qpdl.o $(LIBJBG)
+	$(CC) $(CFLAGS) -o $@ foo2qpdl.o $(LIBJBG) $(LDFLAGS)
 
 foo2slx: foo2slx.o $(LIBJBG)
-	$(CC) $(CFLAGS) -o $@ foo2slx.o $(LIBJBG)
+	$(CC) $(CFLAGS) -o $@ foo2slx.o $(LIBJBG) $(LDFLAGS)
 
 foo2xqx: foo2xqx.o $(LIBJBG)
-	$(CC) $(CFLAGS) -o $@ foo2xqx.o $(LIBJBG)
+	$(CC) $(CFLAGS) -o $@ foo2xqx.o $(LIBJBG) $(LDFLAGS)
 
 foo2zjs: foo2zjs.o $(LIBJBG)
-	$(CC) $(CFLAGS) -o $@ foo2zjs.o $(LIBJBG)
+	$(CC) $(CFLAGS) -o $@ foo2zjs.o $(LIBJBG) $(LDFLAGS)
 
 
 foo2ddst-wrapper: foo2ddst-wrapper.in Makefile
@@ -586,49 +584,49 @@ ifeq ($(UNAME),Darwin)
 endif
 
 ok: ok.o $(LIBJBG)
-	$(CC) $(CFLAGS) ok.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) ok.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 ddstdecode: ddstdecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) ddstdecode.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) ddstdecode.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 gipddecode: gipddecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) gipddecode.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) gipddecode.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 hbpldecode: hbpldecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) hbpldecode.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) hbpldecode.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 hipercdecode: hipercdecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) hipercdecode.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) hipercdecode.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 lavadecode: lavadecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) lavadecode.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) lavadecode.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 oakdecode: oakdecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) -g oakdecode.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) -g oakdecode.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 opldecode: opldecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) -g opldecode.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) -g opldecode.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 qpdldecode: qpdldecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) qpdldecode.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) qpdldecode.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 splcdecode: splcdecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) splcdecode.o $(LIBJBG) -lz -o $@
+	$(CC) $(CFLAGS) splcdecode.o $(LIBJBG) -lz -o $@ $(LDFLAGS)
 
 slxdecode: slxdecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) slxdecode.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) slxdecode.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 xqxdecode: xqxdecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) xqxdecode.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) xqxdecode.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 zjsdecode: zjsdecode.o $(LIBJBG)
-	$(CC) $(CFLAGS) zjsdecode.o $(LIBJBG) -o $@
+	$(CC) $(CFLAGS) zjsdecode.o $(LIBJBG) -o $@ $(LDFLAGS)
 
 command2foo2lava-pjl: command2foo2lava-pjl.o
-	$(CC) $(CFLAGS) -L/usr/local/lib command2foo2lava-pjl.o -lcups -o $@
+	$(CC) $(CFLAGS) -L/usr/local/lib command2foo2lava-pjl.o -lcups -o $@ $(LDFLAGS)
 
 command2foo2lava-pjl.o: command2foo2lava-pjl.c
-	$(CC) $(CFLAGS) -I/usr/local/include -c command2foo2lava-pjl.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -I/usr/local/include -c command2foo2lava-pjl.c
 
 #
 # Installation rules
@@ -674,8 +672,6 @@ install-test:
 	#
     
 
-UDEVBIN=$(DESTDIR)/bin/
-
 install-prog:
 	#
 	# Install driver, wrapper, and development tools
@@ -684,7 +680,7 @@ install-prog:
 	$(INSTALL) -c $(PROGS) $(SHELLS) $(BIN)/
 	if [ "$(BINPROGS)" != "" ]; then \
 	    $(INSTALL) -d $(UDEVBIN); \
-	    $(INSTALL) -c $(BINPROGS) $(UDEVBIN); \
+	    $(INSTALL) -c $(BINPROGS) $(BIN); \
 	fi
 	#
 	# Install gamma correction files.  These are just templates,
@@ -878,7 +874,7 @@ install-extra:
 	done
 
 MODEL=$(PREFIX)/share/cups/model
-LOCALMODEL=$(DESTDIR)/usr/local/share/cups/model
+LOCALMODEL=$(DESTDIR)/local/share/cups/model
 MACMODEL=/Library/Printers/PPDs/Contents/Resources
 PPD=$(PREFIX)/share/ppd
 VARPPD=/var/lp/ppd
@@ -939,9 +935,9 @@ install-ppd:
 	    done; \
 	fi
 
-APPL=$(DESTDIR)/usr/share/applications
-OLDAPPL=$(DESTDIR)/usr/share/gnome/apps/System
-PIXMAPS=$(DESTDIR)/usr/share/pixmaps
+APPL=$(DESTDIR)/share/applications
+OLDAPPL=$(DESTDIR)/share/gnome/apps/System
+PIXMAPS=$(DESTDIR)/share/pixmaps
 
 install-desktop:
 	#
@@ -1518,10 +1514,9 @@ ppd:
 		foomatic-ppdfile -d $$driver -p $$printer > PPD/$$printer.ppd; \
 	    else \
 		# 09/06/18: Use the older foomatic??? \
-		ENGINE=../foomatic/foomatic-db-engine; \
 		PERL5LIB=$$ENGINE/lib \
 		    FOOMATICDB=foomatic-db \
-		    $$ENGINE/foomatic-ppdfile \
+		    /usr/bin/foomatic-ppdfile \
 		    -d $$driver -p $$printer \
 		    > PPD/$$printer.ppd; \
 	    fi \
@@ -1980,7 +1975,7 @@ FRC:
 misc: pksm2bitcmyk phorum-logo.gif
 
 pksm2bitcmyk: pksm2bitcmyk.c
-	$(CC) $(CFLAGS) pksm2bitcmyk.c -lnetpbm -o $@
+	$(CC) $(CFLAGS) pksm2bitcmyk.c -lnetpbm -o $@ $(LDFLAGS)
 
 phorum-logo.gif: archhp.fig
 	fig2dev -L gif -m.25 archhp.fig | giftrans -t "#ffffff" -o $@
diff --git a/icc2ps/Makefile b/icc2ps/Makefile
index f3abb99..215105b 100644
--- a/icc2ps/Makefile
+++ b/icc2ps/Makefile
@@ -9,7 +9,7 @@ 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
@@ -21,7 +21,7 @@ endif
 all: foo2zjs-icc2ps man
 
 foo2zjs-icc2ps: $(SRC) $(LIB)
-	$(CC) $(CFLAGS) $(SRC) $(LIB) -lm -o $@
+	$(CC) $(CPPFLAGS) $(CFLAGS) $(SRC) $(LIB) -lm -o $@ $(LDFLAGS)
 
 install: all
 	$(INSTALL) -c foo2zjs-icc2ps $(BIN)