1
############################ -*- Mode: Makefile -*- ###########################
3
## Author : Manoj Srivastava ( srivasta@glaurung.internal.golden-gryphon.com )
4
## Created On : Fri Mar 12 11:11:31 2004
5
## Created On Node : glaurung.internal.golden-gryphon.com
6
## Last Modified By : Manoj Srivastava
7
## Last Modified On : Mon Apr 11 13:19:10 2005
8
## Last Machine Used: glaurung.internal.golden-gryphon.com
10
## Status : Unknown, Use with caution!
12
## Description : helps with using debconf
14
## arch-tag: 32b933a9-05ad-4c03-97a8-8644745b832a
16
###############################################################################
18
# The idea behind this scheme is that the maintainer (or whoever's
19
# building the package for upload to unstable) has to build on a
20
# machine with po-debconf installed, but nobody else does.
22
# When building with po-debconf, a format 1 (no encoding specifications,
23
# woody-compatible) debian/templates file is generated in the clean target
24
# and shipped in the source package, but a format 2 (UTF8-encoded,
25
# woody-incompatible) debian/templates file is generated in binary-arch
26
# for the binary package only.
28
# When building without po-debconf, the binary package simply reuses the
29
# woody-compatible debian/templates file that was produced by the clean
30
# target of the maintainer's build.
32
# Also, make sure that debian/control has ${debconf-depends} in the
33
# appropriate Depends: line., and use the following in the binary
35
# dpkg-gencontrol -V'debconf-depends=debconf (>= $(MINDEBCONFVER))'
38
# WARNING!! You need to create the templates.master file before this all works.
40
ifeq (,$(wildcard /usr/bin/po2debconf))
45
MINDEBCONFVER := 1.2.0
49
# Hack for woody compatibility. This makes sure that the
50
# debian/templates file shipped in the source package doesn't specify
51
# encodings, which woody's debconf can't handle. If building on a
52
# system with po-debconf installed the binary-arch target will
53
# generate a better version for sarge. Only do this if there is a
54
# templates.master, or else the debian/templates file can get
56
ifeq ($(PO2DEBCONF),yes)
57
ifeq (,$(wildcard debian/templates.master))
58
define CREATE_COMPATIBLE_TEMPLATE
59
echo Not modifying templates
62
define CREATE_COMPATIBLE_TEMPLATE
63
echo 1 > debian/po/output
64
po2debconf debian/templates.master > debian/templates
65
rm -f debian/po/output
69
define CREATE_COMPATIBLE_TEMPLATE
70
echo Not modifying templates
75
ifeq ($(PO2DEBCONF),yes)
76
ifeq (,$(wildcard debian/templates.master))
77
define INSTALL_TEMPLATE
78
echo using old template
81
define INSTALL_TEMPLATE
82
po2debconf debian/templates.master > debian/templates
86
define INSTALL_TEMPLATE
87
echo using old template
91
# the tool podebconf-report-po is also a great friend to have in such
94
@for i in debian/po/*.po; do \
96
echo \"Checking: $$i\"; \
97
msgmerge -U $$i debian/po/templates.pot; \
98
msgfmt -o /dev/null -c --statistics $$i; \