binbuild.sh revision 29f36295d4e95ef41b3eb2c24908ee0638a32198
55c79512242fd281202cd57ca18defac696440f5kess# binbuild.sh - Builds an Apache binary distribution.
55c79512242fd281202cd57ca18defac696440f5kess# Initially written by Lars Eilebrecht <lars@apache.org>.
55c79512242fd281202cd57ca18defac696440f5kess# This script falls under the Apache License.
726b11c595edf0b0b71d0d39a2bc9d912c0ee4b5ndCONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max"
27e52281f1522522b170cafc76b08b58aa70ccaandif [ x$1 != x ]
3b3b7fc78d1f5bfc2769903375050048ff41ff26ndif [ ! -f ./ABOUT_APACHE ]
55c79512242fd281202cd57ca18defac696440f5kess echo "ERROR: The current directory contains no valid Apache distribution."
55c79512242fd281202cd57ca18defac696440f5kess echo "Please change the directory to the top level directory of a freshly"
55c79512242fd281202cd57ca18defac696440f5kess echo "unpacked Apache 1.3 source distribution and re-execute the script"
8f057347a12e831fdf567da83de2fa581580298dndif [ -d ./CVS ]
5b10fd3977e6dfff19afe770e612e276962f7950nd echo "ERROR: The current directory is a CVS checkout of Apache."
8f057347a12e831fdf567da83de2fa581580298dnd echo "Only a standard Apache 1.3 source distribution should be used to"
8f057347a12e831fdf567da83de2fa581580298dnd echo "create a binary distribution."
8f057347a12e831fdf567da83de2fa581580298dndecho "Building Apache $VER binary distribution..."
1ce7f356a70d1d9961ec315c212e2f83a1452456ndecho "Platform is \"$OS\"..."
1ce7f356a70d1d9961ec315c212e2f83a1452456nd echo "----------------------------------------------------------------------" && \
2fc082b48b1bfb1182d6b93f5837e74b0c0af3eckess echo "----------------------------------------------------------------------" && \
de502b36947f981bb79c4b3529b9f9f5edf35b2dkess echo "----------------------------------------------------------------------" && \
b3c7a2279fa7a45f5807d9a404760b9b3760df50nd echo "----------------------------------------------------------------------" && \
8ba890719035fe67c295c9124693138f9c5aa933kess echo "----------------------------------------------------------------------" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "----------------------------------------------------------------------" && \
62664c6703ed9e8d8f4f8e4c5f5e893559ecefecnd echo "ERROR: Failed to build Apache. See \"build.log\" for details."
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14ndecho "Binary image successfully created..."
1ce7f356a70d1d9961ec315c212e2f83a1452456ndecho "Creating supplementary files..."
55c79512242fd281202cd57ca18defac696440f5kess echo "This binary distribution is usable on a \"$OS\"" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "The distribution contains all standard Apache modules as shared" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "objects. This allows you to enable or disable particular modules" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "with the LoadModule/AddModule directives in the configuration file" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "See \"INSTALL.bindist\" on how to install the distribution." && \
909ce17e2bd0faef7b1c294f2307f009793fd493nd echo "NOTE: Please do not send support-related mails to the address mentioned" && \
55c79512242fd281202cd57ca18defac696440f5kess echo " above or to any member of the Apache Group! Support questions" && \
312d4192f2e32167a1e750034664f1e3c2105c65nd echo " should be directed to the \"comp.infosystems.www.servers.unix\"" && \
55c79512242fd281202cd57ca18defac696440f5kess echo " or \"comp.infosystems.www.servers.ms-windows\" newsgroup" && \
42af92a661a06b3cebc88d585aad75064a309d51nd echo " (as appropriate for the platform you use), where some of the" && \
42af92a661a06b3cebc88d585aad75064a309d51nd echo " Apache team lurk, in the company of many other Apache gurus" && \
312d4192f2e32167a1e750034664f1e3c2105c65nd echo " If you think you found a bug in Apache or have a suggestion please" && \
55c79512242fd281202cd57ca18defac696440f5kess echo " visit the bug report page at http://www.apache.org/bug_report.html" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "----------------------------------------------------------------------" && \
312d4192f2e32167a1e750034664f1e3c2105c65nd echo "----------------------------------------------------------------------" \
55c79512242fd281202cd57ca18defac696440f5kess echo "To install this binary distribution you have to execute the installation" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "script \"install-bindist.sh\" in the top-level directory of the distribution." && \
55c79512242fd281202cd57ca18defac696440f5kess echo "The script takes the ServerRoot directory into which you want to install" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "Apache as an option. If you ommit the option the default path" && \
e8b603fa9ccf7b17b11b42df6d8916fd97c2331dnd echo "Make sure you have write permissions in the target directory, e.g. switch" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "to user \"root\" before you execute the script." && \
55c79512242fd281202cd57ca18defac696440f5kess echo "See \"README.bindist\" for further details about this distribution." && \
55c79512242fd281202cd57ca18defac696440f5kess echo "Please note that this distribution includes the complete Apache source code." && \
611049e38bfbaeb173d2d7fab2e44a48753436a1nd echo "Therefore you may compile Apache yourself at any time if you have a compiler" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "See \"INSTALL\" for details on how to accomplish this." && \
55c79512242fd281202cd57ca18defac696440f5kess echo "# This script installs the Apache binary distribution and" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "# was automatically created by binbuild.sh." && \
1ce7f356a70d1d9961ec315c212e2f83a1452456nd echo " echo \"Failed to create directory: \${path}\"" && \
240e1b440b19476ecaa4aa9ff8d79afef74cb14and echo " (cd \${from} && tar -cf - *) | (cd \${to} && tar -xf -)" && \
1ce7f356a70d1d9961ec315c212e2f83a1452456nd echo " find \${to} -type f -print | xargs chmod \${fmode}" && \
55c79512242fd281202cd57ca18defac696440f5kess echo " find \${to} -type d -print | xargs chmod \${dmode}" && \
55c79512242fd281202cd57ca18defac696440f5kess echo "## determine path to (optional) Perl interpreter" && \
55c79512242fd281202cd57ca18defac696440f5kess echo " if \`\${dir}/\${pperl} -v | grep 'version 5\.' >/dev/null 2>&1\` ; then" && \
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd echo "echo \"Installing binary distribution for platform $OS\"" && \
echo "sed -e \"s;^#!/.*;#!\$PERL;\" -e \"s;\@prefix\@;\$SR;\" -e \"s;\@sbindir\@;\$SR/bin;\" \\" && \
echo "sed -e \"s%/usr/local/apache%\$SR%\" \$SR/conf/httpd.conf.default > \$SR/conf/httpd.conf" && \
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" && \
echo "ERROR: Failed to build Apache. See \"build.log\" for details."