File: rules

package info (click to toggle)
libtemplate-perl 2.14-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 5,496 kB
  • ctags: 667
  • sloc: perl: 15,349; makefile: 62; xml: 7; sh: 5
file content (86 lines) | stat: -rwxr-xr-x 3,492 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatability version to use.
export DH_COMPAT=3

build:
	dh_testdir
	# make a backup of Config.pm before fixfile modifies unless its there
ifneq ($(wildcard lib/Template/Config.pm.backup),lib/Template/Config.pm.backup)
	cp lib/Template/Config.pm lib/Template/Config.pm.backup
endif
	# Build the files necessary for the package
	perl Makefile.PL TT_PREFIX=$(CURDIR)/debian/libtemplate-perl/usr/share/libtemplate-perl TT_IMAGES=/tt2/images TT_DOCS=y TT_SPLASH=y TT_EXAMPLES=y TT_DBI=n TT_LATEX_PATH=/usr/bin/latex TT_PDFLATEX_PATH=/usr/bin/pdflatex TT_DVIPS_PATH=/usr/bin/dvips TT_LATEX=n TT_QUIET=y TT_ACCEPT=y
	$(MAKE) OPTIMIZE="-O2 -g -Wall"

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp .defaults.cfg ./docs/ttree.cfg ./examples/ttree.cfg
	rm -rf ./docs/html/FAQ ./docs/html/Library ./docs/html/Manual ./docs/html/Modules ./docs/html/Release ./docs/html/Tools ./docs/html/Tutorial ./docs/html/index.html
	rm -rf ./examples/html/html ./examples/html/ps ./examples/html/splash
	# Add here commands to clean up after the build process.
	-$(MAKE) clean
	rm -rf ./Makefile.old ./xs/Makefile.old
	# test to see if the Config.pm.backup exists
ifeq ($(wildcard lib/Template/Config.pm.backup),lib/Template/Config.pm.backup)
	cp -f lib/Template/Config.pm.backup lib/Template/Config.pm
	rm lib/Template/Config.pm.backup
endif
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	# install the package into debian/libtemplate-perl
	$(MAKE) install_vendor tt2_install tt2_splash tt2_html_docs tt2_examples PREFIX=$(CURDIR)/debian/libtemplate-perl/usr
	perl -p -i -e "s|^(\s*.INSTDIR\s*=\s*)\'.*?\'|\1\'/usr/share/libtemplate-perl\'|" debian/libtemplate-perl/usr/lib/perl5/Template/Config.pm
	# make lintian stop complaining
	chmod -x debian/libtemplate-perl/usr/lib/perl5/Template/Plugin/DBI.pm

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -plibtemplate-perl
	dh_testroot -plibtemplate-perl
	dh_installdirs -plibtemplate-perl
	dh_installdocs -plibtemplate-perl README TODO
	dh_installman -plibtemplate-perl
	dh_installchangelogs -plibtemplate-perl Changes
	dh_strip -plibtemplate-perl
	dh_link -plibtemplate-perl
	dh_compress -plibtemplate-perl
	dh_fixperms -plibtemplate-perl
	dh_installdeb -plibtemplate-perl
	dh_perl -plibtemplate-perl
	dh_shlibdeps -plibtemplate-perl
	dh_gencontrol -plibtemplate-perl
	dh_md5sums -plibtemplate-perl
	dh_builddeb -plibtemplate-perl

# Build architecture independent packages here
binary-indep: binary-indep-doc

# build the documenation package here
binary-indep-doc: build install
	dh_testdir -plibtemplate-perl-doc
	dh_testroot -plibtemplate-perl-doc
	dh_installdirs -plibtemplate-perl-doc
	dh_installdocs -plibtemplate-perl-doc ./docs/README ./docs/html ./docs/lib ./docs/src ./docs/style
	dh_installexamples -plibtemplate-perl-doc ./examples/README ./examples/html ./examples/lib ./examples/src
	dh_installchangelogs -plibtemplate-perl-doc
	dh_link -plibtemplate-perl-doc
	dh_compress -plibtemplate-perl-doc
	dh_fixperms -plibtemplate-perl-doc
	dh_installdeb -plibtemplate-perl-doc
	dh_gencontrol -plibtemplate-perl-doc
	dh_md5sums -plibtemplate-perl-doc
	dh_builddeb -plibtemplate-perl-doc

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure