]>
Commit | Line | Data |
---|---|---|
7b6b8153 | 1 | ############################################################################### |
7b6b8153 | 2 | # # |
70df8302 | 3 | # IPFire.org - A linux based firewall # |
cbc492f5 | 4 | # Copyright (C) 2007-2014 IPFire Team <info@ipfire.org> # |
70df8302 MT |
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 | ||
26 | include Config | |
27 | ||
d41fe99f | 28 | VER = 2.4.27 |
7b6b8153 MT |
29 | |
30 | THISAPP = httpd-$(VER) | |
31 | DL_FILE = $(THISAPP).tar.bz2 | |
05188498 | 32 | DL_FROM = $(URL_IPFIRE) |
d41fe99f | 33 | |
7b6b8153 | 34 | DIR_APP = $(DIR_SRC)/$(THISAPP) |
afdf1483 MT |
35 | |
36 | TARGET = $(DIR_INFO)/$(THISAPP) | |
7b6b8153 | 37 | |
d41fe99f WA |
38 | DEPS = "aprutil pcre" |
39 | ||
7b6b8153 MT |
40 | ############################################################################### |
41 | # Top-level Rules | |
42 | ############################################################################### | |
43 | ||
44 | objects = $(DL_FILE) \ | |
d41fe99f | 45 | PR61382-Fix.patch |
7b6b8153 MT |
46 | |
47 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
d41fe99f | 48 | PR61382-Fix.patch = ${DL_FROM}/patches/apply_to_2.4.27/PR61382-Fix.patch |
7b6b8153 | 49 | |
d41fe99f WA |
50 | $(DL_FILE)_MD5 = 97b6bbfa83c866dbe20ef317e3afd108 |
51 | PR61382-Fix.patch_MD5 = 5c1107bb1f399419574d983ce103c99a | |
7b6b8153 MT |
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 | ||
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) | |
80 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) | |
d41fe99f | 81 | cd $(DIR_APP) && patch -Np0 -i $(DIR_DL)/PR61382-Fix.patch |
a6b08d93 MT |
82 | |
83 | ### Add IPFire's layout, too | |
84 | echo "# IPFire layout" >> $(DIR_APP)/config.layout | |
85 | echo "<Layout IPFire>" >> $(DIR_APP)/config.layout | |
86 | echo " prefix: /usr" >> $(DIR_APP)/config.layout | |
87 | echo " exec_prefix: /usr" >> $(DIR_APP)/config.layout | |
88 | echo " bindir: /usr/bin" >> $(DIR_APP)/config.layout | |
89 | echo " sbindir: /usr/sbin" >> $(DIR_APP)/config.layout | |
90 | echo " libdir: /usr/lib" >> $(DIR_APP)/config.layout | |
91 | echo " libexecdir: /usr/lib/apache" >> $(DIR_APP)/config.layout | |
92 | echo " mandir: /usr/share/man" >> $(DIR_APP)/config.layout | |
93 | echo " sysconfdir: /etc/httpd/conf" >> $(DIR_APP)/config.layout | |
d733119b | 94 | echo " datadir: /srv/web/ipfire" >> $(DIR_APP)/config.layout |
a6b08d93 | 95 | echo " installbuilddir: /usr/lib/apache/build" >> $(DIR_APP)/config.layout |
d733119b MT |
96 | echo " errordir: /srv/web/ipfire/error" >> $(DIR_APP)/config.layout |
97 | echo " iconsdir: /srv/web/ipfire/icons" >> $(DIR_APP)/config.layout | |
98 | echo " htdocsdir: /srv/web/ipfire/htdocs" >> $(DIR_APP)/config.layout | |
99 | echo " manualdir: /srv/web/ipfire/manual" >> $(DIR_APP)/config.layout | |
100 | echo " cgidir: /srv/web/ipfire/cgi-bin" >> $(DIR_APP)/config.layout | |
a6b08d93 | 101 | echo " includedir: /usr/include/apache" >> $(DIR_APP)/config.layout |
d733119b | 102 | echo " localstatedir: /srv/web/ipfire" >> $(DIR_APP)/config.layout |
a6b08d93 MT |
103 | echo " runtimedir: /var/run" >> $(DIR_APP)/config.layout |
104 | echo " logfiledir: /var/log/httpd" >> $(DIR_APP)/config.layout | |
105 | echo " proxycachedir: /var/cache/apache/proxy" >> $(DIR_APP)/config.layout | |
106 | echo "</Layout>" >> $(DIR_APP)/config.layout | |
107 | ||
108 | cd $(DIR_APP) && ./configure --enable-layout=IPFire \ | |
d41fe99f | 109 | --enable-ssl --enable-mods-shared=all --enable-proxy --with-mpm=event |
c8ead4a5 | 110 | cd $(DIR_APP) && make $(MAKETUNING) |
7b6b8153 MT |
111 | cd $(DIR_APP) && make install |
112 | chown -v root:root /usr/lib/apache/httpd.exp \ | |
d41fe99f WA |
113 | /usr/bin/{apxs,dbmmanage} \ |
114 | /usr/sbin/apachectl \ | |
115 | /usr/share/man/man1/{ab,apxs,dbmmanage,ht{dbm,digest,passwd,txt2dbm},logresolve}.1 \ | |
116 | /usr/share/man/man8/{apachectl,htcacheclean,httpd}.8 \ | |
117 | /usr/share/man/man8/{rotatelogs,suexec}.8 | |
afdf1483 MT |
118 | |
119 | # Install apache config | |
120 | cp -rf $(DIR_CONF)/httpd/* /etc/httpd/conf | |
121 | ln -sf $(CONFIG_ROOT)/main/hostname.conf /etc/httpd/conf/ | |
122 | ||
7b6b8153 MT |
123 | @rm -rf $(DIR_APP) |
124 | @$(POSTBUILD) |