2
# Licensed to the Apache Software Foundation (ASF) under one or more
3
# contributor license agreements. See the NOTICE file distributed with
4
# this work for additional information regarding copyright ownership.
5
# The ASF licenses this file to You under the Apache License, Version 2.0
6
# (the "License"); you may not use this file except in compliance with
7
# the License. You may obtain a copy of the License at
9
# http://www.apache.org/licenses/LICENSE-2.0
11
# Unless required by applicable law or agreed to in writing, software
12
# distributed under the License is distributed on an "AS IS" BASIS,
13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
# See the License for the specific language governing permissions and
15
# limitations under the License.
19
# buildpkg.sh: This script builds a Solaris PKG from the source tree
23
PREFIX=/usr/local/apache2
24
TEMPDIR=/var/tmp/$USER/httpd-root
27
apr_config=`which apr-1-config`
28
apu_config=`which apu-1-config`
34
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
53
if [ ! -f "$apr_config" -a ! -f "$apr_config/configure.in" ]; then
54
echo "The apr source directory / apr-1-config could not be found"
55
echo "Usage: buildpkg [--with-apr=[dir|file]] [--with-apr-util=[dir|file]]"
59
if [ ! -f "$apu_config" -a ! -f "$apu_config/configure.in" ]; then
60
echo "The apu source directory / apu-1-config could not be found"
61
echo "Usage: buildpkg [--with-apr=[dir|file]] [--with-apr-util=[dir|file]]"
65
./configure --enable-layout=$LAYOUT \
66
--with-apr=$apr_config \
67
--with-apr-util=$apu_config \
68
--enable-mods-shared=all \
70
--with-ldap --enable-ldap --enable-authnz-ldap \
71
--enable-cache --enable-disk-cache --enable-mem-cache \
72
--enable-ssl --with-ssl \
73
--enable-deflate --enable-cgid \
74
--enable-proxy --enable-proxy-connect \
75
--enable-proxy-http --enable-proxy-ftp
78
make install DESTDIR=$TEMPDIR
80
cp build/pkg/pkginfo $TEMPDIR$PREFIX
84
echo "i pkginfo=./pkginfo" > prototype
85
find . -print | grep -v ./prototype | grep -v ./pkginfo | pkgproto | awk '{print $1" "$2" "$3" "$4" root bin"}' >> prototype
87
pkgmk -r $TEMPDIR$PREFIX -d $TEMPDIR/pkg
90
pkgtrans -s $TEMPDIR/pkg $current/$NAME-$VERSION-$ARCH-local
91
gzip $current/$NAME-$VERSION-$ARCH-local