]> git.ipfire.org Git - ipfire-2.x.git/blob - lfs/apache
HinzugefĆ¼gt:
[ipfire-2.x.git] / lfs / apache
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 # Modifications by: #
22 # ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
23 # - Modified Makefile for IPCop build #
24 # #
25 # $Id: apache,v 1.7.2.11 2005/10/20 21:06:50 gespinasse Exp $
26 # #
27 ###############################################################################
28
29 ###############################################################################
30 # Definitions
31 ###############################################################################
32
33 include Config
34
35 VER = 1.3.34
36
37 THISAPP = apache_$(VER)
38 DL_FILE = $(THISAPP).tar.gz
39 DL_FROM = http://www.apache.org/dist/httpd
40 DIR_APP = $(DIR_SRC)/$(THISAPP)
41 TARGET = $(DIR_INFO)/$(THISAPP)
42
43 ###############################################################################
44 # Top-level Rules
45 ###############################################################################
46
47 objects = $(DL_FILE) mod_ssl-2.8.25-1.3.34.tar.gz mm-1.4.0.tar.gz sflogo.png
48
49 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
50 mod_ssl-2.8.25-1.3.34.tar.gz = http://www.modssl.org/source/mod_ssl-2.8.25-1.3.34.tar.gz
51 mm-1.4.0.tar.gz = ftp://ftp.ossp.org/pkg/lib/mm/mm-1.4.0.tar.gz
52 sflogo.png = http://sflogo.sourceforge.net/sflogo.php?group_id=40604
53
54 $(DL_FILE)_MD5 = 9978cc552b423f0015c1052d23ab619e
55 mod_ssl-2.8.25-1.3.34.tar.gz_MD5 = 1ef2a6cb47573444779b2fd10502514b
56 mm-1.4.0.tar.gz_MD5 = 393b0891a889a4e9f9481d18d976366c
57 sflogo.png_MD5 = 9fe4d709a2bae05a34e6c070c8a0448e
58
59 install : $(TARGET)
60
61 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
62
63 download :$(patsubst %,$(DIR_DL)/%,$(objects))
64
65 md5 : $(subst %,%_MD5,$(objects))
66
67 ###############################################################################
68 # Downloading, checking, md5sum
69 ###############################################################################
70
71 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
72 @$(CHECK)
73
74 $(patsubst %,$(DIR_DL)/%,$(objects)) :
75 @$(LOAD)
76
77 $(subst %,%_MD5,$(objects)) :
78 @$(MD5)
79
80 ###############################################################################
81 # Installation Details
82 ###############################################################################
83
84 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
85 @$(PREBUILD)
86 @rm -rf $(DIR_APP) $(DIR_SRC)/mm-* $(DIR_SRC)/mod_* && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
87 rm -rf /home/httpd/cgi-bin
88
89 # MM
90 cd $(DIR_SRC) && tar xfz $(DIR_DL)/mm-1.4.0.tar.gz
91 cd $(DIR_SRC)/mm-1.4.0 && ./configure --disable-shared
92 cd $(DIR_SRC)/mm-1.4.0 && make
93
94 # Mod_ssl
95 cd $(DIR_SRC) && tar xfz $(DIR_DL)/mod_ssl-2.8.25-1.3.34.tar.gz
96 cd $(DIR_SRC)/mod_ssl-2.8.25-1.3.34 && ./configure --with-apache=$(DIR_APP)
97
98 # Apache
99 cd $(DIR_APP) && CFLAGS="$(CFLAGS)" \
100 EAPI_MM=$(DIR_SRC)/mm-1.4.0 ./configure \
101 --prefix=/home/httpd --exec-prefix=/usr \
102 --sysconfdir=/etc/httpd/conf --logfiledir=/var/log/httpd \
103 --includedir=/usr/include/apache --mandir=/usr/share/man \
104 --localstatedir=/var --runtimedir=/var/run \
105 --disable-rule=SHARED_CHAIN --disable-rule=SHARED_CORE \
106 --disable-rule=EXPAT --disable-rule=WANTHSREGEX \
107 --enable-rule=EAPI --enable-module=rewrite \
108 --disable-module=negotiation --disable-module=status \
109 --disable-module=include --disable-module=autoindex \
110 --disable-module=asis \
111 --disable-module=imap --disable-module=actions \
112 --disable-module=userdir \
113 --enable-module=ssl
114 cd $(DIR_APP) && make
115 cd $(DIR_APP) && make install
116
117 mv -f /usr/bin/httpd /usr/sbin
118 sed 's+CONFIG_ROOT+$(CONFIG_ROOT)+g' $(DIR_SRC)/config/httpd/httpd.conf > /etc/httpd/conf/httpd.conf
119 ln -sf $(CONFIG_ROOT)/main/hostname.conf /etc/httpd/conf/
120
121 # Copy all html/cgi-bin files
122 cp -aR $(DIR_SRC)/html/* /home/httpd
123 -find /home/httpd -name .svn -exec rm -rf {} \;
124 cp $(DIR_DL)/sflogo.png /home/httpd/html/images/
125
126 # Change CONFIG_ROOT in cgi-scripts
127 for i in /home/httpd/cgi-bin/{*,logs.cgi/*,vpn.cgi/*}; do \
128 if [ -f $$i ]; then \
129 sed -i "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i; \
130 fi; \
131 done
132 chown -R root:root /home/httpd
133 chmod -R 755 /home/httpd/cgi-bin
134 chmod -R 644 /home/httpd/html
135 chmod 755 /home/httpd/html /home/httpd/html/{index.cgi,images,include}
136
137
138 # backup directory needs nobody:nobody permissions
139 -mkdir -p /home/httpd/html/backup
140 chown nobody:nobody /home/httpd/html/backup
141
142 @rm -rf $(DIR_APP) $(DIR_SRC)/mm-* $(DIR_SRC)/mod_*
143 @$(POSTBUILD)