/[ddp]/manuals/trunk/maint-guide/debian/rules
ViewVC logotype

Contents of /manuals/trunk/maint-guide/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2975 - (show annotations) (download)
Sat Apr 16 19:50:11 2005 UTC (8 years, 1 month ago) by osamu
File size: 3493 byte(s)
Update build script to cope with BUILD_TYPE
1 #!/usr/bin/make -f
2 # Derived from the rules file for developers-reference (Adam Di Carlo)
3 # and debhelper rules.multi2 example (Joey Hess).
4
5 #export DH_VERBOSE=1
6 export DH_COMPAT=2
7 export DH_OPTIONS
8 export LANG=C
9 # stupid kludge around a stupid debiandoc-sgml bug
10
11 name := maint-guide
12 languagesfoo := fr ja ko es ru de it pl
13 languagesbar := pt_BR zh_CN
14 docdir := usr/share/doc/$(name)
15 install_file := install -m 0644
16 BUILD_TYPE := package
17
18 build: stamp-build
19 stamp-build: $(name).sgml
20 dh_testdir
21 $(MAKE) "BUILD_TYPE=$(BUILD_TYPE)" validate all
22 touch $@
23
24 clean:
25 dh_testdir
26 dh_testroot
27 $(MAKE) "BUILD_TYPE=$(BUILD_TYPE)" clean
28 # Remove unbuild sources for now
29 dh_clean stamp-build debian/$(name)-*.p*
30
31 install: DH_OPTIONS=
32 install: stamp-build
33 dh_testdir
34 dh_testroot
35 dh_clean -k
36 dh_installdirs -Ai $(docdir)
37 dh_installdirs -p$(name) $(docdir)
38 install -m644 Credits debian/$(name)/$(docdir)
39 # English version:
40 cp -a $(name).en.html debian/$(name)/$(docdir)
41 $(install_file) $(name).en.txt $(name).sgml \
42 $(name).en.ps $(name).en.pdf \
43 debian/$(name)/$(docdir)
44 ln -s index.en.html \
45 debian/$(name)/$(docdir)/$(name).en.html/index.html
46 # most of the translations just use the language code
47 @set -ex; for lang in $(languagesfoo); do \
48 cp -a $(name).$$lang.html debian/$(name)-$$lang/$(docdir); \
49 ln -s index.$$lang.html \
50 debian/$(name)-$$lang/$(docdir)/$(name).$$lang.html/index.html; \
51 $(install_file) $(name).$$lang.txt $(name).$$lang.sgml \
52 debian/$(name)-$$lang/$(docdir); \
53 $(install_file) $(name).$$lang.ps $(name).$$lang.pdf \
54 debian/$(name)-$$lang/$(docdir); \
55 done
56 # special case for translations using language_country code
57 @set -ex; for i in $(languagesbar); do \
58 l=`echo $${i} | cut -d_ -f1`; \
59 s=`echo $${i} | cut -d_ -f2 | tr A-Z a-z`; \
60 cp -a $(name).$${i}.html debian/$(name)-$$l/$(docdir); \
61 $(install_file) $(name).$${i}.txt $(name).$${i}.sgml \
62 debian/$(name)-$${l}/$(docdir); \
63 $(install_file) $(name).$${i}.ps $(name).$${i}.pdf \
64 debian/$(name)-$${l}/$(docdir); \
65 ln -s index.$${l}-$${s}.html \
66 debian/$(name)-$${l}/$(docdir)/$(name).$${i}.html/index.html; \
67 done
68
69 binary-indep: DH_OPTIONS=-i
70 binary-indep: build install
71 dh_installdocs
72 dh_installchangelogs
73 @set -ex; for lang in $(languagesfoo) $(languagesbar); do \
74 l=`echo $$lang | cut -d_ -f1`; \
75 ln -s ../$(name) debian/$(name)-$${l}/$(docdir)-$${l}; \
76 done
77 dh_strip
78 dh_fixperms
79 dh_compress
80 dh_installdeb
81 # dh_gencontrol
82 # up to date versions, using the default value of 1.2* in debian/changelog:
83 DH_OPTIONS="-p$(name)" dh_gencontrol
84 DH_OPTIONS="-p$(name)-fr" dh_gencontrol
85 DH_OPTIONS="-p$(name)-ja" dh_gencontrol
86 DH_OPTIONS="-p$(name)-pl" dh_gencontrol
87 DH_OPTIONS="-p$(name)-it" dh_gencontrol
88 DH_OPTIONS="-p$(name)-zh" dh_gencontrol
89 DH_OPTIONS="-p$(name)-ko" dh_gencontrol
90 DH_OPTIONS="-p$(name)-de" dh_gencontrol
91 DH_OPTIONS="-p$(name)-es" dh_gencontrol
92 DH_OPTIONS="-p$(name)-pt" dh_gencontrol
93 DH_OPTIONS="-p$(name)-ru" dh_gencontrol
94 # out of date versions:
95 # If no change from old version,
96 # upload with the same version to prevent updating.
97 #DH_OPTIONS="-p$(name)-XX -u"-v1.X.Y-Z"" dh_gencontrol
98 dh_md5sums
99 dh_builddeb
100
101 binary-arch:
102 # There are no architecture-dependent packages here.
103
104 binary: binary-indep binary-arch
105 .PHONY: build clean binary binary-arch binary-indep install

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5