Debian lenny version packages
[pkg-perl] / deb-src / libtest-harness-perl / libtest-harness-perl-3.12 / debian / rules
1 #!/usr/bin/make -f
2 # This debian/rules file is provided as a template for normal perl
3 # packages. It was created by Marc Brockschmidt <marc@dch-faq.de> for
4 # the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
5 # be used freely wherever it is useful.
6
7 # Uncomment this to turn on verbose mode.
8 #export DH_VERBOSE=1
9
10 include /usr/share/quilt/quilt.make
11
12 # If set to a true value then MakeMaker's prompt function will
13 # always return the default without waiting for user input.
14 export PERL_MM_USE_DEFAULT=1
15
16 ifndef PERL
17 PERL = /usr/bin/perl
18 endif
19
20 TMP     =$(CURDIR)/debian/tmp
21
22 build: build-stamp
23 build-stamp: $(QUILT_STAMPFN)
24         dh_testdir
25
26         $(PERL) Makefile.PL INSTALLDIRS=vendor
27         $(MAKE)
28         $(MAKE) test
29
30         touch build-stamp
31
32 clean: unpatch
33         dh_testdir
34         dh_testroot
35
36         dh_clean build-stamp install-stamp
37
38         [ ! -f Makefile ] || $(MAKE) realclean
39
40 install: install-stamp
41 install-stamp: build-stamp
42         dh_testdir
43         dh_testroot
44         dh_clean -k
45
46         $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
47
48         [ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
49         rm $(TMP)/usr/share/perl5/Test/HACKING.pod
50
51         dh_install -plibtest-harness-perl debian/tmp/*
52
53         touch install-stamp
54
55 binary-arch:
56 # We have nothing to do by default.
57
58 binary-indep: build install
59         dh_testdir
60         dh_testroot
61         dh_installdocs
62         dh_installexamples examples/*
63         dh_installchangelogs Changes
64         dh_perl
65         dh_compress
66         dh_fixperms
67         dh_installdeb
68         dh_gencontrol
69         dh_md5sums
70         dh_builddeb
71
72 binary: binary-indep binary-arch
73 .PHONY: build clean binary-indep binary-arch binary install