]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/apache2
Geaendert:
[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)
35TARGET = $(DIR_INFO)/$(THISAPP)
36PROG = apache2
37PAK_VER = 1
38
39###############################################################################
40# Top-level Rules
41###############################################################################
42
43objects = $(DL_FILE) \
44 httpd-2.2.2-config-1.patch
45
46$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
47httpd-2.2.2-config-1.patch = $(DL_FROM)/httpd-2.2.2-config-1.patch
48
49$(DL_FILE)_MD5 = 9c759a9744436de6a6aa2ddbc49d6e81
50httpd-2.2.2-config-1.patch_MD5 = e02a3ec5925eb9e111400b9aa229f822
51
52install : $(TARGET)
53
54check : $(patsubst %,$(DIR_CHK)/%,$(objects))
55
56download :$(patsubst %,$(DIR_DL)/%,$(objects))
57
58md5 : $(subst %,%_MD5,$(objects))
59
60dist:
61 @$(PAK)
62
63###############################################################################
64# Downloading, checking, md5sum
65###############################################################################
66
67$(patsubst %,$(DIR_CHK)/%,$(objects)) :
68 @$(CHECK)
69
70$(patsubst %,$(DIR_DL)/%,$(objects)) :
71 @$(LOAD)
72
73$(subst %,%_MD5,$(objects)) :
74 @$(MD5)
75
76###############################################################################
77# Installation Details
78###############################################################################
79
80$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
81 @$(PREBUILD)
82 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
83 cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/httpd-2.2.2-config-1.patch
a6b08d93
MT
84
85 ### Add IPFire's layout, too
86 echo "# IPFire layout" >> $(DIR_APP)/config.layout
87 echo "<Layout IPFire>" >> $(DIR_APP)/config.layout
88 echo " prefix: /usr" >> $(DIR_APP)/config.layout
89 echo " exec_prefix: /usr" >> $(DIR_APP)/config.layout
90 echo " bindir: /usr/bin" >> $(DIR_APP)/config.layout
91 echo " sbindir: /usr/sbin" >> $(DIR_APP)/config.layout
92 echo " libdir: /usr/lib" >> $(DIR_APP)/config.layout
93 echo " libexecdir: /usr/lib/apache" >> $(DIR_APP)/config.layout
94 echo " mandir: /usr/share/man" >> $(DIR_APP)/config.layout
95 echo " sysconfdir: /etc/httpd/conf" >> $(DIR_APP)/config.layout
96 echo " datadir: /home/httpd" >> $(DIR_APP)/config.layout
97 echo " installbuilddir: /usr/lib/apache/build" >> $(DIR_APP)/config.layout
98 echo " errordir: /home/httpd/error" >> $(DIR_APP)/config.layout
99 echo " iconsdir: /home/httpd/icons" >> $(DIR_APP)/config.layout
100 echo " htdocsdir: /home/httpd/htdocs" >> $(DIR_APP)/config.layout
101 echo " manualdir: /home/httpd/manual" >> $(DIR_APP)/config.layout
102 echo " cgidir: /home/httpd/cgi-bin" >> $(DIR_APP)/config.layout
103 echo " includedir: /usr/include/apache" >> $(DIR_APP)/config.layout
104 echo " localstatedir: /home/httpd" >> $(DIR_APP)/config.layout
105 echo " runtimedir: /var/run" >> $(DIR_APP)/config.layout
106 echo " logfiledir: /var/log/httpd" >> $(DIR_APP)/config.layout
107 echo " proxycachedir: /var/cache/apache/proxy" >> $(DIR_APP)/config.layout
108 echo "</Layout>" >> $(DIR_APP)/config.layout
109
110 cd $(DIR_APP) && ./configure --enable-layout=IPFire \
1658f920 111 --enable-mods-shared=all
7b6b8153
MT
112 cd $(DIR_APP) && make
113 cd $(DIR_APP) && make install
114 chown -v root:root /usr/lib/apache/httpd.exp \
115 /usr/sbin/{apxs,apachectl,dbmmanage,envvars{,-std}} \
116 /usr/share/man/man1/{dbmmanage,ht{dbm,digest,passwd}}.1 \
117 /usr/share/man/man8/{ab,apachectl,apxs,htcacheclean,httpd}.8 \
118 /usr/share/man/man8/{logresolve,rotatelogs,suexec}.8
a6b08d93
MT
119
120 #sed 's+CONFIG_ROOT+$(CONFIG_ROOT)+g' $(DIR_SRC)/config/httpd/httpd.conf > /etc/httpd/conf/httpd.conf
121 #ln -sf $(CONFIG_ROOT)/main/hostname.conf /etc/httpd/conf/
122
123 # Copy all html/cgi-bin files
124 mkdir -p /home/httpd/{cgi-bin,html}
125 cp -aR $(DIR_SRC)/html/* /home/httpd
126 -find /home/httpd -name .svn -exec rm -rf {} \;
127 cp $(DIR_DL)/sflogo.png /home/httpd/html/images/
128
129 # Change CONFIG_ROOT in cgi-scripts
130 for i in /home/httpd/cgi-bin/{*,logs.cgi/*,vpn.cgi/*}; do \
131 if [ -f $$i ]; then \
132 sed -i "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i; \
133 fi; \
134 done
135 chown -R root:root /home/httpd
136 chmod -R 755 /home/httpd/cgi-bin
137 chmod -R 644 /home/httpd/html
138 chmod 755 /home/httpd/html /home/httpd/html/{index.cgi,redirect.cgi,dial.cgi,images,include}
7b6b8153
MT
139 @rm -rf $(DIR_APP)
140 @$(POSTBUILD)