]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/apache2
gcc: fix libstdc++ symbol versioning (wrong linker detection).
[people/pmueller/ipfire-2.x.git] / lfs / apache2
CommitLineData
7b6b8153 1###############################################################################
7b6b8153 2# #
70df8302
MT
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
7b6b8153 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
7b6b8153
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
7b6b8153
MT
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
7b6b8153
MT
18# #
19###############################################################################
20
70df8302 21
7b6b8153
MT
22###############################################################################
23# Definitions
24###############################################################################
25
26include Config
27
ca23dbe2 28VER = 2.2.19
7b6b8153
MT
29
30THISAPP = httpd-$(VER)
31DL_FILE = $(THISAPP).tar.bz2
32DL_FROM = $(URL_IPFIRE)
33DIR_APP = $(DIR_SRC)/$(THISAPP)
c8ead4a5 34ifeq "$(PASS)" "C"
f1baee3e
MT
35 TARGET = $(DIR_INFO)/$(THISAPP)-config
36else
37 TARGET = $(DIR_INFO)/$(THISAPP)
38endif
7b6b8153
MT
39
40###############################################################################
41# Top-level Rules
42###############################################################################
43
44objects = $(DL_FILE) \
45 httpd-2.2.2-config-1.patch
46
47$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
48httpd-2.2.2-config-1.patch = $(DL_FROM)/httpd-2.2.2-config-1.patch
49
ca23dbe2 50$(DL_FILE)_MD5 = 832f96a6ec4b8fc7cf49b9efd4e89060
7b6b8153
MT
51httpd-2.2.2-config-1.patch_MD5 = e02a3ec5925eb9e111400b9aa229f822
52
53install : $(TARGET)
54
55check : $(patsubst %,$(DIR_CHK)/%,$(objects))
56
57download :$(patsubst %,$(DIR_DL)/%,$(objects))
58
59md5 : $(subst %,%_MD5,$(objects))
60
7b6b8153
MT
61###############################################################################
62# Downloading, checking, md5sum
63###############################################################################
64
65$(patsubst %,$(DIR_CHK)/%,$(objects)) :
66 @$(CHECK)
67
68$(patsubst %,$(DIR_DL)/%,$(objects)) :
69 @$(LOAD)
70
71$(subst %,%_MD5,$(objects)) :
72 @$(MD5)
73
74###############################################################################
75# Installation Details
76###############################################################################
77
78$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
79 @$(PREBUILD)
c8ead4a5 80ifeq "$(PASS)" "C"
f1baee3e
MT
81 # DO THIS IN AN EXTRA STEP BECAUSE PHP AND SUBVERSION WILL FAIL.
82
83 cp -rf $(DIR_CONF)/httpd/* /etc/httpd/conf
84 ln -sf $(CONFIG_ROOT)/main/hostname.conf /etc/httpd/conf/
f1baee3e
MT
85
86 # Copy all html/cgi-bin files
5db10f47
AF
87 mkdir -p /srv/web/ipfire/{cgi-bin,html}
88 mkdir -p /var/updatecache/{download,metadata}
d733119b 89 cp -aR $(DIR_SRC)/html/* /srv/web/ipfire
f1baee3e
MT
90
91 # Change CONFIG_ROOT in cgi-scripts
d733119b 92 for i in /srv/web/ipfire/cgi-bin/{*,logs.cgi/*,vpn.cgi/*}; do \
f1baee3e
MT
93 if [ -f $$i ]; then \
94 sed -i "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i; \
95 fi; \
96 done
d733119b
MT
97 chown -R root:root /srv/web/ipfire
98 chmod -R 755 /srv/web/ipfire/cgi-bin
99 chmod -R 644 /srv/web/ipfire/html
fd0763dc 100 chmod 755 /srv/web/ipfire/html /srv/web/ipfire/html/{index.cgi,redirect.cgi,dial.cgi,images,include,themes,themes/*,themes/*/*}
f1baee3e 101else
7b6b8153 102 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
34273fd0 103 cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/httpd-2.2.2-config-1.patch
a6b08d93
MT
104
105 ### Add IPFire's layout, too
106 echo "# IPFire layout" >> $(DIR_APP)/config.layout
107 echo "<Layout IPFire>" >> $(DIR_APP)/config.layout
108 echo " prefix: /usr" >> $(DIR_APP)/config.layout
109 echo " exec_prefix: /usr" >> $(DIR_APP)/config.layout
110 echo " bindir: /usr/bin" >> $(DIR_APP)/config.layout
111 echo " sbindir: /usr/sbin" >> $(DIR_APP)/config.layout
112 echo " libdir: /usr/lib" >> $(DIR_APP)/config.layout
113 echo " libexecdir: /usr/lib/apache" >> $(DIR_APP)/config.layout
114 echo " mandir: /usr/share/man" >> $(DIR_APP)/config.layout
115 echo " sysconfdir: /etc/httpd/conf" >> $(DIR_APP)/config.layout
d733119b 116 echo " datadir: /srv/web/ipfire" >> $(DIR_APP)/config.layout
a6b08d93 117 echo " installbuilddir: /usr/lib/apache/build" >> $(DIR_APP)/config.layout
d733119b
MT
118 echo " errordir: /srv/web/ipfire/error" >> $(DIR_APP)/config.layout
119 echo " iconsdir: /srv/web/ipfire/icons" >> $(DIR_APP)/config.layout
120 echo " htdocsdir: /srv/web/ipfire/htdocs" >> $(DIR_APP)/config.layout
121 echo " manualdir: /srv/web/ipfire/manual" >> $(DIR_APP)/config.layout
122 echo " cgidir: /srv/web/ipfire/cgi-bin" >> $(DIR_APP)/config.layout
a6b08d93 123 echo " includedir: /usr/include/apache" >> $(DIR_APP)/config.layout
d733119b 124 echo " localstatedir: /srv/web/ipfire" >> $(DIR_APP)/config.layout
a6b08d93
MT
125 echo " runtimedir: /var/run" >> $(DIR_APP)/config.layout
126 echo " logfiledir: /var/log/httpd" >> $(DIR_APP)/config.layout
127 echo " proxycachedir: /var/cache/apache/proxy" >> $(DIR_APP)/config.layout
128 echo "</Layout>" >> $(DIR_APP)/config.layout
129
130 cd $(DIR_APP) && ./configure --enable-layout=IPFire \
574d71d9 131 --enable-ssl --enable-mods-shared=all --enable-proxy
c8ead4a5 132 cd $(DIR_APP) && make $(MAKETUNING)
7b6b8153
MT
133 cd $(DIR_APP) && make install
134 chown -v root:root /usr/lib/apache/httpd.exp \
135 /usr/sbin/{apxs,apachectl,dbmmanage,envvars{,-std}} \
136 /usr/share/man/man1/{dbmmanage,ht{dbm,digest,passwd}}.1 \
137 /usr/share/man/man8/{ab,apachectl,apxs,htcacheclean,httpd}.8 \
138 /usr/share/man/man8/{logresolve,rotatelogs,suexec}.8
139 @rm -rf $(DIR_APP)
f1baee3e 140endif
7b6b8153 141 @$(POSTBUILD)