File: rules

package info (click to toggle)
libapache2-mod-perl2 2.0.9~1624218-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 11,840 kB
  • sloc: perl: 95,064; ansic: 14,522; makefile: 49; sh: 18
file content (65 lines) | stat: -rwxr-xr-x 1,882 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/make -f

PACKAGE = $(firstword $(shell dh_listpackages))
TMP     = $(CURDIR)/debian/$(PACKAGE)
MPR     = $(CURDIR)/ModPerl-Registry
APR     = $(CURDIR)/Apache-Reload
PVA     = $(shell perl -MConfig -e'print substr($$Config{vendorarch},1)')

%:
	dh $@ --parallel --with apache2

override_dh_auto_configure:
	dh_auto_configure -- \
		INSTALLDIRS=vendor \
		MP_TRACE=0 \
		MP_USE_DSO=1 \
		MP_USE_STATIC=0 \
		MP_CCOPTS="$(CFLAGS) -Wall" \
		MP_APR_CONFIG=/usr/bin/apr-config

override_dh_auto_build:
	dh_auto_build --parallel -- MODPERL_OPTIMIZE="$(CFLAGS)" OPTIMIZE="$(CFLAGS)"


override_dh_auto_test:
	APACHE_TEST_EXTRA_ARGS="-httpd_conf $(CURDIR)/debian/apache2.conf" \
		LANG=C \
		dh_auto_test --max-parallel=1

override_dh_clean:
	dh_clean
	rm -rf t/htdocs/hooks debian/docs
	find . -name 'pod2htmd.tmp' -exec rm '{}' \;
	find . -name 'pod2htmi.tmp' -exec rm '{}' \;
	find . -name 'Makefile.old' -exec rm '{}' \;
	rm -f Apache-Test/Apache-TestItSelf/t/SMOKE

override_dh_install:
	mkdir -p $(CURDIR)/debian/docs
	perl debian/transform_pod2html.pl $(CURDIR) docs debian
	dh_install
	mv $(TMP)/usr/bin/mp2bug $(TMP)/usr/share/libapache2-mod-perl2/
	rm -r $(TMP)/usr/bin/
	install -m755 debian/libapache2-mod-perl2.bug $(TMP)/usr/share/bug/libapache2-mod-perl2
	rm $(TMP)/$(PVA)/Apache2/Reload.pm
	rm $(TMP)/$(PVA)/Apache/SizeLimit.pm
	rm $(TMP)/$(PVA)/Apache/Reload.pm

override_dh_installman:
	dh_installman
	rm $(TMP)/usr/share/man/man3/Apache2::Reload.3pm
	rm $(TMP)/usr/share/man/man3/Apache::SizeLimit.3pm
	rm $(TMP)/usr/share/man/man3/Apache::Reload.3pm

override_dh_installexamples:
	dh_installexamples
	prename 's,\.,,' debian/libapache2-mod-perl2-dev/usr/share/doc/libapache2-mod-perl2-dev/examples/code/.debug-*

# These rules are needed because otherwise the build process
# tries to re-make the 'build' directory and fails
.PHONY: build

build:
	dh build