3b187174c61d1308aec62b5fbbe2e169f0e204c2
[pkg-perl] / deb-src / libmodule-pluggable-perl / libmodule-pluggable-perl-3.8 / 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 # It was later modified by Jason Kohles <email@jasonkohles.com>
8 # http://www.jasonkohles.com/ to support Module::Build installed modules
9
10 # Uncomment this to turn on verbose mode.
11 #export DH_VERBOSE=1
12
13 # If set to a true value then MakeMaker's prompt function will
14 # always return the default without waiting for user input.
15 export PERL_MM_USE_DEFAULT=1
16
17 PACKAGE=$(shell dh_listpackages)
18
19 ifndef PERL
20 PERL = /usr/bin/perl
21 endif
22
23 TMP     =$(CURDIR)/debian/$(PACKAGE)
24
25 build: build-stamp
26 build-stamp:
27         dh_testdir
28
29         $(PERL) Makefile.PL INSTALLDIRS=vendor
30         $(MAKE)
31         $(MAKE) test
32
33         touch $@
34
35 clean:
36         dh_testdir
37         dh_testroot
38
39         dh_clean build-stamp install-stamp
40         [ ! -f Makefile ] || $(MAKE) realclean
41
42 install: install-stamp
43 install-stamp: build-stamp
44         dh_testdir
45         dh_testroot
46         dh_clean -k
47
48         $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
49         [ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(TMP)/usr/lib/perl5
50
51         touch $@
52
53 binary-arch:
54 # We have nothing to do here for an architecture-independent package
55
56 binary-indep: build install
57         dh_testdir
58         dh_testroot
59         dh_installdocs
60         dh_installchangelogs Changes
61         dh_perl
62         dh_compress
63         dh_fixperms
64         dh_installdeb
65         dh_gencontrol
66         dh_md5sums
67         dh_builddeb
68
69 source diff:
70         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
71
72 binary: binary-indep binary-arch
73 .PHONY: build clean binary-indep binary-arch binary