File: rules

package info (click to toggle)
maint-guide 1.2.39
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,156 kB
  • ctags: 43
  • sloc: xml: 5,871; makefile: 239; sh: 204
file content (63 lines) | stat: -rwxr-xr-x 1,945 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
56
57
58
59
60
61
62
63
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

MANUAL		:= maint-guide

# Languages which generate DocBook XML files from PO files
# (More conservative than the ones in Makefile)
LANGPO		:= ca de es fr it ja ru zh-cn zh-tw

# Override main Makefile to build CJK under sid
# No PDF build for these lunguages
LANGNOPDF	:= ja zh-cn zh-tw 

## comment out to build with the cleaner log (it slows!)
#BUILDOPT	:= --parallel
BUILDOPT	:=

VERSION		:= $(shell sed -ne '1s/[-a-zA-Z0-9 ]*(\([^()]*\)) .*$$/\1/p' debian/changelog)

#######################################################################
# If you added/removed translation, please run "debian/rules prep"
# to update the debian/control file
#######################################################################
prep:
	cd debian ;\
	cp -f control control-old ;\
	sed -e '/^Package: maint-guide-/,$$d' < control-old > control ;\
	for x in $(LANGPO); do \
		./language $$x < template/control-body >> control; \
	done
.PHONY: prep
#######################################################################
%:
	dh  $@

override_dh_auto_build:
	cd debian ;\
	./language "en" < template/install > $(MANUAL).install ;\
	./language "en" < template/doc-base > $(MANUAL).doc-base ;\
	./language "en" < template/lintian-overrides > $(MANUAL).lintian-overrides ;\
	for x in $(LANGPO); do \
		./language $$x < template/install > $(MANUAL)-$$x.install; \
		./language $$x < template/doc-base > $(MANUAL)-$$x.doc-base; \
		./language $$x < template/lintian-overrides > $(MANUAL)-$$x.lintian-overrides; \
	done
	dh_auto_build $(BUILDOPT) -- \
		"MANUAL=$(MANUAL)" \
		"VERSION=$(VERSION)" \
		"LANGPO=$(LANGPO)" \
		"LANGNOPDF=$(LANGNOPDF)" \
		all

override_dh_compress:
	dh_compress -X.pdf -X.epub

override_dh_auto_clean:
	-rm -f debian/control-old
	-rm -f debian/*.install
	-rm -f debian/*.doc-base
	-rm -f debian/*.lintian-overrides
	$(MAKE) "LANGPO=$(LANGPO)"  clean