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