~andrewsomething/ubuntu-packaging-guide/patches-cleanup

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Daniel Holbach
  • Date: 2012-10-19 07:27:47 UTC
  • mfrom: (186.2.3 ubuntu-packaging-guide)
  • Revision ID: daniel.holbach@canonical.com-20121019072747-0v44sur19o2787pj
mergedĀ lp:~mitya57/ubuntu-packaging-guide/lp1067338-and-better-linking

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
 
VERSION:= $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
 
3
VERSION := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
 
4
COMMON := /usr/share/ubuntu-packaging-guide
4
5
 
5
6
%:
6
7
        dh $@ --builddirectory=_build
12
13
        make epub
13
14
 
14
15
override_dh_compress:
15
 
        dh_compress -X usr/share/doc/ubuntu-packaging-guide-html/_sources
 
16
        dh_compress -X_sources
16
17
 
17
18
override_dh_link:
18
19
        # symlink identical resources. Only needed for the html packages.
19
 
        for lang in `find debian/ -maxdepth 1 -iname *html* -type d | cut -c 30-`; do \
20
 
                cd debian/ubuntu-packaging-guide$$lang && LC_ALL=C fdupes -r1nq \
21
 
                usr/share/doc/ubuntu-packaging-guide$$lang | while read s; do \
22
 
                                set -- $$(echo $$s | tr ' ' '\n' | sort); \
23
 
                                f=$$1; shift; \
24
 
                                for d; do \
25
 
                                        echo "symlinking identical file $$f to $$d"; \
26
 
                                        rm $$f; ln -s /$$d $$f; \
27
 
                                done; \
 
20
        for dirname in _static _images; do \
 
21
                for directory in `find debian/ -wholename */$$dirname -not -wholename *-common* -type d`; do \
 
22
                        cd $$directory; \
 
23
                        for filename in `find -type f -not -name translations.js`; do \
 
24
                                rm $$filename; \
 
25
                                ln -s $(COMMON)/$$dirname/$$filename $$filename; \
28
26
                        done; \
29
 
                cd -; \
 
27
                        cd -; \
 
28
                done; \
30
29
        done
31
30
        # use system copies of javascript libraries instead
32
31
        for jsname in jquery underscore doctools searchtools; do \