#!/usr/bin/make -f package := $(shell egrep '^Package: ' debian/control | sed 's/^Package: //') build: build-stamp build-stamp: dh_testdir perl -I. Makefile.PL INSTALLDIRS=vendor $(MAKE) OPTIMIZE="-O2 -g -Wall" perl eg/mp3tag.PL perl eg/mp3tocddb.PL touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean dh_clean rm -f Makefile.old eg/mp3tag eg/mp3tocddb binary-arch: # nothing to do here binary-indep: build dh_testdir dh_testroot dh_clean $(MAKE) install DESTDIR=$(CURDIR)/debian/$(package) find `pwd`/debian/$(package) -type f -name .packlist | xargs -r rm -f -find `pwd`/debian/$(package) -type d -empty | xargs -r rmdir -p --ignore-fail-on-non-empty dh_installdocs README dh_installexamples eg/mp3tag eg/mp3tocddb mp3id dh_installchangelogs dh_compress -Xmp3tag -Xmp3id -Xmp3tocddb dh_fixperms dh_installdeb dh_perl dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep .PHONY: build clean binary-indep binary