File: rules

package info (click to toggle)
publican 2.8-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,404 kB
  • sloc: xml: 8,372; perl: 7,501; makefile: 34; sh: 6
file content (50 lines) | stat: -rwxr-xr-x 1,449 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
#!/usr/bin/make -f

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

%:
	dh $@

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 $(GUIDEDIR) && \
	perl -CA -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 -CA -I $(CURDIR)/blib/lib $(CURDIR)/blib/script/publican update_pot
	cd $(GUIDEDIR) && \
	perl -CA -I $(CURDIR)/blib/lib $(CURDIR)/blib/script/publican update_po \
		--langs=de-DE
endif

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

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/

override_dh_auto_clean:
	dh_auto_clean
	# 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