Debian lenny version packages
[pkg-perl] / deb-src / libtest-warn-perl / libtest-warn-perl-0.11 / 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 # If set to a true value then MakeMaker's prompt function will
11 # always return the default without waiting for user input.
12 export PERL_MM_USE_DEFAULT=1
13
14 include /usr/share/quilt/quilt.make
15
16 PERL   ?= /usr/bin/perl
17 PACKAGE = $(shell dh_listpackages)
18 TMP     = $(CURDIR)/debian/$(PACKAGE)
19
20 build: build-stamp
21 build-stamp: $(QUILT_STAMPFN)
22         dh_testdir
23         $(PERL) Makefile.PL INSTALLDIRS=vendor
24         $(MAKE)
25         $(MAKE) test
26         touch $@
27
28 clean: unpatch
29         dh_testdir
30         dh_testroot
31         dh_clean build-stamp install-stamp
32         [ ! -f Makefile ] || $(MAKE) realclean
33
34 install: install-stamp
35 install-stamp: build-stamp
36         dh_testdir
37         dh_testroot
38         dh_clean -k
39         $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
40         [ ! -d $(TMP)/usr/lib/perl5 ] || \
41                 rmdir --ignore-fail-on-non-empty --parents --verbose \
42                 $(TMP)/usr/lib/perl5
43         touch $@
44
45 binary-arch:
46 # We have nothing to do here for an architecture-independent package
47
48 binary-indep: build install
49         dh_testdir
50         dh_testroot
51         dh_installdocs
52         dh_installchangelogs Changes
53         dh_perl
54         dh_compress
55         dh_fixperms
56         dh_installdeb
57         dh_gencontrol
58         dh_md5sums
59         dh_builddeb
60
61 binary: binary-indep binary-arch
62 .PHONY: build clean binary-indep binary-arch binary install