initial dh-make-perl
[liburi-template-perl.git] / 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         # Add commands to compile the package here
30         $(PERL) Build.PL installdirs=vendor
31         OPTIMIZE="-Wall -O2 -g" $(PERL) Build
32
33         touch build-stamp
34
35 clean:
36         dh_testdir
37         dh_testroot
38
39         # Add commands to clean up after the build process here
40         [ ! -f Build ] || $(PERL) Build distclean
41
42         dh_clean build-stamp install-stamp
43
44 install: build install-stamp
45 install-stamp:
46         dh_testdir
47         dh_testroot
48         dh_clean -k
49
50         # Add commands to install the package into debian/$PACKAGE_NAME here
51         $(PERL) Build test
52         $(PERL) Build install destdir=$(TMP)
53
54         touch install-stamp
55
56 binary-arch:
57 # We have nothing to do by default.
58
59 binary-indep: build install
60         dh_testdir
61         dh_testroot
62 #       dh_installcron
63 #       dh_installmenu
64 #       dh_installexamples
65         dh_installdocs 
66         dh_installchangelogs 
67         dh_perl
68         dh_link
69         dh_strip
70         dh_compress
71         dh_fixperms
72         dh_installdeb
73         dh_gencontrol
74         dh_md5sums
75         dh_builddeb
76
77 source diff:                                                                  
78         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
79
80 binary: binary-indep binary-arch
81 .PHONY: build clean binary-indep binary-arch binary