~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/make -f
2
 
 
3
 
# apache2 debian/rules Makefile. Written 7-82001, by an extremely bored:
4
 
# Daniel Stone <daniel@sfarc.net>
5
 
#
6
 
# Shamelessly flogged from the original apache package, as it was apparently a
7
 
# good example of DBS. *shrug*
8
 
#
9
 
# So, credit to:
10
 
# Johnie Ingram <johnie@debian.org>
11
 
# Adam Heath <doogie@debian.org>
12
 
 
13
 
# Uncomment the following to turn on verbose output.
14
 
#export DH_VERBOSE=1
15
 
#export NOISY=1
 
1
#! /usr/bin/make -f 
 
2
 
 
3
# Code for httpd 2.1, based on apache2 and others.
 
4
# Copyright (C) Canonical Ltd, 2005
 
5
 
16
6
export DEB_BUILD_OPTIONS
 
7
export DH_OPTIONS
17
8
 
18
9
SHELL := sh -e
19
10
 
20
 
version=0.9.1
21
 
major=0
22
 
 
23
 
AP2_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p;' | sed -e 's/-.*//;')
24
 
 
25
 
export DH_COMPAT=4
26
 
export DH_OPTIONS
 
11
#enable dpatch
 
12
include /usr/share/dpatch/dpatch.make
 
13
 
 
14
# These are used for cross-compiling and for saving the configure script
 
15
# # from having to guess our platform (since we know it already)
 
16
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
17
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
18
 
 
19
CONFFLAGS += ac_cv_prog_AWK=mawk ac_cv_prog_LYNX_PATH=www-browser
27
20
 
28
21
AP2_COMMON_CONFARGS = --enable-layout=Debian --enable-so \
29
 
                      --with-program-name=apache2 --with-dbm=db43 \
30
 
                      --with-external-pcre=/usr \
31
 
                      --enable-logio --enable-userdir=shared \
32
 
                      --enable-ssl=shared --enable-deflate=shared \
 
22
                      --with-program-name=apache2  \
33
23
                      --with-ldap=yes --with-ldap-include=/usr/include \
34
24
                      --with-ldap-lib=/usr/lib \
35
 
                      --enable-ldap=shared --enable-auth-ldap=shared \
36
25
                      --with-suexec-caller=www-data \
37
 
                      --with-suexec-bin=/usr/lib/apache2/suexec2 \
 
26
                      --with-suexec-bin=/usr/lib/apache2/suexec \
38
27
                      --with-suexec-docroot=/var/www \
39
28
                      --with-suexec-userdir=public_html \
40
29
                      --with-suexec-logfile=/var/log/apache2/suexec.log \
41
 
                --enable-speling=shared --enable-include=shared \
42
 
                --enable-rewrite=shared --enable-cgid=shared \
43
 
                --enable-vhost-alias=shared --enable-info=shared \
44
 
                --enable-suexec=shared  \
45
 
                --enable-unique-id=shared --enable-usertrack=shared \
46
 
                --enable-expires=shared --enable-cern-meta=shared \
47
 
                --enable-mime-magic=shared --enable-headers=shared \
48
 
                --enable-auth-anon=shared --enable-proxy=shared \
49
 
                --enable-dav=shared --enable-dav-fs=shared \
50
 
                --enable-auth-dbm=shared  \
51
 
                --enable-cgi=shared --enable-asis=shared \
52
 
                --enable-imap=shared \
53
 
                --enable-ext-filter=shared \
54
 
                --enable-authn-dbm=shared --enable-authn-anon=shared \
55
 
                --enable-authz-dbm=shared --enable-auth-digest=shared \
56
 
                --enable-actions=shared \
57
 
                --enable-file-cache=shared --enable-cache=shared \
58
 
                --enable-disk-cache=shared --enable-mem-cache=shared 
 
30
                      --enable-suexec=shared --enable-authn-alias=shared \
 
31
                      --enable-authnz-ldap=shared  \
 
32
                      --enable-disk-cache=shared --enable-cache=shared \
 
33
                      --enable-mem-cache=shared --enable-file-cache=shared \
 
34
                      --enable-cern-meta=shared --enable-dumpio=shared --enable-ext-filter=shared \
 
35
                      --enable-charset-lite=shared --enable-cgi=shared \
 
36
                      --enable-dav-lock=shared --enable-log-forensic=shared \
 
37
                      --enable-log-config --enable-logio \
 
38
                      --enable-ldap=shared --enable-proxy=shared \
 
39
                      --enable-proxy-connect=shared --enable-proxy-ftp=shared \
 
40
                      --enable-proxy-http=shared --enable-proxy-ajp=shared \
 
41
                      --enable-proxy-balancer=shared --enable-ssl=shared \
 
42
                      --enable-authn-dbm=shared --enable-authn-anon=shared \
 
