~ubuntu-branches/ubuntu/raring/cups/raring-proposed

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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
Description: po4a infrastructure and translations for manpages.
Author: Nicolas François <nicolas.francois@centraliens.net>, Helge Kreutzmann <debian@helgefjell.de>
Bug-Debian: http://bugs.debian.org/478597

--- a/man/Makefile
+++ b/man/Makefile
@@ -42,6 +42,7 @@
 		cups-files.conf.$(MAN5EXT) \
 		cups-snmp.conf.$(MAN5EXT) \
 		cupsd.conf.$(MAN5EXT) \
+		cups-files.conf.$(MAN5EXT) \
 		ipptoolfile.$(MAN5EXT) \
 		mailto.conf.$(MAN5EXT) \
 		mime.convs.$(MAN5EXT) \
@@ -67,12 +68,18 @@
 		lpmove.$(MAN8EXT) \
 		lpc.$(MAN8EXT)
 
+LANGUAGES=de fr
 
 #
 # Make everything...
 #
 
-all:	$(MAN1) $(MAN5) $(MAN7) $(MAN8) html
+all:	$(MAN1) $(MAN5) $(MAN7) $(MAN8) html translations
+
+translations:
+	# Update the translations and build the translated material
+	po4a --previous ../debian/manpage-po4a/cups.cfg
+	for lang in $(LANGUAGES); do $(MAKE) -C $$lang; done
 
 
 #
@@ -112,6 +119,11 @@
 	for file in $(MAN8); do \
 		$(RM) ../doc/help/man-`basename $$file .$(MAN8EXT)`.html; \
 	done
+	for lang in $(LANGUAGES); do $(MAKE) -C $$lang clean; done
+	# Make sure the PO files are updated and remove generated
+	# translations.
+	po4a --previous --rm-translations ../debian/manpage-po4a/cups.cfg
+	$(RM) ../debian/manpage-po4a/po/cups.pot
 
 
 #
@@ -159,6 +171,7 @@
 	done
 	$(RM) $(AMANDIR)/man$(MAN8DIR)/cupsdisable.$(MAN8EXT)
 	$(LN) cupsenable.$(MAN8EXT) $(AMANDIR)/man$(MAN8DIR)/cupsdisable.$(MAN8EXT)
+	for lang in $(LANGUAGES); do $(MAKE) -C $$lang install; done
 
 
 #
@@ -207,6 +220,7 @@
 	$(RM) $(AMANDIR)/man$(MAN8DIR)/reject.$(MAN8EXT)
 	$(RM) $(AMANDIR)/man$(MAN8DIR)/cupsdisable.$(MAN8EXT)
 	-$(RMDIR) $(AMANDIR)/man$(MAN8DIR)
+	for lang in $(LANGUAGES); do $(MAKE) -C $$lang uninstall; done
 
 
 #
