er.. use a proper version number
[libwww-opensearch-perl.git] / debian / rules
1 #!/usr/bin/make -f
2 # Debian Customisations Copyright 2006 Ian Beckwith <ianb@nessie.mcc.ac.uk>
3 # Based on a template by Marc Brockschmidt <marc@dch-faq.de>
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 # If set to a true value then MakeMaker's prompt function will
9 # always return the default without waiting for user input.
10 export PERL_MM_USE_DEFAULT=1
11
12 PACKAGE=libwww-opensearch-perl
13
14 ifndef PERL
15 PERL = /usr/bin/perl
16 endif
17
18 TMP     =$(CURDIR)/debian/$(PACKAGE)
19
20 build: build-stamp
21 build-stamp:
22         dh_testdir
23
24         $(PERL) Makefile.PL INSTALLDIRS=vendor
25         $(MAKE) 
26
27         touch build-stamp
28
29 clean:
30         dh_testdir
31         dh_testroot
32
33         [ ! -f Makefile ] || $(MAKE) realclean
34
35         dh_clean build-stamp install-stamp
36
37 install: build install-stamp
38 install-stamp:
39         dh_testdir
40         dh_testroot
41         dh_clean -k
42
43         $(MAKE) test
44         $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
45
46         # As this is a architecture independent package, we are not
47         # supposed to install stuff to /usr/lib. MakeMaker creates
48         # the dirs, we delete them from the deb:
49         rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
50
51         touch install-stamp
52
53 binary-arch:
54 # We have nothing to do by default.
55
56 binary-indep: build install
57         dh_testdir
58         dh_testroot
59         dh_installdocs README
60         dh_installchangelogs Changes
61         dh_perl
62         dh_link
63         dh_compress
64         dh_fixperms
65         dh_installdeb
66         dh_gencontrol
67         dh_md5sums
68         dh_builddeb
69
70 binary: binary-indep binary-arch
71 .PHONY: build clean binary-indep binary-arch binary