43
                      --enable-authn-dbd=shared --enable-authn-file=shared \
 
44
                      --enable-authn-default=shared --enable-authz-host=shared \
 
45
                      --enable-authz-groupfile=shared --enable-authz-user=shared \
 
46
                      --enable-authz-dbm=shared --enable-authz-owner=shared \
 
47
                      --enable-authnz-ldap=shared --enable-authz-default=shared \
 
48
                      --enable-auth-basic=shared --enable-auth-digest=shared \
 
49
                      --enable-dbd=shared --enable-deflate=shared \
 
50
                      --enable-include=shared --enable-filter=shared \
 
51
                      --enable-env=shared --enable-mime-magic=shared \
 
52
                      --enable-expires=shared --enable-headers=shared \
 
53
                      --enable-ident=shared --enable-usertrack=shared \
 
54
                      --enable-unique-id=shared --enable-setenvif=shared \
 
55
                      --enable-version=shared --enable-status=shared \
 
56
                      --enable-autoindex=shared --enable-asis=shared \
 
57
                      --enable-info=shared --enable-cgid=shared \
 
58
                      --enable-dav=shared --enable-dav-fs=shared \
 
59
                      --enable-vhost-alias=shared --enable-negotiation=shared \
 
60
                      --enable-dir=shared --enable-imagemap=shared \
 
61
                      --enable-actions=shared --enable-speling=shared \
 
62
                      --enable-userdir=shared --enable-alias=shared \
 
63
                      --enable-rewrite=shared --enable-mime=shared \
 
64
                      --with-apr=/usr/bin/apr-1-config \
 
65
                      --with-apr-util=/usr/bin/apu-1-config \
 
66
                      --with-pcre=yes
 
67
#
 
68
#                     This is insufficiently flexible.
 
69
#                     --enable-mods-shared=all --enable-modules=all 
59
70
 
60
 
AP2_CONFLAGS = $(CFLAGS) -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -g
61
 
#AP2_CONFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
62
 
AP2_LDFLAGS = -ldb-4.3 -lexpat
 
71
AP2_CONFLAGS = $(CFLAGS) -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall
 
72
#AP2_LDFLAGS = -ldl -lexpat -lcrypt -ldb-4.3
63
73
 
64
74
#support debug building
65
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
66
 
AP2_CONFLAGS += -O0
 
75
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 
76
AP2_CONFLAGS += -g -O0
67
77
else
68
78
AP2_CONFLAGS += -O2
69
79
endif
70
80
 
71
 
B=$(SOURCE_DIR)/apache2
72
 
BUILD=$(SOURCE_DIR)/apache2-build
73
 
include debian/scripts/vars
74
 
SHELL=/bin/bash
75
 
LIBTOOL=/usr/bin/libtool
 
81
BUILD=debian/build-tree
 
82
REALCURDIR=$(CURDIR)
76
83
INSTALL=/usr/bin/install
77
 
BUILDINFO=make dpkg-dev debian-policy debhelper
78
 
REALCURDIR=$(CURDIR)
79
 
FIRSTMPM=worker
80
 
PREFORKMPM=prefork
81
 
OTHERMPMS=perchild
82
 
THREADEDMPMS=worker perchild
83
 
BUILD_DIST=$(shell lsb_release -i | cut -f2)
84
 
 
85
 
source.make: $(STAMP_DIR)/source.make
86
 
$(STAMP_DIR)/source.make:
87
 
        $(MAKE) -f debian/sys-build.mk source.make
88
 
        # This is where we get our distribution-specific server signature from:
89
 
        sed -i -e 's/(" PLATFORM ")/($(BUILD_DIST))/' build-tree/apache2/server/core.c
90
 
 
91
 
extract: source.make
92
 
 
93
 
configure: $(STAMP_DIR)/configure
94
 
$(STAMP_DIR)/configure: $(STAMP_DIR)/source.make 
95
 
        for i in config.guess config.sub ltmain.sh; do \
96
 
                for j in $$(find $(B)/ -name $$i); do \
97
 
                        cp /usr/share/libtool/$$i $$j; \
98
 
                done; \
99
 
        done
100
 
        cd $(B) && ./buildconf
101
 
        touch $@ 
102
 
 
103
 
build: $(STAMP_DIR)/build-mpms 
104
 
$(STAMP_DIR)/build-mpms: $(STAMP_DIR)/configure
105
 
        dh_testdir
106
 
        for i in $(FIRSTMPM); do \
107
 
                mkdir -p $(BUILD)/$$i ;\
108
 
                cd $(BUILD)/$$i && ac_cv_prog_AWK=mawk CFLAGS="$(AP2_CONFLAGS)" LDFLAGS="$(AP2_LDFLAGS)" $(REALCURDIR)/$(B)/configure --srcdir=$(REALCURDIR)/$(B) $(AP2_COMMON_CONFARGS) $(AP2_CONFARGS) --with-mpm=$$i ;\
