Added correct PATH and SBOX_REDIRECT_IGNORE and PERL5LIB envs in rules for libspiffy...
[pkg-perl] / deb-src / libspiffy-perl / libspiffy-perl-0.30 / 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         $(MAKE) test
28         touch $@
29
30 clean:
31         dh_testdir
32         dh_testroot
33         dh_clean build-stamp install-stamp
34         [ ! -f Makefile ] || $(MAKE) realclean
35
36 install: install-stamp
37 install-stamp: build-stamp
38         dh_testdir
39         dh_testroot
40         dh_clean -k
41         $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
42
43         # convert broken *roff from UTF-8 encoded modules
44         sed -i -e 's/A\\\*~X/\\\[:o\]/' $(TMP)/usr/share/man/man3/Spiffy.3pm
45
46         [ ! -d $(TMP)/usr/lib/perl5 ] || \
47                 rmdir --ignore-fail-on-non-empty --parents --verbose \
48                 $(TMP)/usr/lib/perl5
49         touch $@
50
51 binary-arch:
52 # We have nothing to do here for an architecture-independent package
53
54 binary-indep: build install
55         dh_testdir
56         dh_testroot
57         dh_installdocs
58         dh_installchangelogs Changes
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