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