db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding# Licensed to the Apache Software Foundation (ASF) under one or more
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding# contributor license agreements. See the NOTICE file distributed with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding# this work for additional information regarding copyright ownership.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding# The ASF licenses this file to You under the Apache License, Version 2.0
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding# (the "License"); you may not use this file except in compliance with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding# the License. You may obtain a copy of the License at
240b85022b73af58a6d971cd3d05d54037d8f682nd# Unless required by applicable law or agreed to in writing, software
240b85022b73af58a6d971cd3d05d54037d8f682nd# distributed under the License is distributed on an "AS IS" BASIS,
240b85022b73af58a6d971cd3d05d54037d8f682nd# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
240b85022b73af58a6d971cd3d05d54037d8f682nd# See the License for the specific language governing permissions and
240b85022b73af58a6d971cd3d05d54037d8f682nd# limitations under the License.
240b85022b73af58a6d971cd3d05d54037d8f682nd# binbuild.sh - Builds an Apache binary distribution.
240b85022b73af58a6d971cd3d05d54037d8f682nd# Initially written by Lars Eilebrecht <lars apache.org>.
abe277e8a4d9853f601b149f7a3cd62e58c2145etrawickCONFIGPARAM="--enable-layout=Apache --prefix=$BUILD_DIR --enable-mods-shared=most --with-expat=$APFULLDIR/srclib/apr-util/xml/expat --enable-static-support"
7559b8d0f626adc4721ab6cdd37a8c9240ab297dwsanchezif [ x$MD5 = x ]; then
7559b8d0f626adc4721ab6cdd37a8c9240ab297dwsanchez if [ x$OPENSSL != x ]; then
f2bb0fcbae983ee168351523a860675292b18e5arbbif [ x$1 != x ]; then
86d87cb5057a62612a598348e737c4ab5a0a657cwsanchezif [ ! -f ./ABOUT_APACHE ]; then
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"
86d87cb5057a62612a598348e737c4ab5a0a657cwsanchezif [ -d ./CVS ]; then
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."
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingecho "Building Apache $VER binary distribution..."
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingecho "Platform is \"$OS\"..."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding( echo "Build log for Apache binary distribution" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "----------------------------------------------------------------------" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "ERROR: Failed to build Apache. See \"build.log\" for details."
6c423f77cd58c4eb48f5c489d05f5f976c1e74ddlarsecho "Binary image successfully created..."
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingecho "Creating supplementary files..."
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "This binary distribution is usable on a \"$OS\"" && \
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 "See \"INSTALL.bindist\" on how to install the distribution." && \
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" && \
4481373210a7c58c0f059410a1ad80593cdbdb09slive echo " should be directed to the forums mentioned at" && \
4481373210a7c58c0f059410a1ad80593cdbdb09slive echo " http://httpd.apache.org/lists.html#http-users" && \
4481373210a7c58c0f059410a1ad80593cdbdb09slive echo " where some of the Apache team lurk, in the company of many other" && \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo " If you think you found a bug in Apache or have a suggestion please" && \
4481373210a7c58c0f059410a1ad80593cdbdb09slive echo " visit the bug report page at http://httpd.apache.org/bug_report.html" && \
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 "The script takes the ServerRoot directory into which you want to install" && \
5a322de173626af6d7e4e3e6bb67082ae5e7981egregames echo "Apache as an option. If you omit the option the default path" && \
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 "See \"README.bindist\" for further details about this distribution." && \
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 "See \"INSTALL\" for details on how to accomplish this." && \
245cc5a2ec164cde44aa9849a78d8fa144d83e25gregames -e "s%\@ver\@%$VER%" \
43162230430f8144afe9c32cd0e60b927f4e0a60gregames -e "s%\@os\@%$OS%" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding -e "s%^ServerAdmin.*%ServerAdmin you@your.address%" \
888d5172c9670a1a6278556625f1f6199ec53a2dfielding -e "s%#ServerName.*%#ServerName localhost%" \
5a322de173626af6d7e4e3e6bb67082ae5e7981egregamescp bindist/conf/httpd.conf bindist/conf/httpd-std.conf
888d5172c9670a1a6278556625f1f6199ec53a2dfieldingecho "Creating distribution archive and readme file..."
86d87cb5057a62612a598348e737c4ab5a0a657cwsanchezif [ ".`grep -i error build.log > /dev/null`" != . ]; then
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "ERROR: Failed to build Apache. See \"build.log\" for details."
1ef186dcdfff29426aa8a691de246acf59b4b27cwsanchez x*os390*) $TAR -cfU ../httpd-$VER-$OS.tar -C .. httpd-$VER;;
1ef186dcdfff29426aa8a691de246acf59b4b27cwsanchez *) (cd .. && $TAR -cf httpd-$VER-$OS.tar httpd-$VER);;
1ef186dcdfff29426aa8a691de246acf59b4b27cwsanchez echo "WARNING: Could not find a 'gzip' program!"
1aba7f1bb88a52b323b7ba4d635a8bdb86f7998ewsanchez echo " tar archive is not compressed."
1ef186dcdfff29426aa8a691de246acf59b4b27cwsanchez echo "ERROR: Could not find a 'tar' program!"
1ef186dcdfff29426aa8a691de246acf59b4b27cwsanchez echo " Please execute the following commands manually:"
1ef186dcdfff29426aa8a691de246acf59b4b27cwsanchez echo " tar -cf ../httpd-$VER-$OS.tar ."
1ef186dcdfff29426aa8a691de246acf59b4b27cwsanchez echo " gzip -9 ../httpd-$VER-$OS.tar"
472b7522e5fdba2ed7890a6ca14ca3986ca4a63cwsanchez if [ -f $ARCHIVE ] && [ -f ../httpd-$VER-$OS.README ]; then
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "Ready."
472b7522e5fdba2ed7890a6ca14ca3986ca4a63cwsanchez echo "You can find the binary archive ($ARCHIVE)"
94a719cfed2369f14a96e1835623198c2df96080rbb echo "and the readme file (httpd-$VER-$OS.README) in the"
888d5172c9670a1a6278556625f1f6199ec53a2dfielding echo "parent directory."
7559b8d0f626adc4721ab6cdd37a8c9240ab297dwsanchez echo "ERROR: Archive or README is missing."