#!/usr/bin/make -f PKG:=$(shell dh_listpackages) TMP:=$(CURDIR)/debian/$(PKG) %: dh $@ # We had to patch Makefile.PL as otherwise the sub-directory Makefile.PL's # are found, run and failed. Then as the patch is unapplied at the end # Makefile is older than Makefile.PL. Makefile.PL then tries to recreate # Makefile but is now unpatched. # # We also disable the bundled Module::Install files by moving them out of # the way in auto_configure/auto_clean override_dh_auto_clean: if [ -f Makefile ]; then touch Makefile; fi dh_auto_clean [ ! -d $(CURDIR)/inc.save ] || mv $(CURDIR)/inc.save $(CURDIR)/inc for COMPONENT in ebay firstgov googlism jobserve pubmed; do \ dh_auto_clean --sourcedirectory=$(CURDIR)/$${COMPONENT}; \ [ ! -d $(CURDIR)/$${COMPONENT}/inc.save ] || mv $(CURDIR)/$${COMPONENT}/inc.save $(CURDIR)/$${COMPONENT}/inc; \ done override_dh_auto_configure: [ ! -d $(CURDIR)/inc ] || mv $(CURDIR)/inc $(CURDIR)/inc.save dh_auto_configure for COMPONENT in ebay firstgov googlism jobserve pubmed; do \ [ ! -d $(CURDIR)/$${COMPONENT}/inc ] || mv $(CURDIR)/$${COMPONENT}/inc $(CURDIR)/$${COMPONENT}/inc.save; \ dh_auto_configure --sourcedirectory=$(CURDIR)/$${COMPONENT}; \ done override_dh_auto_build: dh_auto_build for COMPONENT in ebay firstgov googlism jobserve pubmed; do \ dh_auto_build --sourcedirectory=$(CURDIR)/$${COMPONENT}; \ done override_dh_auto_test: NO_NETWORK=1 PERL5LIB=blib/lib PATH=blib/script:${PATH} LC_ALL=C.UTF-8 dh_auto_test for COMPONENT in ebay firstgov googlism jobserve pubmed; do \ NO_NETWORK=1 PERL5LIB=$(CURDIR)/blib/lib LC_ALL=C.UTF-8 dh_auto_test --sourcedirectory=$(CURDIR)/$${COMPONENT}; \ done override_dh_auto_install: dh_auto_install for COMPONENT in ebay firstgov googlism jobserve pubmed; do \ dh_auto_install --sourcedirectory=$(CURDIR)/$${COMPONENT}; \ done mv $(TMP)/usr/bin/googlism.pl $(TMP)/usr/bin/googlism mv $(TMP)/usr/share/man/man1/googlism.pl.1p $(TMP)/usr/share/man/man1/googlism.1p # sed -i -e'1s/#!\/usr\/local\/bin\/perl/#/' $(TMP)/usr/share/perl5/WWW/Search/*.pm