summaryrefslogtreecommitdiff
path: root/debian/rules
blob: d9e93f8dc7e8087f407338e469b6c260161ccaac (plain)
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
#!/usr/bin/make -f

%:
	dh $@ --with linktree

override_dh_auto_install:
	dh_auto_install
	set -ex; for langdir in debian/tmp/usr/share/doc/debian-policy/*/policy.html; do	\
		lang=$${langdir%%/policy.html};							\
		lang=$${lang##*/};								\
		mkdir -p debian/debian-policy-$$lang/usr/share/doc/debian-policy;		\
		mv debian/tmp/usr/share/doc/debian-policy/$$lang				\
			debian/debian-policy-$$lang/usr/share/doc/debian-policy;		\
	done
	mv debian/tmp/* debian/debian-policy/
#	this file is not referenced by any HTML pages and we have no
#	idea what it does, so just delete it until further
#	investigation is possible
	rm -f debian/debian-policy/usr/share/doc/debian-policy/policy.html/_static/websupport.js

# Move libjs-sphinxdoc from ${misc:Depends} into ${linktree:Recommends}
#
# There are various inconveniences caused by having the
# libjs-sphinxdoc dependencies generated by dh_linktree in
# ${misc:Depends}; see #906139
#
# This hack (suggested by Ian Jackson) can be removed once #658238 is
# resolved, such that we can switch back to dh_sphinxdoc from
# dh_linktree
override_dh_linktree:
	set -ex; for f in debian/*.substvars; do		\
		if [ "$$f" != "debian/*.substvars" ]; then	\
			mv $$f $$f.new;				\
		fi 						\
	done
	dh_linktree
	set -ex; for f in debian/*.substvars; do				\
		sed 's/^misc:Depends/linktree:Recommends/' $$f >>$$f.new;	\
		mv $$f.new $$f;							\
	done