~ubuntu-branches/ubuntu/vivid/installation-guide/vivid-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Frans Pop
  • Date: 2005-10-25 17:37:25 UTC
  • Revision ID: james.westby@ubuntu.com-20051025173725-aq0bm11be7bfd7rw
Tags: 20051025
* Mention in copyright that full GPL is included in the manual.
  Closes: #334925
* Register installed documents with doc-base.
* Minor updates in English text and translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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=etch
 
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
                    sed -e "s/%ARCH%/$$arch/g" -e "s/%ARCH_FULL%/$$arch_full/g" \
 
34
                        -e "s/%LANG%/$$lang/g" -e "s/%LANG_FULL%/$$lang_full/g" \
 
35
                        doc-base.TEMPLATE > installation-guide-$$arch.doc-base.$$lang ; \
 
36
                done ; \
 
37
            done
 
38
        touch $@
 
39
 
 
40
build: build-stamp
 
41
build-stamp:
 
42
        rm -f $@
 
43
        -rm -rf $(MANTMP)
 
44
        set -e && cd build && \
 
45
            for arch in $(ARCHS) ; do \
 
46
                official_build=1 manual_release=$(SUITE) \
 
47
                architectures="$$arch" languages="$(LANGS)" \
 
48
                destination=$(MANTMP)/$$arch noarchdir=1 \
 
49
                ./build.sh ; \
 
50
            done
 
51
        touch $@
 
52
 
 
53
install: build
 
54
        dh_testdir
 
55
        dh_testroot
 
56
        dh_clean -k
 
57
        dh_installdirs
 
58
        
 
59
binary-arch:
 
60
 
 
61
binary-indep: install doc-base
 
62
        dh_testdir
 
63
        dh_testroot
 
64
        dh_installchangelogs
 
65
        for arch in $(ARCHS) ; do \
 
66
                dh_installdocs -p installation-guide-$$arch $(MANTMP)/$$arch/* ; \
 
67
        done
 
68
        dh_compress
 
69
        dh_fixperms
 
70
        dh_installdeb
 
71
        dh_gencontrol -- -Vkernel:Package='$(KERNELPACKAGE)'
 
72
        dh_builddeb
 
73
 
 
74
        # Create a tarball for each arch for use in debian-cd
 
75
        # Note: these should be uploaded manually
 
76
        #set -e && cd $(MANTMP) && \
 
77
        #    for arch in $(ARCHS) ; do \
 
78
        #       tarname=di-manual-$${arch}_$(VERSION).tar.gz ; \
 
79
        #       cd $$arch ; \
 
80
        #       tar czf ../../../../$$tarname . ; \
 
81
        #       cd .. ; \
 
82
        #    done
 
83
 
 
84
binary: binary-indep binary-arch 
 
85
.PHONY: build build-images clean binary-indep binary-arch binary install