2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Uncomment this to turn on verbose mode.
8 include /usr/share/quilt/quilt.make
10 # Define the perl interpreter
14 PACKAGE = $(shell dh_listpackages)
16 TMP = $(CURDIR)/debian/$(PACKAGE)
18 configure: configure-stamp
22 perl Makefile.PL verbose INSTALLDIRS=vendor
27 build: patch build-stamp
28 build-stamp: configure-stamp
39 [ ! -e Makefile ] || $(MAKE) distclean
41 dh_clean build-stamp configure-stamp
49 $(MAKE) install PREFIX=$(TMP)/usr
51 # Remove any empty directories
53 find $(TMP)/usr -type d -empty -print0 | xargs --null --no-run-if-empty rmdir -p --ignore-fail-on-non-empty
55 # Build architecture-independent files here.
56 binary-arch: build install
57 # We have nothing to do by default.
59 # Build architecture-dependent files here.
60 binary-indep: build install
66 dh_installchangelogs Changes
67 dh_installexamples examples/*
75 binary: binary-indep binary-arch
76 .PHONY: build clean binary-indep binary-arch binary install configure