/[d-i]/trunk/manual/debian/rules
ViewVC logotype

Contents of /trunk/manual/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 50588 - (show annotations) (download)
Sun Dec 23 08:30:38 2007 UTC (5 years, 4 months ago) by fjp
File size: 2482 byte(s)
* Rename doc-base.TEMPLATE to TEMPLATE.doc-base to avoid its inclusion in
  the package for the first architecture.
* Modify language codes that include a country for the doc-base document ID
  so they only contain valid characters.
* Remove the PDF section in doc-base files if PDF format is not built for a
  language.
* Update standards version to 3.7.3; no changes needed.
* Set svn:ignore for temporary build files.
1 #!/usr/bin/make -f
2
3 ARCHS=$(shell cd debian; ./getfromlist archlist)
4 LANGS=$(shell cd debian; ./getfromlist langlist)
5 VERSION=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
6 DATE=$(shell echo $(VERSION) | cut -d '.' -f 1)
7 SUITE=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Distribution: | cut -d ' ' -f 2)
8 ifeq (${SUITE},unstable)
9 SUITE=lenny
10 endif
11
12 MANTMP=$(shell pwd)/debian/manual
13
14 clean:
15 dh_testdir
16 dh_testroot
17 dh_clean build-stamp
18 rm -rf $(MANTMP)
19 dh_clean doc-base-stamp
20 rm -rf debian/installation-guide-*.doc-base.*
21 rm -rf build/build.out build/build.tmp build/build.po
22
23 doc-base: doc-base-stamp
24 doc-base-stamp:
25 @echo $(ARCHS)
26 rm -f $@
27 rm -rf debian/installation-guide-*.doc-base.*
28 set -e; cd debian && \
29 for arch in $(ARCHS); do \
30 for lang in $(LANGS); do \
31 arch_full="$$(grep "^$$arch[[:space:]]" archlist | cut -f 2)"; \
32 lang_full="$$(grep "^$$lang[[:space:]]" langlist | cut -f 2)"; \
33 lang_id="$$(echo $$lang | tr A-Z a-z | sed "s/_/-/")"; \
34 sed -e "s:%ARCH%:$$arch:g" -e "s:%ARCH_FULL%:$$arch_full:g" \
35 -e "s:%LANG%:$$lang:g" -e "s:%LANG_FULL%:$$lang_full:g" \
36 -e "s:%LANG_ID%:$$lang_id:g" \
37 TEMPLATE.doc-base >installation-guide-$$arch.doc-base.$$lang; \
38 if [ ! -e manual/$$arch/$$lang/install.$$lang.pdf ]; then \
39 sed -i "/Format: pdf/,/^$$/d" installation-guide-$$arch.doc-base.$$lang; \
40 fi; \
41 done; \
42 done
43 touch $@
44
45 build: build-stamp
46 build-stamp:
47 rm -f $@
48 -rm -rf $(MANTMP)
49 set -e && cd build && \
50 for arch in $(ARCHS) ; do \
51 official_build=1 manual_release=$(SUITE) \
52 architectures="$$arch" languages="$(LANGS)" \
53 destination=$(MANTMP)/$$arch noarchdir=1 \
54 ./build.sh ; \
55 done
56 touch $@
57
58 install: build
59 dh_testdir
60 dh_testroot
61 dh_clean -k
62 dh_installdirs
63
64 binary-arch:
65
66 binary-indep: install doc-base
67 dh_testdir
68 dh_testroot
69 dh_installchangelogs
70 for arch in $(ARCHS) ; do \
71 dh_installdocs -p installation-guide-$$arch $(MANTMP)/$$arch/* ; \
72 done
73 dh_compress
74 dh_fixperms
75 dh_installdeb
76 dh_gencontrol
77 dh_md5sums
78 dh_builddeb
79
80 # Create a tarball for each arch for use in debian-cd
81 # Note: these should be uploaded manually
82 #set -e && cd $(MANTMP) && \
83 # for arch in $(ARCHS) ; do \
84 # tarname=di-manual-$${arch}_$(VERSION).tar.gz ; \
85 # cd $$arch ; \
86 # tar czf ../../../../$$tarname . ; \
87 # cd .. ; \
88 # done
89
90 binary: binary-indep binary-arch
91 .PHONY: build build-images clean binary-indep binary-arch binary install

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5