File: rules

package info (click to toggle)
libwww-search-perl 2.51.90%2B~cs6.78-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 1,216 kB
  • sloc: perl: 7,419; makefile: 36
file content (52 lines) | stat: -rwxr-xr-x 2,071 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/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