File: rules

package info (click to toggle)
libapache-mod-perl 1.26-3.0woody1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,832 kB
  • ctags: 1,321
  • sloc: perl: 7,571; ansic: 5,480; sh: 375; makefile: 145
file content (101 lines) | stat: -rwxr-xr-x 3,216 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEV_DPKG_VERSION := $(shell dpkg -s apache-dev | awk '/Version:/ {print $2}')
DEV_VERSION := $(shell echo $(DEV_DPKG_VERSION) | sed "s/^Version: \(.*\)-.*$$/\1/")
# (From the egcs packaging)
NEXTVERNO := $(shell echo $(DEV_VERSION) | awk -F. '{OFS="."; $$NF = $$NF + 1; print}')

# PERL_VER := $(shell /usr/bin/perl debian/perl_version)
# NEXT_PERL_VER := $(shell /usr/bin/perl debian/perl_version next)

PERL := /usr/bin/perl

# ifeq ($(shell $(PERL) -MConfig -e 'print "$$Config{useshrplib}"'), true)
LIBPERL := -lperl

build: build-stamp
build-stamp:
	dh_testdir

	$(PERL) Makefile.PL USE_APXS=1 WITH_APXS=/usr/bin/apxs \
		PERL_SECTIONS=1 PERL_SSI=1 PERL_METHOD_HANDLERS=1 ALL_HOOKS=1 \
		PERL_TIE_TABLES=1 PERL_DIRECTIVE_HANDLERS=1 PERL_STACKED_HANDLERS=1 \
		PERL_TRACE=0 PERL_LOG_API=1 PERL_URI_API=1 PERL_UTIL_API=1 \
		PERL_TABLE_API=1 PERL_FILE_API=1 \
		INSTALLDIRS=vendor # PERL_DEBUG=1
	$(MAKE) OPTIMIZE="-O2 -g -Wall"
	touch build-stamp

clean:
	dh_testdir
	rm -f build-stamp
	dh_clean

	rm -f lib/Apache/MyConfig.pm t/docs/test.shtml \
		 t/net/config.pl t/net/perl/cgi.pl t/report t/conf/httpd.conf{,.old} \
		 t/httpd.conf apaci/find_source lib/mod_perl_hooks.pm
	find . -name .tmp.\* -exec rm -rf {} \;
	([ -f Makefile ] && touch Makefile && $(MAKE) distclean) || true
	chmod -R u+w .

# Build architecture-independent files here.
binary-indep: build
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build
	dh_testversion
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the files into debian/tmp
	$(MAKE) PREFIX=`pwd`/debian/tmp/usr install_vendor

	find `pwd`/debian/tmp \( -name .packlist -o -name perllocal.pod \) -exec \
	  rm -f '{}' \;
	# Why does this return nonzero?
	-find `pwd`/debian/tmp -type d -print0 | xargs -0 \
	  --no-run-if-empty rmdir -p --ignore-fail-on-non-empty

	mkdir -p debian/tmp/usr/lib/apache/1.3
	cp apaci/libperl.so debian/tmp/usr/lib/apache/1.3/mod_perl.so
	chmod 644 debian/tmp/usr/lib/apache/1.3/mod_perl.so
	cp debian/400mod_perl.info debian/tmp/usr/lib/apache/1.3/400mod_perl.info

	dh_installdocs
	cp -a eg/ debian/tmp/usr/share/doc/libapache-mod-perl/examples
	(cd debian/tmp/usr/share/doc/libapache-mod-perl && mv Changes changelog)

	find `pwd`/debian/tmp -type f \( -name \*.pm -o -name \*.pl \) \
	  -exec chmod a-x '{}' \;

	find `pwd`/debian/tmp -type f -name .cvsignore -exec rm '{}' ';'

	find `pwd`/debian/tmp -type f -name mod_perl.exp -exec rm '{}' ';'

	dh_installmanpages
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_shlibdeps
	dh_installdeb
	dh_perl
	dh_gencontrol -- -VTHISDEV="$(DEV_VERSION)" \
		-VNEXTDEV="$(NEXTVERNO)"
	dh_md5sums
	dh_builddeb

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary