File: rules

package info (click to toggle)
publican 4.3.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 18,280 kB
  • sloc: perl: 13,081; xml: 11,558; makefile: 169; sh: 29; python: 29
file content (63 lines) | stat: -rwxr-xr-x 1,910 bytes parent folder | download | duplicates (2)
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

GUIDEDIR=$(CURDIR)/Users_Guide
DOCDIR=$(CURDIR)/debian/publican/usr/share/doc/publican

%:
	dh $@ --with linktree

override_dh_auto_configure:
	dh_auto_configure
	if [ ! -f META.yml.dist ]; then cp -f META.yml META.yml.dist; fi

override_dh_auto_build:
	dh_auto_build
	cd po && for po in *.po; do \
		msgfmt -o $${po%%.po}.mo $$po; \
	done
	cd $(GUIDEDIR) && \
	perl -CDAS -I $(CURDIR)/blib/lib $(CURDIR)/blib/script/publican build \
	   --formats=html-desktop --publish --langs=all \
	   --common_config="$(CURDIR)/blib/datadir" \
	   --common_content="$(CURDIR)/blib/datadir/Common_Content"
ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# The tests build files that we install as example, if they are
	# not run do it ourselves
	cd $(GUIDEDIR) && \
	perl -CDAS -I $(CURDIR)/blib/lib $(CURDIR)/blib/script/publican update_pot
	cd $(GUIDEDIR) && \
	perl -CDAS -I $(CURDIR)/blib/lib $(CURDIR)/blib/script/publican update_po \
		--langs=de-DE
endif

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	LC_ALL=C dh_auto_test
endif

override_dh_auto_install:
	dh_auto_install
	cd po && for mo in *.mo; do \
		lang=$${mo%%.mo}; \
		install -m 644 -D $$mo $(CURDIR)/debian/publican/usr/share/locale/$$lang/LC_MESSAGES/publican.mo; \
	done

override_dh_installdocs:
	dh_installdocs
	mv $(GUIDEDIR)/publish $(DOCDIR)/Users_Guide

override_dh_compress:
	# Examples dir contain files that should not be compressed
	# otherwise publican will not recognize them
	dh_compress -X/examples/
	# Use hardlinks to deduplicate files and save space
	rdfind -makehardlinks true -outputname /dev/null debian/publican/usr/share/publican

override_dh_auto_clean:
	dh_auto_clean
	rm -f po/*.mo
	# Created and not cleaned by t/910.publican.Users_Guide.t
	rm -rf $(GUIDEDIR)/de-DE $(GUIDEDIR)/pot

	# Removed during build process.
	if [ -f META.yml.dist ]; then mv -f META.yml.dist META.yml; fi