Added correct PATH and SBOX_REDIRECT_IGNORE and PERL5LIB envs in rules for libwww...
[pkg-perl] / deb-src / libwww-mechanize-perl / libwww-mechanize-perl-1.34 / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 # This is the debhelper compatibility version to use.
9 #export DH_COMPAT=4
10
11 include /usr/share/quilt/quilt.make
12
13 export SBOX_REDIRECT_IGNORE:=/usr/bin/perl
14 unexport PERL5LIB
15 export PATH:=/usr/bin/dh7:/usr/bin:$(PATH)
16
17 PERL=/usr/bin/perl
18 PACKAGE=$(shell dh_listpackages)
19
20 PKGROOT=$(CURDIR)/debian/$(PACKAGE)/usr
21 ETCROOT=$(PKGROOT)/share/$(PACKAGE)
22
23 build: build-stamp
24 build-stamp: $(QUILT_STAMPFN)
25         dh_testdir
26         # Add here commands to compile the package.
27         $(PERL) Makefile.PL verbose INSTALLDIRS=vendor --local --mech-dump
28         $(MAKE)
29         NOINTERNET=1 $(MAKE) test
30         touch $@
31
32 clean: unpatch
33         dh_testdir
34         dh_testroot
35         dh_clean build-stamp install-stamp
36         [ ! -f Makefile ] || $(MAKE) realclean
37         dh_clean
38
39 install: install-stamp
40 install-stamp: build-stamp
41         dh_testdir
42         dh_testroot
43         dh_clean -k
44         $(MAKE) install PREFIX=$(CURDIR)/debian/$(PACKAGE)/usr
45         install -d $(ETCROOT)
46         install -m 644 $(CURDIR)/etc/* $(ETCROOT)
47         [ ! -d $(CURDIR)/debian/$(PACKAGE)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(CURDIR)/debian/$(PACKAGE)/usr/lib/perl5
48         touch $@
49
50 binary-arch:
51
52 binary-indep: build install
53         dh_testdir
54         dh_testroot
55         dh_installdocs
56         dh_installchangelogs Changes
57         dh_compress
58         dh_fixperms
59         dh_installdeb
60         dh_perl
61         dh_gencontrol
62         dh_md5sums
63         dh_builddeb
64
65 binary: binary-indep binary-arch
66 .PHONY: build clean binary-indep binary-arch binary install configure