109
 
                $(MAKE); \
110
 
                cd $(REALCURDIR);\
111
 
        done
112
 
        for i in $(OTHERMPMS) $(PREFORKMPM); do \
113
 
                mkdir -p $(BUILD)/$$i ;\
114
 
                cd $(BUILD)/$$i && ac_cv_prog_AWK=mawk CFLAGS="$(AP2_CONFLAGS)" LDFLAGS="$(AP2_LDFLAGS)" $(REALCURDIR)/$(B)/configure --srcdir=$(REALCURDIR)/$(B) $(AP2_COMMON_CONFARGS) --with-mpm=$$i ;\
115
 
                $(MAKE); \
116
 
                cd $(REALCURDIR);\
117
 
        done
118
 
        touch $@ 
119
 
 
120
 
clean:
121
 
        dh_testdir
122
 
        dh_testroot
123
 
        rm -f $(STAMP_DIR)/configure $(STAMP_DIR)/build $(STAMP_DIR)/install 
124
 
        rm -rf $(BUILD)
125
 
        $(MAKE) -f debian/sys-build.mk source.clean
126
 
        rm -rf debian/stampdir debian.diff
127
 
        for i in $(FIRSTMPM) $(OTHERMPMS); do \
128
 
                rm -f debian/apache2-mpm-$$i.postinst ;\
129
 
                rm -f debian/apache2-mpm-$$i.prerm ;\
130
 
                rm -f debian/apache2-mpm-$$i.preinst ;\
131
 
                rm -f debian/apache2-mpm-$$i.init.d ;\
132
 
        done
133
 
        rm -f debian/apache2-mpm-prefork.prerm
134
 
        rm -f debian/apache2-mpm-prefork.init.d
135
 
        rm -f debian/apache2-common.init.d
 
84
 
 
85
clean: unpatch
 
86
        dh_testdir
136
87
        dh_clean
137
 
 
138
 
install: $(STAMP_DIR)/inst-mpms $(STAMP_DIR)/move 
139
 
 
140
 
$(STAMP_DIR)/inst-mpms: build
141
 
        dh_clean -k
142
 
        dh_installdirs
143
 
        for i in $(FIRSTMPM) $(PREFORKMPM); do \
144
 
                cd $(BUILD)/$$i && $(MAKE) DESTDIR=$(REALCURDIR)/debian/apache2-mpm-$$i install ; \
145
 
                cd $(REALCURDIR) ; \
146
 
        done
147
 
        for i in $(OTHERMPMS); do \
148
 
                $(INSTALL) -d $(REALCURDIR)/debian/apache2-mpm-$$i/usr/sbin/; \
149
 
                cd $(BUILD)/$$i && $(LIBTOOL) --mode=install $(INSTALL) apache2 $(REALCURDIR)/debian/apache2-mpm-$$i/usr/sbin/ ; \
150
 
                cd $(REALCURDIR) ; \
151
 
        done
152
 
 
153
 
$(STAMP_DIR)/move: $(STAMP_DIR)/inst-mpms
154
 
        dh_testroot
155
 
 
156
 
#install apr stuff.
157
 
        mv debian/apache2-mpm-worker/usr/include/apache2/apr* debian/libapr$(major)-dev/usr/include/apr-$(major)
158
 
        mv debian/apache2-mpm-worker/usr/include/apache2/apu* debian/libapr$(major)-dev/usr/include/apr-$(major)
159
 
        mv debian/apache2-mpm-worker/usr/lib/libapr*a debian/libapr$(major)-dev/usr/lib
160
 
        mv debian/apache2-mpm-worker/usr/lib/libapr*.so debian/libapr$(major)-dev/usr/lib
161
 
        mv debian/apache2-mpm-worker/usr/lib/libapr* debian/libapr$(major)/usr/lib
162
 
        sed -e 's|-I/home/thom/.* |-I/usr/include/apr-0 |' -e 's|-I/usr/local/src/Packages/.* |-I/usr/include/apr-0 |' -e 's|/usr/include/apache2|/usr/include/apr-0|' < debian/apache2-mpm-worker/usr/bin/apu-config > debian/libapr$(major)-dev/usr/bin/apu-config
163
 
        sed -e 's|-I/home/thom/.* |-I/usr/include/apr-0 |' -e 's|-I/usr/local/src/Packages/.* |-I/usr/include/apr-0 |' -e 's|/usr/include/apache2|/usr/include/apr-0|' < debian/apache2-mpm-worker/usr/bin/apr-config > debian/libapr$(major)-dev/usr/bin/apr-config
164
 
#       sed -e 's|-I/usr/local/src/Packages/.* |-I/usr/include/apache2 |' < debian/apache2-mpm-worker/usr/bin/apu-config > debian/libapr$(major)-dev/usr/bin/apu-config
165
 
