binbuild.sh revision 8e157dab9212d6770973543a56bf644387e5a178
#
# binbuild.sh - Builds an Apache binary distribution.
# Initially written by Lars Eilebrecht <lars@apache.org>.
#
# This script falls under the Apache License.
APDIR=`pwd`
CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max"
if [ ! -f ./ABOUT_APACHE ]
then
echo "ERROR: The current directory contains no valid Apache distribution."
echo "Please change the directory to the top level directory of a freshly"
echo "unpacked Apache 1.3 source distribution and re-execute the script"
echo "'./src/helpers/bindbuild.sh'."
exit 1;
fi
if [ -d ./CVS ]
then
echo "ERROR: The current directory is a CVS checkout of Apache."
echo "Only a standard Apache 1.3 source distribution should be used to"
echo "create a binary distribution."
exit 1;
fi
echo "Building Apache $VER binary distribution..."
echo "Platform is \"$OS\"..."
( echo "Build log for Apache binary distribution" && \
echo "----------------------------------------------------------------------" && \
./configure $CONFIGPARAM && \
echo "----------------------------------------------------------------------" && \
echo "----------------------------------------------------------------------" && \
make && \
echo "----------------------------------------------------------------------" && \
echo "----------------------------------------------------------------------" && \
echo "----------------------------------------------------------------------" && \
echo "[EOF]" \
then
echo "ERROR: Failed to build Apache. See \"build.log\" for details."
exit 1;
fi
echo "Binary images successfully created..."
echo "Creating supplementary files..."
( echo " " && \
echo "================================" && \
echo " " && \
echo "" && \
echo "The distribution contains all standard Apache modules as shared" && \
echo "objects. This allows you to enable or disable particular modules" && \
echo "without the need to re-compile Apache." && \
echo "" && \
echo " " && \
echo "NOTE: Please do not send support-related mails to the address mentioned" && \
echo " above or to any member of the Apache Group! Support questions" && \
echo " (as appropriate for the platform you use), where some of the" && \
echo " Apache team lurk, in the company of many other Apache gurus" && \
echo " who should be able to help." && \
echo " If you think you found a bug in Apache or have a suggestion please" && \
echo " " && \
echo "----------------------------------------------------------------------" && \
echo "----------------------------------------------------------------------" \
) > README.bindist
( echo " " && \
echo "================================" && \
echo " " && \
echo "To install this binary distribution you have to execute the installation" && \
echo " " && \
echo "The script takes the ServerRoot directory into which you want to install" && \
echo "Apache as an option. If you ommit the option the default path" && \
echo "to user \"root\" before you execute the script." && \
echo " " && \
echo " " && \
echo "Please note that this distribution includes the complete Apache source code." && \
echo "Therefore you may compile Apache yourself at any time if you have a compiler" && \
echo "installation on your system." && \
echo "See \"INSTALL\" for details on how to accomplish this." && \
echo " " \
) > INSTALL.bindist
echo "#" && \
echo "# This script installs the Apache binary distribution and" && \
echo " " && \
echo "if [ .\$1 = . ]" && \
echo "then" && \
echo "else" && \
echo " SR=\$1" && \
echo "fi" && \
echo "echo \"into directory \$SR ...\"" && \
echo "then" && \
echo " echo \"[Preserving existing configuration files.]\"" && \
echo "else" && \
echo "fi" && \
echo "then" && \
echo " echo \"[Preserving existing htdocs directory.]\"" && \
echo "else" && \
echo "fi" && \
echo "sed -e s%PIDFILE=%PIDFILE=\$SR/% -e s%HTTPD=%HTTPD=\\\"\$SR/% -e \"s%/httpd$%/httpd -d \$SR\\\"%\" bindist/bin/apachectl > \$SR/bin/apachectl" && \
echo " " && \
echo "echo \"Ready.\"" && \
echo "echo \" +--------------------------------------------------------+\"" && \
echo "echo \" | HTTP server. To verify that Apache actually works |\"" && \
echo "echo \" | correctly you now should first check the (initially |\"" && \
echo "echo \" | created or preserved) configuration files |\"" && \
echo "echo \" | |\"" && \
echo "echo \" | |\"" && \
echo "echo \" | and then you should be able to immediately fire up |\"" && \
echo "echo \" | Apache the first time by running: |\"" && \
echo "echo \" | |\"" && \
echo "echo \" | |\"" && \
echo "echo \" | Thanks for using Apache. The Apache Group |\"" && \
echo "echo \" +--------------------------------------------------------+\"" && \
echo "echo \" \"" \
-e "s%^ServerAdmin.*%ServerAdmin you@your.address%" \
-e "s%#ServerName.*%#ServerName localhost%" \
-e "s%Port 8080%Port 80%" \
echo "Creating distribution archive and readme file..."
then
echo "ERROR: Failed to build Apache. See \"build.log\" for details."
exit 1;
else
if [ ".$GTAR" != . ]
then
else
if [ ".$TAR" != . ]
then
if [ ".$GZIP" != . ]
then
fi
else
echo "ERROR: Could not find a 'tar' program!"
echo " Please execute the following commands manually:"
fi
fi
then
echo "Ready."
echo "parent directory."
exit 0;
else
exit 1;
fi
fi