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# If set to a true value then MakeMaker's prompt function will
11# always return the default without waiting for user input.
12export PERL_MM_USE_DEFAULT=1
13
14PACKAGE=$(shell dh_listpackages)
15
16ifndef PERL
17PERL = /usr/bin/perl
18endif
19
20TMP     =$(CURDIR)/debian/$(PACKAGE)
21
22build: build-stamp
23build-stamp:
24	dh_testdir
25
26	# As this is a architecture independent package, we are not
27	# supposed to install stuff to /usr/lib. MakeMaker creates
28	# the dirs, we prevent this by setting the INSTALLVENDORARCH
29	# and VENDORARCHEXP environment variables.
30
31	# Add commands to compile the package here
32	$(PERL) Makefile.PL INSTALLDIRS=vendor \
33		INSTALLVENDORARCH=/usr/share/perl5/ \
34		VENDORARCHEXP=/usr/share/perl5/
35	$(MAKE)
36	$(MAKE) test
37
38	touch $@
39
40clean:
41	dh_testdir
42	dh_testroot
43
44	dh_clean build-stamp install-stamp
45
46	# Add commands to clean up after the build process here
47	[ ! -f Makefile ] || $(MAKE) realclean
48
49install: install-stamp
50install-stamp: build-stamp
51	dh_testdir
52	dh_testroot
53	dh_clean -k
54
55	# Add commands to install the package into debian/$PACKAGE_NAME here
56	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
57
58	touch $@
59
60binary-arch:
61# We have nothing to do here for an architecture-independent package
62
63binary-indep: build install
64	dh_testdir
65	dh_testroot
66	dh_installexamples
67	dh_installdocs README t/bugs.t t/README contrib/README
68	dh_installchangelogs
69	dh_perl
70	dh_compress
71	dh_fixperms
72	dh_installdeb
73	dh_gencontrol
74	dh_md5sums
75	dh_builddeb
76
77source diff:
78	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
79
80binary: binary-indep binary-arch
81.PHONY: build clean binary-indep binary-arch binary
82