196 lines
5.9 KiB
Makefile
196 lines
5.9 KiB
Makefile
## ############################################################################
|
|
## common targets:
|
|
## make apache2-fe (worker, mod_proxy, mod_rewrite)
|
|
## make apache2-be (prefork, mod_rpaf, php4)
|
|
|
|
DESTDIR=/opt/
|
|
|
|
## ############################################################################
|
|
|
|
WGET := /usr/bin/wget --passive-ftp -nd
|
|
|
|
_SRCBASE=$(shell /bin/pwd)
|
|
_DOWNLOADS=$(_SRCBASE)/download
|
|
_SOURCES=$(_SRCBASE)/source
|
|
|
|
## ############################################################################
|
|
|
|
PACKAGE_APACHE2=httpd-2.0.59.tar.bz2
|
|
DOWNLOAD_APACHE2=http://apache.speedbone.de/httpd/$(PACKAGE_APACHE2)
|
|
SOURCE_APACHE2=$(_SOURCES)/httpd-2.0.59
|
|
|
|
PACKAGE_RPAF=mod_rpaf-0.5.tar.gz
|
|
DOWNLOAD_RPAF=http://stderr.net/apache/rpaf/download/$(PACKAGE_RPAF)
|
|
SOURCE_RPAF=$(_SOURCES)/mod_rpaf-0.5
|
|
|
|
PACKAGE_PHP4=php-4.4.4.tar.bz2
|
|
DOWNLOAD_PHP4=http://de3.php.net/get/$(PACKAGE_PHP4)/from/this/mirror
|
|
SOURCE_PHP4=$(_SOURCES)/php-4.4.4
|
|
|
|
PACKAGE_EACCELERATOR=eaccelerator-0.9.5.tar.bz2
|
|
DOWNLOAD_EACCELERATOR=http://surfnet.dl.sourceforge.net/sourceforge/eaccelerator/$(PACKAGE_EACCELERATOR)
|
|
SOURCE_EACCELERATOR=$(_SOURCES)/eaccelerator-0.9.5
|
|
|
|
## ############################################################################
|
|
|
|
all: apache2-fe apache2-be
|
|
|
|
fetch: $(_DOWNLOADS)/$(PACKAGE_APACHE2) \
|
|
$(_DOWNLOADS)/$(PACKAGE_RPAF) \
|
|
$(_DOWNLOADS)/$(PACKAGE_PHP4) \
|
|
$(_DOWNLOADS)/$(PACKAGE_EACCELERATOR)
|
|
|
|
$(_DOWNLOADS)/$(PACKAGE_APACHE2):
|
|
$(WGET) -P $(_DOWNLOADS) $(DOWNLOAD_APACHE2)
|
|
|
|
$(SOURCE_APACHE2)/.unpacked: $(_DOWNLOADS)/$(PACKAGE_APACHE2)
|
|
mkdir -p $(SOURCE_APACHE2)
|
|
tar -C $(_SOURCES) -xjf $(_DOWNLOADS)/$(PACKAGE_APACHE2)
|
|
touch $@
|
|
|
|
$(_DOWNLOADS)/$(PACKAGE_RPAF):
|
|
$(WGET) -P $(_DOWNLOADS) $(DOWNLOAD_RPAF)
|
|
|
|
$(SOURCE_RPAF)/.unpacked: $(_DOWNLOADS)/$(PACKAGE_RPAF)
|
|
mkdir -p $(SOURCE_RPAF)
|
|
tar -C $(_SOURCES) -xzf $(_DOWNLOADS)/$(PACKAGE_RPAF)
|
|
touch $@
|
|
|
|
$(_DOWNLOADS)/$(PACKAGE_PHP4):
|
|
$(WGET) -P $(_DOWNLOADS) $(DOWNLOAD_PHP4)
|
|
|
|
$(SOURCE_PHP4)/.unpacked: $(_DOWNLOADS)/$(PACKAGE_PHP4)
|
|
mkdir -p $(SOURCE_PHP4)
|
|
tar -C $(_SOURCES) -xjf $(_DOWNLOADS)/$(PACKAGE_PHP4)
|
|
touch $@
|
|
|
|
$(_DOWNLOADS)/$(PACKAGE_EACCELERATOR):
|
|
$(WGET) -P $(_DOWNLOADS) $(DOWNLOAD_EACCELERATOR)
|
|
|
|
$(SOURCE_EACCELERATOR)/.unpacked: $(_DOWNLOADS)/$(PACKAGE_EACCELERATOR)
|
|
mkdir -p $(SOURCE_EACCELERATOR)
|
|
tar -C $(_SOURCES) -xjf $(_DOWNLOADS)/$(PACKAGE_EACCELERATOR)
|
|
touch $@
|
|
|
|
## ############################################################################
|
|
|
|
_BUILD_APACHE2_FRONTEND=$(_SOURCES)/apache2-frontend
|
|
|
|
apache2-fe: $(_BUILD_APACHE2_FRONTEND)/.installed
|
|
|
|
$(_BUILD_APACHE2_FRONTEND)/.configured: $(SOURCE_APACHE2)/.unpacked
|
|
mkdir -p $(_BUILD_APACHE2_FRONTEND)
|
|
( cd $(_BUILD_APACHE2_FRONTEND); \
|
|
$(SOURCE_APACHE2)/configure \
|
|
--prefix=$(DESTDIR)/apache2-frontend/ \
|
|
--with-mpm=worker \
|
|
--enable-proxy \
|
|
--enable-proxy-http \
|
|
--enable-rewrite \
|
|
);
|
|
touch $@
|
|
|
|
$(_BUILD_APACHE2_FRONTEND)/.compiled: $(_BUILD_APACHE2_FRONTEND)/.configured
|
|
make -j2 -C $(_BUILD_APACHE2_FRONTEND) all
|
|
touch $@
|
|
|
|
$(_BUILD_APACHE2_FRONTEND)/.installed: $(_BUILD_APACHE2_FRONTEND)/.compiled
|
|
make -C $(_BUILD_APACHE2_FRONTEND) install
|
|
touch $@
|
|
|
|
apache2-fe-clean:
|
|
rm -rf $(_BUILD_APACHE2_FRONTEND)
|
|
|
|
## ############################################################################
|
|
|
|
_BUILD_APACHE2_BACKEND=$(_SOURCES)/apache2-backend
|
|
_BUILD_APACHE2_BACKEND_PHP=$(_SOURCES)/apache2-backend-php
|
|
|
|
apache2-be: $(_BUILD_APACHE2_BACKEND)/.installed \
|
|
$(SOURCE_RPAF)/.installed \
|
|
$(_BUILD_APACHE2_BACKEND_PHP)/.installed \
|
|
$(SOURCE_EACCELERATOR)/.installed
|
|
|
|
$(_BUILD_APACHE2_BACKEND)/.configured: $(SOURCE_APACHE2)/.unpacked
|
|
mkdir -p $(_BUILD_APACHE2_BACKEND)
|
|
( cd $(_BUILD_APACHE2_BACKEND); \
|
|
$(SOURCE_APACHE2)/configure \
|
|
--prefix=$(DESTDIR)/apache2-backend/ \
|
|
--with-mpm=prefork \
|
|
--enable-so \
|
|
);
|
|
touch $@
|
|
|
|
$(_BUILD_APACHE2_BACKEND)/.compiled: $(_BUILD_APACHE2_BACKEND)/.configured
|
|
make -j2 -C $(_BUILD_APACHE2_BACKEND) all
|
|
touch $@
|
|
|
|
$(_BUILD_APACHE2_BACKEND)/.installed: $(_BUILD_APACHE2_BACKEND)/.compiled
|
|
make -C $(_BUILD_APACHE2_BACKEND) install
|
|
touch $@
|
|
|
|
|
|
$(SOURCE_RPAF)/.compiled: $(SOURCE_RPAF)/.unpacked $(_BUILD_APACHE2_BACKEND)/.installed
|
|
make -C $(SOURCE_RPAF) APXS=$(DESTDIR)/apache2-backend/bin/apxs rpaf-2.0
|
|
touch $@
|
|
|
|
$(SOURCE_RPAF)/.installed: $(SOURCE_RPAF)/.compiled
|
|
make -C $(SOURCE_RPAF) APXS=$(DESTDIR)/apache2-backend/bin/apxs install-2.0
|
|
touch $@
|
|
|
|
|
|
$(_BUILD_APACHE2_BACKEND_PHP)/.configured: $(SOURCE_PHP4)/.unpacked $(_BUILD_APACHE2_BACKEND)/.installed
|
|
mkdir -p $(_BUILD_APACHE2_BACKEND_PHP)
|
|
( cd $(_BUILD_APACHE2_BACKEND_PHP); \
|
|
$(SOURCE_PHP4)/configure \
|
|
--prefix=$(DESTDIR)/apache2-backend-php/ \
|
|
--with-apxs2=$(DESTDIR)/apache2-backend/bin/apxs \
|
|
--disable-cli \
|
|
--disable-cgi \
|
|
--with-layout=GNU \
|
|
--disable-rpath \
|
|
--disable-ipv6 \
|
|
--disable-static \
|
|
--enable-sockets \
|
|
--enable-inline-optimization \
|
|
--with-zlib \
|
|
--with-regex=system \
|
|
--with-gd \
|
|
--with-mysql=/usr \
|
|
);
|
|
touch $@
|
|
|
|
$(_BUILD_APACHE2_BACKEND_PHP)/.compiled: $(_BUILD_APACHE2_BACKEND_PHP)/.configured
|
|
make -j2 -C $(_BUILD_APACHE2_BACKEND_PHP) all
|
|
touch $@
|
|
|
|
$(_BUILD_APACHE2_BACKEND_PHP)/.installed: $(_BUILD_APACHE2_BACKEND_PHP)/.compiled
|
|
make -C $(_BUILD_APACHE2_BACKEND_PHP) install
|
|
touch $@
|
|
|
|
|
|
$(SOURCE_EACCELERATOR)/.configured: $(SOURCE_EACCELERATOR)/.unpacked $(_BUILD_APACHE2_BACKEND_PHP)/.installed
|
|
( cd $(SOURCE_EACCELERATOR); \
|
|
$(DESTDIR)/apache2-backend-php/bin/phpize; \
|
|
./configure \
|
|
--with-eaccelerator=shared \
|
|
--with-php-config=$(DESTDIR)/apache2-backend-php/bin/php-config \
|
|
);
|
|
touch $@
|
|
|
|
$(SOURCE_EACCELERATOR)/.compiled: $(SOURCE_EACCELERATOR)/.configured
|
|
make -j2 -C $(SOURCE_EACCELERATOR) all
|
|
touch $@
|
|
|
|
$(SOURCE_EACCELERATOR)/.installed: $(SOURCE_EACCELERATOR)/.compiled
|
|
make -C $(SOURCE_EACCELERATOR) install
|
|
touch $@
|
|
|
|
apache2-be-clean:
|
|
rm -rf $(_BUILD_APACHE2_BACKEND)
|
|
rm -rf $(SOURCE_RPAF)
|
|
rm -rf $(_BUILD_APACHE2_BACKEND_PHP)
|
|
rm -rf $(SOURCE_EACCELERATOR)
|
|
|
|
## ############################################################################
|