File: rules

package info (click to toggle)
ubuntu-packaging-guide 1.0.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 6,640 kB
  • sloc: python: 360; makefile: 270
file content (55 lines) | stat: -rwxr-xr-x 1,605 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

COMMON := /usr/share/ubuntu-packaging-guide

%:
	dh $@ --builddirectory=_build

override_dh_auto_build:
	make latexpdf
	make html
	make singlehtml
	make epub

override_dh_compress:
	dh_compress -X_sources

override_dh_link:
	# symlink identical resources. Only needed for the html packages.
	for dirname in _static _images; do \
		for directory in `find debian/ -wholename */$$dirname -not -wholename *-common* -type d`; do \
			cd $$directory; \
			for filename in `find -type f -not \( -name translations.js -or -name searchtools.js -or -name _stemmer.js \)`; do \
				rm $$filename; \
				ln -s $(COMMON)/$$dirname/$$filename $$filename; \
			done; \
			cd -; \
		done; \
	done
	for directory in `find debian/ -type d -name singlehtml`; do \
		for filename in translations.js searchtools.js _stemmer.js; do \
			if [ -f $$directory/_static/$$filename ]; then \
				ln -sf ../../_static/$$filename $$directory/_static/$$filename; \
			fi; \
		done; \
	done
	# use system copies of javascript libraries instead
	for jsname in jquery underscore doctools; do \
		for filename in `find debian/ -wholename */_static/$$jsname.js`; do \
			rm $$filename; \
			ln -s /usr/share/javascript/sphinxdoc/1.0/$$jsname.js $$filename; \
		done; \
	done
	dh_link

override_dh_install:
	dh_install --list-missing -Xwebsupport.js

override_dh_installdocs:
	dh_installdocs -Xwebsupport.js

get-orig-source:
	bzr export -r tag:$(DEB_VERSION) --root=ubuntu-packaging-guide-$(DEB_VERSION).orig \
		ubuntu-packaging-guide_$(DEB_VERSION).tar.gz lp:ubuntu-packaging-guide