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.
7 # Uncomment this to turn on verbose mode.
10 # If set to a true value then MakeMaker's prompt function will
11 # always return the default without waiting for user input.
12 export PERL_MM_USE_DEFAULT=1
14 PACKAGE=$(shell dh_listpackages)
20 TMP =$(CURDIR)/debian/$(PACKAGE)
22 # Allow disabling build optimation by setting noopt in
25 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
35 # Add commands to compile the package here
36 $(PERL) Makefile.PL INSTALLDIRS=vendor
37 $(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH=""
45 # Add commands to clean up after the build process here
46 [ ! -f Makefile ] || $(MAKE) realclean
48 dh_clean build-stamp install-stamp
50 install: build install-stamp
56 # Add commands to install the package into debian/$PACKAGE_NAME here
58 $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
60 # As this is a architecture dependent package, we are not
61 # supposed to install stuff to /usr/share. MakeMaker creates
62 # the dirs, we delete them from the deb:
64 # For some reason, the next line doesn't work properly under
65 # Ubuntu 5.10. No time to figure it out, we'll just use -f
67 rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/share/perl5 || echo "Ignoring rmdir failure"
71 # Build architecture-independent files here.
72 binary-indep: build install
73 # We have nothing to do by default.
75 # Build architecture-dependent files here.
76 binary-arch: build install
79 cp LICENSE debian/copyright
80 dh_installdocs README TODO
85 dh_installchangelogs Changes
99 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
101 binary: binary-indep binary-arch
102 .PHONY: build clean binary-indep binary-arch binary