initial commit
This commit is contained in:
commit
c932c6f702
|
@ -0,0 +1,185 @@
|
|||
## ############################################################################
|
||||
## 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=$(_DOWNLOADS)/httpd-2.0.58.tar.bz2
|
||||
DOWNLOAD_APACHE2=http://apache.speedbone.de/httpd/httpd-2.0.58.tar.bz2
|
||||
SOURCE_APACHE2=$(_SOURCES)/httpd-2.0.58
|
||||
|
||||
PACKAGE_RPAF=$(_DOWNLOADS)/mod_rpaf-0.5.tar.gz
|
||||
DOWNLOAD_RPAF=http://stderr.net/apache/rpaf/download/mod_rpaf-0.5.tar.gz
|
||||
SOURCE_RPAF=$(_SOURCES)/mod_rpaf-0.5
|
||||
|
||||
PACKAGE_PHP4=$(_DOWNLOADS)/php-4.4.2.tar.bz2
|
||||
DOWNLOAD_PHP4=http://de3.php.net/get/php-4.4.2.tar.bz2/from/de.php.net/mirror
|
||||
SOURCE_PHP4=$(_SOURCES)/php-4.4.2
|
||||
|
||||
PACKAGE_EACCELERATOR=$(_DOWNLOADS)/eaccelerator-0.9.4.tar.bz2
|
||||
DOWNLOAD_EACCELERATOR=http://surfnet.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.4.tar.bz2
|
||||
SOURCE_EACCELERATOR=$(_SOURCES)/eaccelerator-0.9.4
|
||||
|
||||
## ############################################################################
|
||||
|
||||
$(PACKAGE_APACHE2):
|
||||
$(WGET) -P $(_DOWNLOADS) $(DOWNLOAD_APACHE2)
|
||||
|
||||
$(SOURCE_APACHE2)/.unpacked: $(PACKAGE_APACHE2)
|
||||
tar -C $(_SOURCES) -xjf $(PACKAGE_APACHE2)
|
||||
touch $@
|
||||
|
||||
$(PACKAGE_RPAF):
|
||||
$(WGET) -P $(_DOWNLOADS) $(DOWNLOAD_RPAF)
|
||||
|
||||
$(SOURCE_RPAF)/.unpacked: $(PACKAGE_RPAF)
|
||||
tar -C $(_SOURCES) -xzf $(PACKAGE_RPAF)
|
||||
touch $@
|
||||
|
||||
$(PACKAGE_PHP4):
|
||||
$(WGET) -P $(_DOWNLOADS) $(DOWNLOAD_PHP4)
|
||||
|
||||
$(SOURCE_PHP4)/.unpacked: $(PACKAGE_PHP4)
|
||||
tar -C $(_SOURCES) -xjf $(PACKAGE_PHP4)
|
||||
touch $@
|
||||
|
||||
$(PACKAGE_EACCELERATOR):
|
||||
$(WGET) -P $(_DOWNLOADS) $(DOWNLOAD_EACCELERATOR)
|
||||
|
||||
$(SOURCE_EACCELERATOR)/.unpacked: $(PACKAGE_EACCELERATOR)
|
||||
tar -C $(_SOURCES) -xjf $(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)
|
||||
|
||||
## ############################################################################
|
Binary file not shown.
Loading…
Reference in New Issue