--- /dev/null
+++ b/man/Makefile.l10n
@@ -0,0 +1,210 @@
+#
+# "$Id: $"
+#
+#   Man page makefile for the Common UNIX Printing System (CUPS).
+#
+#   Copyright 2007 by Apple Inc.
+#   Copyright 1993-2006 by Easy Software Products.
+#
+#   These coded instructions, statements, and computer programs are the
+#   property of Apple Inc. and are protected by Federal copyright
+#   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+#   which should have been included with this file.  If this file is
+#   file is missing or damaged, see the license at "http://www.cups.org/".
+#
+
+include ../../Makedefs
+
+
+#
+# Man pages...
+#
+
+MAN1	=	cancel.$(MAN1EXT) \
+		cups-config.$(MAN1EXT) \
+		cupstestdsc.$(MAN1EXT) \
+		cupstestppd.$(MAN1EXT) \
+		lp.$(MAN1EXT) \
+		lpoptions.$(MAN1EXT) \
+		lppasswd.$(MAN1EXT) \
+		lpq.$(MAN1EXT) \
+		lprm.$(MAN1EXT) \
+		lpr.$(MAN1EXT) \
+		lpstat.$(MAN1EXT)
+MAN5	=	classes.conf.$(MAN5EXT) \
+		client.conf.$(MAN5EXT) \
+		cups-snmp.conf.$(MAN5EXT) \
+		cupsd.conf.$(MAN5EXT) \
+		cups-files.conf.$(MAN5EXT) \
+		mailto.conf.$(MAN5EXT) \
+		mime.convs.$(MAN5EXT) \
+		mime.types.$(MAN5EXT) \
+		printers.conf.$(MAN5EXT) \
+		subscriptions.conf.$(MAN5EXT)
+MAN7	=	backend.$(MAN7EXT) \
+		filter.$(MAN7EXT)
+MAN8	=	cupsaccept.$(MAN8EXT) \
+		cupsaddsmb.$(MAN8EXT) \
+		cupsctl.$(MAN8EXT) \
+		cupsfilter.$(MAN8EXT) \
+		cups-deviced.$(MAN8EXT) \
+		cups-driverd.$(MAN8EXT) \
+		cups-lpd.$(MAN8EXT) \
+		cups-polld.$(MAN8EXT) \
+		cupsd.$(MAN8EXT) \
+		cupsenable.$(MAN8EXT) \
+		lpadmin.$(MAN8EXT) \
+		lpinfo.$(MAN8EXT) \
+		lpmove.$(MAN8EXT) \
+		lpc.$(MAN8EXT)
+
+
+#
+# Make everything...
+#
+
+all:	manpages.gz html
+
+# Prepare all the existing manpages, and compress them.
+# But do not fail if a manpage was not generated.
+manpages.gz: manpages.gz-stamp
+manpages.gz-stamp:
+	for file in $(MAN1) $(MAN5) $(MAN7) $(MAN8); do \
+		$(MAKE) $$file || true; \
+	done
+	touch $@
+
+#
+# Clean all config and object files...
+#
+
+clean:
+	$(RM) $(MAN1) $(MAN5) $(MAN7) $(MAN8)
+	for file in $(MAN1); do \
+		$(RM) ../../doc/help/man-`basename $$file .$(MAN1EXT)`.$(LANGUAGE).html; \
+	done
+	for file in $(MAN5); do \
+		$(RM) ../../doc/help/man-`basename $$file .$(MAN5EXT)`.$(LANGUAGE).html; \
+	done
+	for file in $(MAN7); do \
+		$(RM) ../../doc/help/man-`basename $$file .$(MAN7EXT)`.$(LANGUAGE).html; \
+	done
+	for file in $(MAN8); do \
+		$(RM) ../../doc/help/man-`basename $$file .$(MAN8EXT)`.$(LANGUAGE).html; \
+	done
+	for file in *.man.in; do \
+		$(RM) `basename $$file .in`; \
+	done
+	$(RM) manpages.gz-stamp
+
+
+#
+# Dummy depend target...
+#
+
+depend:
+
+
+#
+# Install files...
+#
+
+MANDIR := $(MANDIR)/$(LANGUAGE)
+AMANDIR := $(AMANDIR)/$(LANGUAGE)
+
+install:	all
+	$(INSTALL_DIR) -m 755 $(MANDIR)/man1
+	for file in $(wildcard $(MAN1)); do \
+		echo Installing $$file in $(MANDIR)/man1...; \
+		$(INSTALL_MAN) $$file $(MANDIR)/man1; \
+	done
+	$(INSTALL_DIR) -m 755 $(MANDIR)/man5
+	for file in $(wildcard $(MAN5)); do \
+		echo Installing $$file in $(MANDIR)/man5...; \
+		$(INSTALL_MAN) $$file $(MANDIR)/man5; \
+	done
+	$(INSTALL_DIR) -m 755 $(MANDIR)/man7
+	for file in $(wildcard $(MAN7)); do \
+		echo Installing $$file in $(MANDIR)/man7...; \
+		$(INSTALL_MAN) $$file $(MANDIR)/man7; \
+	done
+	$(INSTALL_DIR) -m 755 $(AMANDIR)/man$(MAN8DIR)
+	for file in $(wildcard $(MAN8)); do \
+		echo Installing $$file in $(AMANDIR)/man$(MAN8DIR)...; \
+		$(INSTALL_MAN) $$file $(AMANDIR)/man$(MAN8DIR); \
+	done
+	if [ -f cupsreject.$(MAN8EXT) ]; then \
+		$(RM) $(AMANDIR)/man$(MAN8DIR)/cupsreject.$(MAN8EXT); \
+	fi
+	if [ -f cupsaccept.$(MAN8EXT) ]; then \
+		$(LN) cupsaccept.$(MAN8EXT) $(AMANDIR)/man$(MAN8DIR)/cupsreject.$(MAN8EXT); \
+	fi
+	if [ -f cupsdisable.$(MAN8EXT) ]; then \
+		$(RM) $(AMANDIR)/man$(MAN8DIR)/cupsdisable.$(MAN8EXT); \
+	fi
+	if [ -f cupsenable.$(MAN8EXT) ]; then \
+		$(LN) cupsenable.$(MAN8EXT) $(AMANDIR)/man$(MAN8DIR)/cupsdisable.$(MAN8EXT); \
+	fi
+
+
+#
+# Uninstall files...
+#
+
+uninstall:
+	for file in $(MAN1); do \
+		$(RM) $(MANDIR)/man1/$$file; \
+	done
+	-$(RMDIR) $(MANDIR)/man1
+	for file in $(MAN5); do \
+		$(RM) $(MANDIR)/man5/$$file; \
+	done
+	-$(RMDIR) $(MANDIR)/man5
+	for file in $(MAN7); do \
+		$(RM) $(MANDIR)/man7/$$file; \
+	done
+	-$(RMDIR) $(MANDIR)/man7
+	for file in $(MAN8); do \
+		$(RM) $(AMANDIR)/man$(MAN8DIR)/$$file; \
+	done
+	$(RM) $(AMANDIR)/man$(MAN8DIR)/cupsreject.$(MAN8EXT)
+	$(RM) $(AMANDIR)/man$(MAN8DIR)/cupsdisable.$(MAN8EXT)
+	-$(RMDIR) $(AMANDIR)/man$(MAN8DIR)
+
+
+#
+# Make html versions of man pages...
+#
+
+MANTOHTML = ../mantohtml
+html:	manpages.gz $(MANTOHTML)
+	echo Converting man pages to HTML...
+	for file in $(wildcard $(MAN1)); do \
+		echo "    $$file..."; \
+		$(MANTOHTML) `basename $$file .$(MAN1EXT)`.man >../../doc/help/man-`basename $$file .$(MAN1EXT)`.$(LANGUAGE).html; \
+	done
+	for file in $(wildcard $(MAN5)); do \
+		echo "    $$file..."; \
+		$(MANTOHTML) `basename $$file .$(MAN5EXT)`.man >../../doc/help/man-`basename $$file .$(MAN5EXT)`.$(LANGUAGE).html; \
+	done
+	for file in $(wildcard $(MAN7)); do \
+		echo "    $$file..."; \
+		$(MANTOHTML) `basename $$file .$(MAN7EXT)`.man >../../doc/help/man-`basename $$file .$(MAN7EXT)`.$(LANGUAGE).html; \
+	done
+	for file in $(wildcard $(MAN8)); do \
+		echo "    $$file..."; \
+		$(MANTOHTML) `basename $$file .$(MAN8EXT)`.man >../../doc/help/man-`basename $$file .$(MAN8EXT)`.$(LANGUAGE).html; \
+	done
+
+.SUFFIXES: .man.in .man
+# Keep the generated .man because they are needed for the html rule
+.PRECIOUS: %.man
+
+.man.in.man:
+	sed -e 's:@CUPS_DATADIR@:$(DATADIR):' \
+	    -e 's:@CUPS_SERVERROOT@:$(SERVERROOT):' \
+	    -e 's:@CUPS_SERVERBIN@:$(SERVERBIN):' $< > $@
+
+#
+# End of "$Id: $".
+#
--- /dev/null
+++ b/man/de/Makefile
@@ -0,0 +1,13 @@
+#
+# "$Id: $"
+#
+#   Man page makefile for the Common UNIX Printing System (CUPS).
+#
+
+LANGUAGE=de
+
+include ../Makefile.l10n
+
+#
+# End of "$Id: $".
+#
--- /dev/null
+++ b/man/fr/Makefile
@@ -0,0 +1,13 @@
+#
+# "$Id: $"
+#
+#   Man page makefile for the Common UNIX Printing System (CUPS).
+#
+
+LANGUAGE=fr
+
+include ../Makefile.l10n
+
+#
+# End of "$Id: $".
+#