############################################################################### # This file is part of the IPCop Firewall. # # # # IPCop is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # # IPCop is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with IPCop; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # # Makefiles are based on LFSMake, which is # # Copyright (C) 2002 Rod Roard # # # # Modifications by: # # ??-12-2003 Mark Wormgoor < mark@wormgoor.com> # # - Modified Makefile for IPCop build # # # # $Id: apache,v 1.7.2.11 2005/10/20 21:06:50 gespinasse Exp $ # # ############################################################################### ############################################################################### # Definitions ############################################################################### include Config VER = 1.3.34 THISAPP = apache_$(VER) DL_FILE = $(THISAPP).tar.gz DL_FROM = $(URL_IPCOP) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) ############################################################################### # Top-level Rules ############################################################################### objects = $(DL_FILE) mod_ssl-2.8.25-1.3.34.tar.gz mm-1.4.0.tar.gz sflogo.png $(DL_FILE) = $(DL_FROM)/$(DL_FILE) 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 mm-1.4.0.tar.gz = ftp://ftp.ossp.org/pkg/lib/mm/mm-1.4.0.tar.gz sflogo.png = http://sflogo.sourceforge.net/sflogo.php?group_id=40604 $(DL_FILE)_MD5 = 9978cc552b423f0015c1052d23ab619e mod_ssl-2.8.25-1.3.34.tar.gz_MD5 = 1ef2a6cb47573444779b2fd10502514b mm-1.4.0.tar.gz_MD5 = 393b0891a889a4e9f9481d18d976366c sflogo.png_MD5 = 9fe4d709a2bae05a34e6c070c8a0448e install : $(TARGET) check : $(patsubst %,$(DIR_CHK)/%,$(objects)) download :$(patsubst %,$(DIR_DL)/%,$(objects)) md5 : $(subst %,%_MD5,$(objects)) ############################################################################### # Downloading, checking, md5sum ############################################################################### $(patsubst %,$(DIR_CHK)/%,$(objects)) : @$(CHECK) $(patsubst %,$(DIR_DL)/%,$(objects)) : @$(LOAD) $(subst %,%_MD5,$(objects)) : @$(MD5) ############################################################################### # Installation Details ############################################################################### $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) $(DIR_SRC)/mm-* $(DIR_SRC)/mod_* && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) rm -rf /home/httpd/cgi-bin # MM cd $(DIR_SRC) && tar xfz $(DIR_DL)/mm-1.4.0.tar.gz cd $(DIR_SRC)/mm-1.4.0 && ./configure --disable-shared cd $(DIR_SRC)/mm-1.4.0 && make # Mod_ssl cd $(DIR_SRC) && tar xfz $(DIR_DL)/mod_ssl-2.8.25-1.3.34.tar.gz cd $(DIR_SRC)/mod_ssl-2.8.25-1.3.34 && ./configure --with-apache=$(DIR_APP) # Apache cd $(DIR_APP) && CFLAGS="$(CFLAGS)" \ EAPI_MM=$(DIR_SRC)/mm-1.4.0 ./configure \ --prefix=/home/httpd --exec-prefix=/usr \ --sysconfdir=/etc/httpd/conf --logfiledir=/var/log/httpd \ --includedir=/usr/include/apache --mandir=/usr/share/man \ --localstatedir=/var --runtimedir=/var/run \ --disable-rule=SHARED_CHAIN --disable-rule=SHARED_CORE \ --disable-rule=EXPAT --disable-rule=WANTHSREGEX \ --enable-rule=EAPI --enable-module=rewrite \ --disable-module=negotiation --disable-module=status \ --disable-module=include --disable-module=autoindex \ --disable-module=asis \ --disable-module=imap --disable-module=actions \ --disable-module=userdir \ --enable-module=ssl cd $(DIR_APP) && make cd $(DIR_APP) && make install mv -f /usr/bin/httpd /usr/sbin sed 's+CONFIG_ROOT+$(CONFIG_ROOT)+g' $(DIR_SRC)/config/httpd/httpd.conf > /etc/httpd/conf/httpd.conf ln -sf $(CONFIG_ROOT)/main/hostname.conf /etc/httpd/conf/ # Copy all html/cgi-bin files cp -aR $(DIR_SRC)/html/* /home/httpd -find /home/httpd -name .svn -exec rm -rf {} \; cp $(DIR_DL)/sflogo.png /home/httpd/html/images/ # Change CONFIG_ROOT in cgi-scripts for i in /home/httpd/cgi-bin/{*,logs.cgi/*,vpn.cgi/*}; do \ if [ -f $$i ]; then \ sed -i "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i; \ fi; \ done chown -R root:root /home/httpd chmod -R 755 /home/httpd/cgi-bin chmod -R 644 /home/httpd/html chmod 755 /home/httpd/html /home/httpd/html/{index.cgi,images,include} # backup directory needs nobody:nobody permissions -mkdir -p /home/httpd/html/backup chown nobody:nobody /home/httpd/html/backup @rm -rf $(DIR_APP) $(DIR_SRC)/mm-* $(DIR_SRC)/mod_* @$(POSTBUILD)