File: rules

package info (click to toggle)
modsecurity-apache 2.9.7-1%2Bdeb12u1
  • links: PTS
  • area: main
  • in suites:
  • size: 10,440 kB
  • sloc: ansic: 51,935; sh: 4,516; perl: 2,340; cpp: 1,930; makefile: 620; xml: 6
file content (94 lines) | stat: -rwxr-xr-x 2,360 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
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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

build: build-arch build-indep
build-arch: build-stamp
build-indep:
# Nothing to do here
build-stamp:
	dh_testdir
	dh_autoreconf
	./configure --prefix=/usr --with-apxs=/usr/bin/apxs2 --with-apr=/usr/bin/apr-config --with-lua=/usr/include/lua5.1 --with-pcre2 --enable-pcre-jit --enable-pcre-study CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)'
	# remove rpath
	sed -i -r 's/(hardcode_into_libs)=.*/\1=no/' $(CURDIR)/libtool
	cd apache2 && $(MAKE)
	cd mlogc && $(MAKE)
	# since we cannot rename with dh_install, create a copy of the file with the desired name
	cp mlogc/INSTALL mlogc/README.mlogc
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	[ ! -f Makefile ] || $(MAKE) distclean
	cd mlogc && [ ! -f Makefile ] || $(MAKE) clean
	rm -f mlogc/README.mlogc
	dh_autoreconf_clean
	dh_clean
	rm -f config.log

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	dh_install
	dh_apache2

binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i
	dh_installchangelogs -i
	dh_link -i
	dh_compress -i -Xexample
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
#	dh_installdebconf -a
	dh_installdocs -a
#	dh_installexamples -a
	cp modsecurity.conf-recommended debian/libapache2-mod-security2/etc/modsecurity
#	dh_installmenu -a
#	dh_installlogrotate -a
#	dh_installemacsen -a
#	dh_installpam -a
#	dh_installmime -a
#	dh_installinit -a
#	dh_installcron -a
#	dh_installman -a
#	dh_installinfo -a
#	dh_undocumented -a
	dh_installchangelogs CHANGES -a
	dh_link -a
	dh_strip -a
	# don't compress examples
	dh_compress -a -Xexample
	dh_fixperms -a
	chown www-data debian/libapache2-mod-security2/var/cache/modsecurity
#	dh_makeshlibs -a
	dh_installdeb -a
#	dh_perl -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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