binbuild.sh revision 432100a6b78199e710fde202ea669e8069d7bfd6
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
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlarsCONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max"
8e157dab9212d6770973543a56bf644387e5a178jimAPDIR=`pwd`
8e157dab9212d6770973543a56bf644387e5a178jimAPDIR=`basename $APDIR`
71abf82bde7656b0bf32d4b20818b70abdec8d16larsVER=`echo $APDIR |sed s/apache_//`
8e157dab9212d6770973543a56bf644387e5a178jimOS=`src/helpers/GuessOS`
8e157dab9212d6770973543a56bf644387e5a178jimTAR="`src/helpers/PrintPath tar`"
8e157dab9212d6770973543a56bf644387e5a178jimGTAR="`src/helpers/PrintPath gtar`"
8e157dab9212d6770973543a56bf644387e5a178jimGZIP="`src/helpers/PrintPath gzip`"
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlars
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlarsif [ x$1 != x ]
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlarsthen
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlars USER=$1
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlarselse
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlars USER="`src/helpers/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"
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "unpacked Apache 1.3 source distribution and re-execute the script"
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "'./src/helpers/bindbuild.sh'."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding exit 1;
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingfi
888d5172c9670a1a6278556625f1f6199ec53a2dfielding
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingif [ -d ./CVS ]
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingthen
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "ERROR: The current directory is a CVS checkout of Apache."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "Only a standard Apache 1.3 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 "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding make install-quiet 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 "##" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "PERL=no-perl-on-this-system" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "perlpath=\"\`src/helpers/PrintPath perl5 perl miniperl\`\"" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "if [ \"x\$perlpath\" != \"x\" ]; then" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo " PERL=\"\$perlpath\"" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "fi" && \
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 ...\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "./src/helpers/mkdir.sh \$SR" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lmkdir \$SR/proxy 750" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lmkdir \$SR/logs 750" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lcopy bindist/man \$SR/man 755 644" && \
432100a6b78199e710fde202ea669e8069d7bfd6randy echo "lcopy bindist/libexec \$SR/libexec 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" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "sed -e s%/usr/local/apache%\$SR/% \$SR/conf/httpd.conf.default > \$SR/conf/httpd.conf" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "sed -e s%PIDFILE=%PIDFILE=\$SR/% -e s%HTTPD=%HTTPD=\\\"\$SR/% -e \"s%/httpd$%/httpd -d \$SR\\\"%\" bindist/bin/apachectl > \$SR/bin/apachectl" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " " && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \"Ready.\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "echo \" +--------------------------------------------------------+\"" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding 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
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingsed -e "s%\"/htdocs%\"/usr/local/apache/htdocs%" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding -e "s%\"/icons%\"/usr/local/apache/icons%" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding -e "s%\"/cgi-bin%\"/usr/local/apache/cgi-bin%" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding -e "s%^ServerAdmin.*%ServerAdmin you@your.address%" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding -e "s%#ServerName.*%#ServerName localhost%" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding -e "s%Port 8080%Port 80%" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding bindist/conf/httpd.conf.default > 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
71abf82bde7656b0bf32d4b20818b70abdec8d16lars $TAR -cf ../apache_$VER-$OS.tar -C .. apache_$VER
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