| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
PKG:=$(shell dh_listpackages) |
| 4 |
TMP:=$(CURDIR)/debian/$(PKG) |
| 5 |
|
| 6 |
%: |
| 7 |
dh $@ |
| 8 |
|
| 9 |
# We had to patch Makefile.PL as otherwise the sub-directory Makefile.PL's |
| 10 |
# are found, run and failed. Then as the patch is unapplied at the end |
| 11 |
# Makefile is older than Makefile.PL. Makefile.PL then tries to recreate |
| 12 |
# Makefile but is now unpatched. |
| 13 |
# |
| 14 |
# We also disable the bundled Module::Install files by moving them out of |
| 15 |
# the way in auto_configure/auto_clean |
| 16 |
override_dh_auto_clean: |
| 17 |
if [ -f Makefile ]; then touch Makefile; fi |
| 18 |
dh_auto_clean |
| 19 |
[ ! -d $(CURDIR)/inc.save ] || mv $(CURDIR)/inc.save $(CURDIR)/inc |
| 20 |
for COMPONENT in ebay firstgov googlism jobserve pubmed; do \ |
| 21 |
dh_auto_clean --sourcedirectory=$(CURDIR)/$${COMPONENT}; \ |
| 22 |
[ ! -d $(CURDIR)/$${COMPONENT}/inc.save ] || mv $(CURDIR)/$${COMPONENT}/inc.save $(CURDIR)/$${COMPONENT}/inc; \ |
| 23 |
done |
| 24 |
|
| 25 |
override_dh_auto_configure: |
| 26 |
[ ! -d $(CURDIR)/inc ] || mv $(CURDIR)/inc $(CURDIR)/inc.save |
| 27 |
dh_auto_configure |
| 28 |
for COMPONENT in ebay firstgov googlism jobserve pubmed; do \ |
| 29 |
[ ! -d $(CURDIR)/$${COMPONENT}/inc ] || mv $(CURDIR)/$${COMPONENT}/inc $(CURDIR)/$${COMPONENT}/inc.save; \ |
| 30 |
dh_auto_configure --sourcedirectory=$(CURDIR)/$${COMPONENT}; \ |
| 31 |
done |
| 32 |
|
| 33 |
override_dh_auto_build: |
| 34 |
dh_auto_build |
| 35 |
for COMPONENT in ebay firstgov googlism jobserve pubmed; do \ |
| 36 |
dh_auto_build --sourcedirectory=$(CURDIR)/$${COMPONENT}; \ |
| 37 |
done |
| 38 |
|
| 39 |
override_dh_auto_test: |
| 40 |
NO_NETWORK=1 PERL5LIB=blib/lib PATH=blib/script:${PATH} LC_ALL=C.UTF-8 dh_auto_test |
| 41 |
for COMPONENT in ebay firstgov googlism jobserve pubmed; do \ |
| 42 |
NO_NETWORK=1 PERL5LIB=$(CURDIR)/blib/lib LC_ALL=C.UTF-8 dh_auto_test --sourcedirectory=$(CURDIR)/$${COMPONENT}; \ |
| 43 |
done |
| 44 |
|
| 45 |
override_dh_auto_install: |
| 46 |
dh_auto_install |
| 47 |
for COMPONENT in ebay firstgov googlism jobserve pubmed; do \ |
| 48 |
dh_auto_install --sourcedirectory=$(CURDIR)/$${COMPONENT}; \ |
| 49 |
done |
| 50 |
mv $(TMP)/usr/bin/googlism.pl $(TMP)/usr/bin/googlism |
| 51 |
mv $(TMP)/usr/share/man/man1/googlism.pl.1p $(TMP)/usr/share/man/man1/googlism.1p |
| 52 |
# sed -i -e'1s/#!\/usr\/local\/bin\/perl/#/' $(TMP)/usr/share/perl5/WWW/Search/*.pm |