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