binbuild.sh revision 832923c3efd3343644ced4a6a65b16cd1edc05e5
888d5172c9670a1a6278556625f1f6199ec53a2dfielding#!/bin/sh
888d5172c9670a1a6278556625f1f6199ec53a2dfielding#
888d5172c9670a1a6278556625f1f6199ec53a2dfielding# binbuild.sh - Builds an Apache binary distribution.
888d5172c9670a1a6278556625f1f6199ec53a2dfielding# Initially written by Lars Eilebrecht <lars@apache.org>.
888d5172c9670a1a6278556625f1f6199ec53a2dfielding#
888d5172c9670a1a6278556625f1f6199ec53a2dfielding# This script falls under the Apache License.
888d5172c9670a1a6278556625f1f6199ec53a2dfielding# See http://www.apache.org/docs/LICENSE
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
62c34f2ec7702e37bb57679c3bfe624bc9822de4rbbOS=`./config.guess`
f2bb0fcbae983ee168351523a860675292b18e5arbbCONFIGPARAM="--with-layout=BinaryDistribution --prefix=`pwd`/bindist"
8e157dab9212d6770973543a56bf644387e5a178jimAPDIR=`pwd`
8e157dab9212d6770973543a56bf644387e5a178jimAPDIR=`basename $APDIR`
f2bb0fcbae983ee168351523a860675292b18e5arbbVER=`echo $APDIR |sed s/apache_//`
62c34f2ec7702e37bb57679c3bfe624bc9822de4rbbTAR="`build/PrintPath tar`"
62c34f2ec7702e37bb57679c3bfe624bc9822de4rbbGTAR="`build/PrintPath gtar`"
62c34f2ec7702e37bb57679c3bfe624bc9822de4rbbGZIP="`build/PrintPath gzip`"
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlars
f2bb0fcbae983ee168351523a860675292b18e5arbbif [ x$1 != x ]; then
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlars USER=$1
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlarselse
62c34f2ec7702e37bb57679c3bfe624bc9822de4rbb USER="`build/buildinfo.sh -n %u@%h%d`"
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlarsfi
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingif [ ! -f ./ABOUT_APACHE ]
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingthen
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "ERROR: The current directory contains no valid Apache distribution."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "Please change the directory to the top level directory of a freshly"
62c34f2ec7702e37bb57679c3bfe624bc9822de4rbb echo "unpacked Apache 2.0 source distribution and re-execute the script"
62c34f2ec7702e37bb57679c3bfe624bc9822de4rbb echo "'./build/bindbuild.sh'."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding exit 1;
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingfi
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingif [ -d ./CVS ]
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingthen
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "ERROR: The current directory is a CVS checkout of Apache."
62c34f2ec7702e37bb57679c3bfe624bc9822de4rbb echo "Only a standard Apache 2.0 source distribution should be used to"
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "create a binary distribution."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding exit 1;
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingfi
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingecho "Building Apache $VER binary distribution..."
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingecho "Platform is \"$OS\"..."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
888d5172c9670a1a6278556625f1f6199ec53a2dfielding( echo "Build log for Apache binary distribution" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding ./configure $CONFIGPARAM && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding make clean && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding rm -rf bindist install-bindist.sh *.bindist
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding make && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
f2bb0fcbae983ee168351523a860675292b18e5arbb make install root="bindist/" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding make clean && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "[EOF]" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding) > build.log 2>&1
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingif [ ! -f ./bindist/bin/httpd ]
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingthen
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "ERROR: Failed to build Apache. See \"build.log\" for details."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding exit 1;
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingfi
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlarsecho "Binary image successfully created..."
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlars
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlars./bindist/bin/httpd -v
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlars
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingecho "Creating supplementary files..."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
888d5172c9670a1a6278556625f1f6199ec53a2dfielding( echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "Apache $VER binary distribution" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "================================" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "This binary distribution is usable on a \"$OS\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "system and was built by \"$USER\"." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "The distribution contains all standard Apache modules as shared" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "objects. This allows you to enable or disable particular modules" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "with the LoadModule/AddModule directives in the configuration file" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "without the need to re-compile Apache." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "See \"INSTALL.bindist\" on how to install the distribution." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "NOTE: Please do not send support-related mails to the address mentioned" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " above or to any member of the Apache Group! Support questions" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " should be directed to the \"comp.infosystems.www.servers.unix\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " or \"comp.infosystems.www.servers.ms-windows\" newsgroup" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " (as appropriate for the platform you use), where some of the" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " Apache team lurk, in the company of many other Apache gurus" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " who should be able to help." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " If you think you found a bug in Apache or have a suggestion please" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " visit the bug report page at http://www.apache.org/bug_report.html" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding ./bindist/bin/httpd -V && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding) > README.bindist
71abf82bde7656b0bf32d4b20818b70abdec8d16larscp README.bindist ../apache_$VER-$OS.README
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
888d5172c9670a1a6278556625f1f6199ec53a2dfielding( echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "Apache $VER binary installation" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "================================" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "To install this binary distribution you have to execute the installation" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "script \"install-bindist.sh\" in the top-level directory of the distribution." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "The script takes the ServerRoot directory into which you want to install" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "Apache as an option. If you ommit the option the default path" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "\"/usr/local/apache\" is used." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "Make sure you have write permissions in the target directory, e.g. switch" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "to user \"root\" before you execute the script." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "See \"README.bindist\" for further details about this distribution." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "Please note that this distribution includes the complete Apache source code." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "Therefore you may compile Apache yourself at any time if you have a compiler" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "installation on your system." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "See \"INSTALL\" for details on how to accomplish this." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " " \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding) > INSTALL.bindist
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
888d5172c9670a1a6278556625f1f6199ec53a2dfielding( echo "#!/bin/sh" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "#" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "# Usage: install-bindist.sh [ServerRoot]" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "# This script installs the Apache binary distribution and" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "# was automatically created by binbuild.sh." && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " " && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lmkdir()" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "{" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " path=\"\"" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " dirs=\`echo \$1 | sed -e 's%/% %g'\`" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " mode=\$2" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " " && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " set -- \${dirs}" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " " && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " for d in \${dirs}" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " do" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " path=\"\${path}/\$d\"" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " if test ! -d \"\${path}\" ; then" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " mkdir \${path}" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " if test \$? -ne 0 ; then" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " echo \"Failed to create directory: \${path}\"" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " exit 1" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " fi" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " chmod \${mode} \${path}" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " fi" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " done" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "}" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " " && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lcopy()" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "{" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " from=\$1" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " to=\$2" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " dmode=\$3" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " fmode=\$4" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " " && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " test -d \${to} || lmkdir \${to} \${dmode}" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " (cd \${from} && tar -cf - *) | (cd \${to} && tar -xf -)" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " " && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " if test \"X\${fmode}\" != X ; then" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " find \${to} -type f -print | xargs chmod \${fmode}" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " fi" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " if test \"X\${dmode}\" != X ; then" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " find \${to} -type d -print | xargs chmod \${dmode}" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " fi" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "}" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " " && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "##" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "## determine path to (optional) Perl interpreter" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "##" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo "PERL=no-perl5-on-this-system" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo "perls='perl5 perl'" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo "path=\`echo \$PATH | sed -e 's/:/ /g'\`" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo " " && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo "for dir in \${path} ; do" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo " for pperl in \${perls} ; do" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo " if test -f \"\${dir}/\${pperl}\" ; then" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo " if \`\${dir}/\${pperl} -v | grep 'version 5\.' >/dev/null 2>&1\` ; then" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo " PERL=\"\${dir}/\${pperl}\"" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo " break" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo " fi" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo " fi" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo " done" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo "done" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "if [ .\$1 = . ]" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "then" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " SR=/usr/local/apache" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "else" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " SR=\$1" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "fi" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \"Installing binary distribution for platform $OS\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \"into directory \$SR ...\"" && \
a75c915ed35cab08df1518939f2dd774def23fb4randy echo "lmkdir \$SR 755" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lmkdir \$SR/proxy 750" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lmkdir \$SR/logs 750" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lcopy bindist/man \$SR/man 755 644" && \
62c34f2ec7702e37bb57679c3bfe624bc9822de4rbb echo "lcopy bindist/modules \$SR/modules 750 644" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lcopy bindist/include \$SR/include 755 644" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lcopy bindist/icons \$SR/icons 755 644" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lcopy bindist/cgi-bin \$SR/cgi-bin 750 750" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lcopy bindist/bin \$SR/bin 750 750" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "if [ -d \$SR/conf ]" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "then" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " echo \"[Preserving existing configuration files.]\"" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " cp bindist/conf/*.default \$SR/conf/" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "else" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " lcopy bindist/conf \$SR/conf 750 640" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "fi" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "if [ -d \$SR/htdocs ]" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "then" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " echo \"[Preserving existing htdocs directory.]\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "else" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " lcopy bindist/htdocs \$SR/htdocs 755 644" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "fi" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " " && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "sed -e \"s;^#!/.*;#!\$PERL;\" -e \"s;\@prefix\@;\$SR;\" -e \"s;\@sbindir\@;\$SR/bin;\" \\" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " -e \"s;\@libexecdir\@;\$SR/libexec;\" -e \"s;\@includedir\@;\$SR/include;\" \\" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " -e \"s;\@sysconfdir\@;\$SR/conf;\" bindist/bin/apxs > \$SR/bin/apxs" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "sed -e \"s;^#!/.*;#!\$PERL;\" bindist/bin/dbmmanage > \$SR/bin/dbmmanage" && \
832923c3efd3343644ced4a6a65b16cd1edc05e5rbb echo "sed -e \"s%/usr/local/apache%\$SR%\" \$SR/conf/httpd-std.conf > \$SR/conf/httpd.conf" && \
29f36295d4e95ef41b3eb2c24908ee0638a32198randy echo "sed -e \"s%PIDFILE=%PIDFILE=\$SR/%\" -e \"s%HTTPD=%HTTPD=\\\"\$SR/%\" -e \"s%httpd\$%httpd -d \$SR -R \$SR/libexec\\\"%\" bindist/bin/apachectl > \$SR/bin/apachectl" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \"Ready.\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" +--------------------------------------------------------+\"" && \
fe91ea62b1c4a963f6abae07f9735a53a719058clars echo "echo \" | You now have successfully installed the Apache $VER |\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" | HTTP server. To verify that Apache actually works |\"" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "echo \" | correctly you should first check the (initially |\"" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "echo \" | created or preserved) configuration files: |\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" | |\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" | \$SR/conf/httpd.conf\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" | |\"" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "echo \" | You should then be able to immediately fire up |\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" | Apache the first time by running: |\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" | |\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" | \$SR/bin/apachectl start \"" &&\
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" | |\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" | Thanks for using Apache. The Apache Group |\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" | http://www.apache.org/ |\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" +--------------------------------------------------------+\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" \"" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding) > install-bindist.sh
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingchmod 755 install-bindist.sh
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
834caab060084ddfe4c2aa8c79e8fe4442d666dcrandysed -e "s%\"htdocs%\"/usr/local/apache/htdocs%" \
834caab060084ddfe4c2aa8c79e8fe4442d666dcrandy -e "s%\"icons%\"/usr/local/apache/icons%" \
834caab060084ddfe4c2aa8c79e8fe4442d666dcrandy -e "s%\"cgi-bin%\"/usr/local/apache/cgi-bin%" \
834caab060084ddfe4c2aa8c79e8fe4442d666dcrandy -e "s%\"proxy%\"/usr/local/apache/proxy%" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding -e "s%^ServerAdmin.*%ServerAdmin you@your.address%" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding -e "s%#ServerName.*%#ServerName localhost%" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding -e "s%Port 8080%Port 80%" \
832923c3efd3343644ced4a6a65b16cd1edc05e5rbb bindist/conf/httpd-std.conf > bindist/conf/httpd.conf
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingcp bindist/conf/httpd.conf bindist/conf/httpd.conf.default
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingecho "Creating distribution archive and readme file..."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingif [ ".`grep -i error build.log > /dev/null`" != . ]
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingthen
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "ERROR: Failed to build Apache. See \"build.log\" for details."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding exit 1;
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingelse
df202f09032c0717cd4279320c24115084bbefebjim if [ "x$GTAR" != "x" ]
888d5172c9670a1a6278556625f1f6199ec53a2dfielding then
1abda201e49646ada8a4d90d63f82a850034c63dlars $GTAR -zcf ../apache_$VER-$OS.tar.gz -C .. apache_$VER
888d5172c9670a1a6278556625f1f6199ec53a2dfielding else
df202f09032c0717cd4279320c24115084bbefebjim if [ "x$TAR" != "x" ]
888d5172c9670a1a6278556625f1f6199ec53a2dfielding then
60dbb6f90b15c60c24631ffde53ca3c70ff33287martin case "x$OS" in
1621254cf82b58cfac8fa84c0d28b1bebb90c0c8stoddard x*390*) $TAR -cfU ../apache_$VER-$OS.tar -C .. apache_$VER;;
3fa13f6e3793f6a3f3c4523787c5e18279450c52gstein *) (cd .. && $TAR -cf apache_$VER-$OS.tar apache_$VER);;
60dbb6f90b15c60c24631ffde53ca3c70ff33287martin esac
df202f09032c0717cd4279320c24115084bbefebjim if [ "x$GZIP" != "x" ]
888d5172c9670a1a6278556625f1f6199ec53a2dfielding then
71abf82bde7656b0bf32d4b20818b70abdec8d16lars $GZIP ../apache_$VER-$OS.tar
888d5172c9670a1a6278556625f1f6199ec53a2dfielding fi
888d5172c9670a1a6278556625f1f6199ec53a2dfielding else
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "ERROR: Could not find a 'tar' program!"
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " Please execute the following commands manually:"
71abf82bde7656b0bf32d4b20818b70abdec8d16lars echo " tar -cf ../apache_$VER-$OS.tar ."
71abf82bde7656b0bf32d4b20818b70abdec8d16lars echo " gzip ../apache_$VER-$OS.tar"
888d5172c9670a1a6278556625f1f6199ec53a2dfielding fi
888d5172c9670a1a6278556625f1f6199ec53a2dfielding fi
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
71abf82bde7656b0bf32d4b20818b70abdec8d16lars if [ -f ../apache_$VER-$OS.tar.gz ] && [ -f ../apache_$VER-$OS.README ]
888d5172c9670a1a6278556625f1f6199ec53a2dfielding then
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "Ready."
71abf82bde7656b0bf32d4b20818b70abdec8d16lars echo "You can find the binary archive (apache_$VER-$OS.tar.gz)"
71abf82bde7656b0bf32d4b20818b70abdec8d16lars echo "and the readme file (apache_$VER-$OS.README) in the"
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "parent directory."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding exit 0;
888d5172c9670a1a6278556625f1f6199ec53a2dfielding else
888d5172c9670a1a6278556625f1f6199ec53a2dfielding exit 1;
888d5172c9670a1a6278556625f1f6199ec53a2dfielding fi
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingfi