File: rules

package info (click to toggle)
libtfbs-perl 0.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,508 kB
  • sloc: perl: 10,728; makefile: 1,400; ansic: 1,228; sh: 9
file content (46 lines) | stat: -rwxr-xr-x 1,187 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie

CFLAGS += $(CPPFLAGS)

include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_auto_clean:
	rm --force Makefile Makefile.old

override_dh_auto_configure:
	echo "n" | perl Makefile.PL INSTALLDIRS=vendor
	$(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH="" OTHERLDFLAGS="$(LDFLAGS)"

# Do not run network test unless in maintainer mode.
ifneq (1,$(DEB_MAINTAINER_MODE))
TEST_FILES := $(filter-out t/04_DB_TRANSFAC.t,$(shell echo t/*.t))
else
TEST_FILES := $(shell echo t/*.t)
endif

ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	prove --blib $(TEST_FILES) Ext/t/*.t
endif

override_dh_installexamples:
	dh_installexamples
	mkdir -p debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/examples/Ext
	cp -a Ext/t debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/examples/Ext
	for pl in `grep -Rl '#!/usr/bin/env[[:space:]]\+perl' debian/*/usr/*` ; do \
	    sed -i '1s?^#!/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
	done

override_dh_perl:
	dh_perl
	dh_pdl

override_dh_fixperms:
	dh_fixperms
	find debian -name pwmsearch.bundle -exec chmod -x \{\} \;