File: rules

package info (click to toggle)
libapache-mod-jk 1%3A1.2.18-3etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 5,008 kB
  • ctags: 2,664
  • sloc: ansic: 20,014; sh: 8,661; xml: 7,304; perl: 617; makefile: 321; awk: 59
file content (136 lines) | stat: -rwxr-xr-x 3,894 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/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: patch build-stamp
build-stamp:  
	dh_testdir
	
	cp -a native native-apache2
	
	touch build-stamp


build-apache13:
	dh_testdir
#	-$(MAKE) -C native clean 
	cd native && ./configure --with-apxs=/usr/bin/apxs
	$(MAKE) -C native
#	exit 1

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 && lynx -dump -nolist changelog.html > changelog


## -------- CLEAN TARGETS
clean: clean-patched unpatch
clean-patched:
	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-1.3/Makefile native/apache-1.3/Makefile.apxs
	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-1.3/mod_jk.o
	rm -f native/apache-1.3/mod_jk.la native/apache-1.3/mod_jk.lo
	rm -f native/apache-1.3/mod_jk.a native/apache-1.3/mod_jk.so*
	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-1.3/.libs native/common/.libs
	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
	# install lintian overrides as we have a changelog.html used in the manual
	install -d $(CURDIR)/debian/libapache-mod-jk-doc/usr/share/lintian/overrides/
	install -m 644 $(CURDIR)/debian/libapache-mod-jk-doc.lintian $(CURDIR)/debian/libapache-mod-jk-doc/usr/share/lintian/overrides/libapache-mod-jk-doc
	dh_install -i

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


patch: patch-stamp
patch-stamp:
	dpatch apply-all
	touch patch-stamp

unpatch:
	dpatch deapply-all
	rm -rf patch-stamp debian/patched

# 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-apache13 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