#       sed -e 's|-I/usr/local/src/Packages/.* |-I/usr/include/apache2 |' < debian/apache2-mpm-worker/usr/bin/apr-config > debian/libapr$(major)-dev/usr/bin/apr-config
166
 
        rm -f debian/apache2-mpm-worker/usr/bin/apr-config debian/apache2-mpm-worker/usr/bin/apu-config
167
 
 
168
 
#install apache2 dev stuff
169
 
        for i in $(PREFORKMPM) $(FIRSTMPM); do \
 
88
        rm -rf $(BUILD) mpm-worker mpm-prefork mpm-event install 
 
89
        rm -f debian/apache2-mpm-worker.postinst debian/apache2-mpm-worker.preinst debian/apache2-mpm-worker.prerm
 
90
        rm -f debian/apache2-mpm-event.postinst debian/apache2-mpm-event.preinst debian/apache2-mpm-event.prerm
 
91
 
 
92
build: patch-stamp build-mpms 
 
93
build-mpms: mpm-worker mpm-prefork mpm-event
 
94
 
 
95
mpm-%:
 
96
        dh_testdir
 
97
        mkdir -p $(BUILD)/$*
 
98
        cd $(BUILD)/$* ;\
 
99
        CFLAGS="$(AP2_CONFLAGS)" $(CONFFLAGS) $(REALCURDIR)/configure --srcdir=$(REALCURDIR) $(AP2_COMMON_CONFARGS) $(AP2_CONFARGS) --with-mpm=$*  ;\
 
100
        $(MAKE)
 
101
        touch $@
 
102
 
 
103
install-%:
 
104
        dh_testdir
 
105
        dh_testroot
 
106
        dh_installdirs
 
107
        cd $(BUILD)/$* ;\
 
108
        $(MAKE) DESTDIR=$(REALCURDIR)/debian/apache2-mpm-$* install
 
109
 
 
110
install-common:
 
111
        dh_testdir
 
112
        dh_testroot
 
113
        dh_installdirs
 
114
        cd $(BUILD)/worker ;\
 
115
        $(MAKE) DESTDIR=$(REALCURDIR)/debian/tmp install
 
116
 
 
117
install-dev: 
 
118
        dh_testdir
 
119
        dh_testroot
 
120
        dh_installdirs
 
121
 
 
122
        for i in worker prefork; do \
170
123
                if [ "$$i" = "prefork" ]; then \
171
 
                        TARGET=prefork;\
172
 
                else\
173
 
                        TARGET=threaded;\
174
 
                fi;\
