File: rules

package info (click to toggle)
libapache-mod-jk 1%3A1.2.30-1squeeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 9,544 kB
  • ctags: 4,943
  • sloc: ansic: 53,961; xml: 12,930; sh: 9,363; java: 1,921; perl: 1,004; makefile: 275; awk: 59
file content (110 lines) | stat: -rwxr-xr-x 2,908 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
102
103
104
105
106
107
108
109
110
#!/usr/bin/make -f

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

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

CFLAGS = -Wall -g

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

build: build-stamp
build-stamp:  
	dh_testdir
	
	cp -a native native-apache2
	
	touch build-stamp


build-apache20:
	dh_testdir
#	-$(MAKE) -C native clean 
	cd native-apache2 && ./configure --with-apxs=/usr/bin/apxs2
	sed -i -e 's/^LIBTOOL = .*$$/LIBTOOL = \/bin\/sh ..\/libtool/' native-apache2/common/Makefile
	$(MAKE) -C native-apache2


build-doc:
	cd xdocs && install -d ../build/docs/ && cp -R * ../build/docs/
	cd build/docs && for i in `find . -name '*.xml'`; do xsltproc style.xsl $$i > `dirname $$i`/`basename $$i .xml`.html; done
	cd build/docs && find . -name '*.xml' -exec rm -f {} \;
	cd build/docs && rm -f style.xsl BUILDING
	cd build/docs/miscellaneous && lynx -dump -nolist changelog.html > ../changelog


## -------- CLEAN TARGETS
clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp 
	rm -f native/common/portable.h native/common/stamp-h1	
	rm -rf build
	rm -f native/apache-2.0/Makefile native/apache-2.0/Makefile.apxs
	rm -f native/common/Makefile native/common/list.mk
	rm -f native/common/jk_types.h
	rm -f native/jni/Makefile native/Makefile native/libtool
	rm -f native/config.status native/config.log
	rm -f native/apache-2.0/mod_jk.o
	rm -f native/apache-2.0/mod_jk.la native/apache-2.0/mod_jk.lo
	rm -f native/apache-2.0/mod_jk.a native/apache-2.0/mod_jk.so*
	rm -f native/common/*.lo native/common/*.o
	rm -rf native/apache-2.0/.libs native/common/.libs
	rm -rf native-apache2
	dh_clean


install: install-indep install-arch
install-indep:
	dh_testdir
	dh_testroot
	dh_clean -k -i
	dh_installdirs -i
	dh_install -i

install-arch:
	dh_testdir
	dh_testroot
	dh_clean -k -a
	dh_installdirs -a
	cp native-apache2/apache-2.0/mod_jk.so debian/libapache2-mod-jk/usr/lib/apache2/modules/mod_jk.so
	dh_install -a


# Build architecture-independent files here.
binary-indep: build-doc install-indep	
	dh_testdir -i 
	dh_testroot -i
	dh_installchangelogs -i
	dh_installexamples -i
	dh_installdocs -i
	dh_compress -i -Xchangelog.html
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build build-apache20 install-arch
	dh_testdir -a 
	dh_testroot -a
	dh_installchangelogs -a
	dh_installdocs -a
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -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 install-indep install-arch