175
 
                mv debian/apache2-mpm-$$i/usr/include/apache2/* debian/apache2-$$TARGET-dev/usr/include/apache2/ ;\
176
 
                mv debian/apache2-mpm-$$i/usr/sbin/apxs debian/apache2-$$TARGET-dev/usr/bin/apxs2 ;\
177
 
                mv debian/apache2-mpm-$$i/usr/share/man/man8/apxs.8 debian/apache2-$$TARGET-dev/usr/share/man/man8/apxs2.8 ;\
178
 
                cp build-tree/apache2/build/special.mk debian/apache2-$$TARGET-dev/usr/share/apache2/build/special.mk ;\
179
 
                mv debian/apache2-mpm-$$i/usr/share/apache2/build/* debian/apache2-$$TARGET-dev/usr/share/apache2/build/ ;\
180
 
                sed -e "s,`pwd`/build-tree/apache2-build/$$i/srclib/apr/libapr-0.la,/usr/lib/libapr-0.la," \
181
 
                    -e "s,`pwd`/build-tree/apache2-build/$$i/srclib/apr-util/libaprutil-0.la,/usr/lib/libaprutil-0.la," \
182
 
                    -e "s,`pwd`/build-tree/apache2-build/$$i/srclib/pcre/libpcre.la,," \
183
 
                    -e "s,^EXTRA_INCLUDES =.*$$,EXTRA_INCLUDES = -I/usr/include/openssl -I/usr/include/apache2 -I/usr/include/apr-0," \
184
 
                    -e "s,^abs_srcdir =.*$$,abs_srcdir =," \
185
 
                    -e "s,^LIBTOOL =.*$$,LIBTOOL = /bin/sh /usr/bin/libtool --silent," \
186
 
                    -e "s,^SH_LIBTOOL =.*$$,SH_LIBTOOL = /bin/sh /usr/bin/libtool --silent," \
187
 
                    -e "s,APR_INCLUDEDIR =.*$$,APR_INCLUDEDIR = /usr/include/apr-0," \
188
 
                    -e "s,APU_INCLUDEDIR =.*$$,APU_INCLUDEDIR = /usr/include/apr-0," \
189
 
                    build-tree/apache2-build/$$i/build/config_vars.mk > debian/apache2-$$TARGET-dev/usr/share/apache2/build/config_vars.mk; \
190
 
        done
191
 
 
192
 
#apache2-utils stuff
193
 
        mv debian/apache2-mpm-worker/usr/sbin/ab debian/apache2-utils/usr/sbin/ab
194
 
        mv debian/apache2-mpm-worker/usr/share/man/man8/ab.8 debian/apache2-utils/usr/share/man/man8/ab.8
195
 
        cp build-tree/apache2/support/check_forensic debian/apache2-utils/usr/sbin/check_forensic
 
124
                        TARGET=prefork ;\
 
125
                else \
 
126
                        TARGET=threaded ;\
 
127
                fi ;\
 
128
                cp debian/apache2-mpm-$$i/usr/include/apache2/* debian/apache2-$$TARGET-dev/usr/include/apache2/ ;\
 
129
                cp debian/apache2-mpm-$$i/usr/share/apache2/build/* debian/apache2-$$TARGET-dev/usr/share/apache2/build/ ;\
 
130
                cp $(BUILD)/$$i/support/apxs debian/apache2-$$TARGET-dev/usr/bin/apxs2 ;\
 
131
        done
 
132
# Clean up config_vars.mk
 
133
        set -x ; for i in threaded prefork; do \
 
134
                ( cd debian/apache2-$$i-dev/usr/share/apache2/build/ ; \
 
135
                grep -v -E '(^|_)(CPP|C)FLAGS' config_vars.mk > tmp_config_vars.mk ; \
 
136
                printf "CPPFLAGS = %s\n" "`grep -E '(^|_)(CPPFLAGS|INCLUDES)' config_vars.mk | cut -d= -f 2- | tr ' ' '\n' | grep -E '^-([DI]|pthread)' | sort | uniq | tr '\n' ' '`" >> tmp_config_vars.mk ; \
 
137
                printf "CFLAGS = %s\n" "`grep -E '(^|_)(CPPFLAGS|CFLAGS|INCLUDES)' config_vars.mk | cut -d= -f 2- | tr ' ' '\n' | grep -E '^-(D|I/|pthread)'  | sort | uniq | tr '\n' ' '`" >> tmp_config_vars.mk ; \
 
138
                printf "NOTEST_CPPFLAGS = \n" >> tmp_config_vars.mk ; \
 
139
                printf "EXTRA_CPPFLAGS = \n" >> tmp_config_vars.mk ; \
 
140
                printf "EXTRA_CFLAGS = \n" >> tmp_config_vars.mk ; \
 
141
                mv tmp_config_vars.mk config_vars.mk ) ; \
 
142
        done
 
143
 
 
144
install-src:
 
145
        dh_testdir
 
146
        dh_testroot
 
147
        dh_installdirs
 
148
        tar czf debian/apache2-src/usr/src/apache2.tar.gz `find -mindepth 1 -maxdepth 1 -not -name debian`
 
149
 
 
150
install: build install-worker install-prefork install-common install-dev install-src
 
151
        dh_testroot
 
152
        dh_testdir
 
153
 
 
154
        #cleanup of death
 
155
        rm -rf debian/tmp/usr/include
 
156
        rm -rf debian/tmp/usr/share/apache2/build
 
157
        rm -f debian/tmp/usr/share/man/man8/httpd.8 # We install our own
 
158
        rm -f debian/tmp/usr/sbin/apxs debian/tmp/usr/sbin/apache2
 
159
 
 
160
        # DO NOT FALL FOR THE TEMPTATION TO MV INTO PACKAGES OR DOOM
 
161
        # WILL FIND YOU.  Use dh_install, this is just because dh_install
 
162
        # can't rename files
 
163
 
 
164
        mv debian/tmp/usr/share/man/man8/apxs.8 debian/tmp/usr/share/man/man8/apxs2.8
 
165
        mv debian/tmp/usr/sbin/apachectl debian/tmp/usr/sbin/apache2ctl
 
166
        mv debian/tmp/usr/share/man/man8/apachectl.8 debian/tmp/usr/share/man/man8/apache2ctl.8
 
167
        mv debian/tmp/usr/share/man/man8/suexec.8 debian/tmp/usr/share/man/man8/suexec2.8
 
168
 
 
169
        dh_install --list-missing --sourcedir=debian/tmp
 
170
# --sourcedir=$(REALCURDIR)/debian/apache2.2-common
 
171
 
 
172
        cp debian/bash_completion debian/apache2.2-common/etc/bash_completion.d/apache2.2-common
 
173
 
 
174
        #apache2-utils extras
 
175
        cp support/check_forensic debian/apache2-utils/usr/sbin/check_forensic
196
176
        cp debian/check_forensic.8 debian/apache2-utils/usr/share/man/man8/check_forensic.8
197
 
        mv debian/apache2-mpm-worker/usr/sbin/checkgid debian/apache2-utils/usr/sbin/checkgid
198
177
        cp debian/checkgid.8 debian/apache2-utils/usr/share/man/man8/checkgid.8
199
 
        mv debian/apache2-mpm-worker/usr/sbin/dbmmanage debian/apache2-utils/usr/bin/dbmmanage
200
 
        mv debian/apache2-mpm-worker/usr/share/man/man1/dbmmanage.1 debian/apache2-utils/usr/share/man/man1/dbmmanage.1
201
 
        mv debian/apache2-mpm-worker/usr/sbin/htdbm debian/apache2-utils/usr/bin/htdbm
202
 
        mv debian/apache2-mpm-worker/usr/sbin/htdigest debian/apache2-utils/usr/bin/htdigest
203
 
        mv debian/apache2-mpm-worker/usr/share/man/man1/htdigest.1 debian/apache2-utils/usr/share/man/man1/htdigest.1
204
 
        mv debian/apache2-mpm-worker/usr/sbin/htpasswd debian/apache2-utils/usr/bin/htpasswd
205
 
        mv debian/apache2-mpm-worker/usr/share/man/man1/htpasswd.1 debian/apache2-utils/usr/share/man/man1/htpasswd.1
206
 
        mv debian/apache2-mpm-worker/usr/sbin/logresolve debian/apache2-utils/usr/sbin/logresolve
207
 
        mv debian/apache2-mpm-worker/usr/share/man/man8/logresolve.8 debian/apache2-utils/usr/share/man/man8/logresolve.8
208
 
        cp build-tree/apache2-build/worker/support/split-logfile debian/apache2-utils/usr/sbin/split-logfile
 
178
        cp $(BUILD)/worker/support/split-logfile debian/apache2-utils/usr/sbin/split-logfile
209
179
        chmod 755 debian/apache2-utils/usr/sbin/split-logfile
210
 
        mv debian/apache2-mpm-worker/usr/sbin/rotatelogs debian/apache2-utils/usr/sbin/rotatelogs
211
 
        mv debian/apache2-mpm-worker/usr/share/man/man8/rotatelogs.8 debian/apache2-utils/usr/share/man/man8/rotatelogs.8
212
 
 
213
 
#apache2-utils backward compatibility symlinks
214
 
        ln -s ab debian/apache2-utils/usr/sbin/ab2
215
 
        ln -s checkgid debian/apache2-utils/usr/sbin/checkgid2
216
 
        ln -s dbmmanage debian/apache2-utils/usr/bin/dbmmanage2
217
 
        ln -s htdigest debian/apache2-utils/usr/bin/htdigest2
218
 
        ln -s htpasswd debian/apache2-utils/usr/bin/htpasswd2
219
 
        ln -s logresolve debian/apache2-utils/usr/sbin/logresolve2
220
 
        ln -s rotatelogs debian/apache2-utils/usr/sbin/rotatelogs2
221
 
 
222
 
#apache2-common stuff
223
 
        mv debian/apache2-mpm-worker/usr/share/apache2/icons/* debian/apache2-common/usr/share/apache2/icons/
224
 
        mv debian/apache2-mpm-worker/usr/share/apache2/error/* debian/apache2-common/usr/share/apache2/error/
225
 
        mv debian/apache2-mpm-worker/usr/sbin/apachectl debian/apache2-common/usr/sbin/apache2ctl
226
 
        mv debian/apache2-mpm-worker/usr/sbin/suexec debian/apache2-common/usr/lib/apache2/suexec2
227
 
        mv debian/apache2-mpm-worker/etc/apache2/*.conf debian/apache2-common/usr/share/doc/apache2/examples
228
 
        mv debian/apache2-mpm-worker/usr/lib/apache2/modules debian/apache2-common/usr/lib/apache2/modules
229
 
        cp debian/apache2.8 debian/apache2-common/usr/share/man/man8/apache2.8
230
 
        cp debian/apache2ctl.8 debian/apache2-common/usr/share/man/man8/apache2ctl.8
231
 
        mv debian/apache2-mpm-worker/usr/share/man/man8/suexec.8 debian/apache2-common/usr/share/man/man8/suexec2.8
232
 
        mv debian/apache2-mpm-worker/usr/sbin/envvars* debian/apache2-common/usr/share/apache2/build/
233
 
        mv debian/apache2-common/usr/share/apache2/build/envvars debian/apache2-common/etc/apache2/
234
 
        mv debian/apache2-mpm-worker/usr/share/apache2/default-site/htdocs debian/apache2-common/var/www/apache2-default
235
 
        rm -r debian/apache2-common/var/www/apache2-default/manual
236
 
        cp debian/robots.txt debian/apache2-common/var/www/apache2-default/
237
 
        cp -R debian/config-sites/* debian/apache2-common/usr/share/apache2/config/
238
 
        cp -R debian/config-mods/*.load debian/apache2-common/etc/apache2/mods-available/
239
 
        cp -R debian/config-mods/*.conf debian/apache2-common/etc/apache2/mods-available/
240
 
        cp -R debian/config/* debian/apache2-common/etc/apache2/
241
 
 
242
 
        cp -R build-tree/apache2/docs/* debian/apache2-doc/usr/share/doc/apache2-doc/
243
 
        cp build-tree/apache2/CHANGES debian/apache2-common/usr/share/doc/apache2/changelog
244
 
        rm -f debian/apache2-doc/usr/share/doc/apache2-doc/manual/LICENSE
245
 
        rm -f debian/apache2-doc/usr/share/doc/apache2-doc/manual/vhosts/LICENSE
246
 
        rm -f debian/apache2-mpm-worker/usr/lib/cgi-bin/test-cgi.bat
247
 
        rm -f debian/apache2-doc/usr/share/doc/apache2-doc/conf/ssl-std.conf
248
 
        rm -f debian/apache2-mpm-worker/usr/lib/apache2/modules/httpd.exp
249
 
        rm -f debian/apache2-mpm-worker/usr/lib/apache2/*.exp
250
 
        rm -rf debian/apache2-mpm-worker/usr/lib/cgi-bin/
251
 
#       chmod +x debian/apache2-common/usr/lib/cgi-bin/*
252
 
        chmod u+x debian/apache2*/usr/sbin/*
 
180
 
 
181
        cp -a debian/config-dir/* debian/apache2.2-common/etc/apache2
 
182
        if [ "`lsb_release -i -s`" = "Ubuntu" ]; then \
 
183
                sed -i -e 's/RedirectMatch/#RedirectMatch/' \
 
184
                debian/apache2.2-common/etc/apache2/sites-available/default; \
 
185
        fi
 
186
        mkdir -p debian/apache2.2-common/etc/logrotate.d
 
187
        cp debian/logrotate debian/apache2.2-common/etc/logrotate.d/apache2
 
188
        chmod 4755 debian/apache2.2-common/usr/lib/apache2/suexec 
253
189
        for i in `find debian/a2-scripts -name .svn -prune -o -name .arch-ids -prune -o -type f -print`; \
254
 
                do install -m755 $$i debian/apache2-common/usr/sbin/; \
255
 
        done
256
 
        cp debian/default-site debian/apache2-common/etc/apache2/sites-available/default
257
 
        cp debian/apache2-doc.conf debian/apache2-doc/etc/apache2/conf.d/apache2-doc
258
 
        cp debian/ssleay.cnf debian/apache2-common/usr/share/apache2/ssleay.cnf
259
 
        $(INSTALL) debian/ssl-certificate debian/apache2-common/usr/sbin/apache2-ssl-certificate 
260
 
        chown root:www-data debian/apache2-common/usr/lib/apache2/suexec2
261
 
        chmod 4750 debian/apache2-common/usr/lib/apache2/suexec2
262
 
        chmod +x debian/libapr$(major)-dev/usr/bin/*
263
 
        rm -rf debian/apache2-mpm-worker/usr/bin/httpd.exp debian/apache2-mpm-worker/include debian/apache2-mpm-worker/manual debian/apache2-mpm-worker/etc/apache2/build debian/apache2-mpm-worker/etc debian/apache2-mpm-worker/var debian/apache2-mpm-worker/usr/lib debian/apache2-mpm-worker/usr/share debian/apache2-mpm-worker/usr/bin debian/apache2-mpm-prefork/usr/share debian/apache2-mpm-prefork/etc/apache2 debian/apache2-mpm-prefork/var debian/apache2-mpm-prefork/usr/bin debian/apache2-mpm-prefork/usr/include debian/apache2-mpm-prefork/usr/lib debian/apache2-mpm-prefork/find_apu.m4 debian/apache2-prefork-dev/usr/include/apache2/apr* debian/apache2-prefork-dev/usr/include/apache2/apu* debian/apache2-mpm-worker/find_apu.m4
264
 
        # FIXME - HACK!!!!
265
 
        mv debian/apache2-mpm-prefork/usr/sbin/apache2  debian/apache2-mpm-prefork/usr/apache2
266
 
        rm -rf debian/apache2-mpm-prefork/usr/sbin/
267
 
        mkdir debian/apache2-mpm-prefork/usr/sbin/
268
 
        mv debian/apache2-mpm-prefork/usr/apache2 debian/apache2-mpm-prefork/usr/sbin/apache2
269
 
        # EOH
270
 
        for i in $(THREADEDMPMS) ; do \
271
 
                cp debian/mpm-postinst-threaded debian/apache2-mpm-$$i.postinst ; \
272
 
                cp debian/mpm-preinst-threaded debian/apache2-mpm-$$i.preinst ; \
273
 
        done
274
 
        for i in $(THREADEDMPMS) $(PREFORKMPM); do \
275
 
                cp debian/mpms.prerm debian/apache2-mpm-$$i.prerm; \
276
 
        done
277
 
        cp debian/init-script debian/apache2-common.init.d
278
 
        mkdir -p debian/apache2-common/etc/logrotate.d
279
 
        cp debian/logrotate debian/apache2-common/etc/logrotate.d/apache2
280
 
        cp debian/README.etc debian/apache2-common/etc/apache2/README
281
 
        cp debian/README.etc debian/apache2-common/usr/share/doc/apache2/README.etc
 
190
                do install -m755 $$i debian/apache2.2-common/usr/sbin; \
 
191
                rm -f debian/apache2.2-common/usr/sbin/update-apache2-modules debian/apache2.2-common/usr/sbin/modhandler.py; \
 
192
        done 
 
193
        for i in worker event; do \
 
194
                install -m755 debian/mpm-postinst-threaded debian/apache2-mpm-$$i.postinst ;\
 
195
                install -m755 debian/mpm-preinst-threaded debian/apache2-mpm-$$i.preinst;\
 
196
                install -m755 debian/mpms.prerm debian/apache2-mpm-$$i.prerm ;\
 
197
        done
 
198
        install -m755 debian/mpms.prerm debian/apache2-mpm-prefork.prerm
 
199
 
 
200
        for i in worker prefork event; do \
 
201
                rm -rf debian/apache2-mpm-$$i/ ;\
 
202
                mkdir -p debian/apache2-mpm-$$i/usr/sbin ;\
 
203
                install -m 755 $(BUILD)/$$i/apache2 debian/apache2-mpm-$$i/usr/sbin/apache2 ;\
 
204
        done
 
205
 
 
206
        for pkg in `awk '/^Package:/ { print $$2 }' debian/control`; do \
 
207
                find debian/$$pkg/ -name .svn -exec rm -rf {} + ; \
 
208
        done
 
209
 
282
210
        touch $@
283
211
 
284
 
binary-indep: build install
 
212
binary-indep: install
285
213
        dh_testdir -i
286
 
        dh_testroot -i
 
214
        dh_testroot -i 
 
215
        dh_installdirs -i
287
216
        dh_installdocs -i
288
 
        dh_installchangelogs -i
289
 
        dh_link -i
 
217
        dh_installchangelogs -i CHANGES -Napache2
 
218
        dh_installchangelogs -papache2
290
219
        dh_compress -i
291
 
        dh_fixperms -i -Xsuexec2
 
220
        dh_fixperms -i -Xsuexec
292
221
        dh_installdeb -i
293
222
        dh_gencontrol -i
294
223
        dh_md5sums -i
295
224
        dh_builddeb -i
296
225
 
297
 
# Build architecture-dependent files here.
298
 
binary-arch: build install
 
226
binary-arch: install
299
227
        dh_testdir -a
300
 
        dh_testroot -a
 
228
        dh_testroot -a 
 
229
        dh_installdirs -a
301
230
        dh_installdocs -a
302
231
        dh_installman -a
303
 
        dh_installinit -a -r --init-script=apache2 debian/apache2-common.init.d -- defaults 91
304
 
        dh_installchangelogs -a
305
 
        dh_installdebconf -a
306
 
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
232
        dh_installchangelogs -a CHANGES
 
233
        dh_installinit -a -r --init-script=apache2 debian/apache2.2-common.init.d -- start 91 09
307
234
        dh_strip -a
308
 
endif
309
235
        dh_link -a
310
236
        dh_compress -a
311
 
        dh_fixperms -a -Xsuexec2
312
 
        chown -R www-data:www-data debian/apache2-common/var/cache/apache2
313
 
        chmod 644 debian/apache2-common/usr/share/man/man8/suexec2.8.gz
 
237
        dh_fixperms -a -Xsuexec
 
238
        chown -R www-data:www-data debian/apache2.2-common/var/cache/apache2
314
239
        dh_makeshlibs -a -V
315
240
        dh_installdeb -a
316
 
        dh_shlibdeps -a -l debian/libapr0/usr/lib -- -Ldebian/libapr0/DEBIAN/shlibs
 
241
        dh_shlibdeps -a
317
242
        dh_gencontrol -a
318
243
        dh_md5sums -a
319
244
        dh_builddeb -a
320
245
 
321
 
binary: binary-indep binary-arch
322
 
.PHONY: build clean binary-indep binary-arch binary install configure
323
 
 
324
 
reset:
325
 
        rm -rf $(STAMP_DIR)/build build-tree $(STAMP_DIR)/configure debian.diff
326
 
        $(MAKE) -f debian/sys-build.mk source.clean
327
 
        $(MAKE) -f debian/sys-build.mk source.make
328
 
 
329
 
patch:
330
 
        -cd $(B) && $(MAKE) clean
331
 
        $(MAKE) -f debian/sys-build.mk make-diff
 
246
binary: binary-arch binary-indep