2
# Copyright 2000-2004 The Apache Software Foundation
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
# you may not use this file except in compliance with the License.
6
# You may obtain a copy of the License at
8
# http://www.apache.org/licenses/LICENSE-2.0
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
18
# buildpkg.sh: This script builds a Solaris PKG from the source tree
22
TEMPDIR=/var/tmp/$USER/subversion-root
25
apr_config=`which apr-config`
26
apu_config=`which apu-config`
27
neon_config=`which neon-config`
28
neon_config=`dirname $neon_config`
29
neon_config=`dirname $neon_config`
36
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
60
apxs="--with-apxs=$optarg"
72
if [ ! -f $apr_config -a ! -f $apr_config/configure.in ]; then
73
echo "The apr source directory / apr-config could not be found"
74
echo "Usage: buildpkg [--with-apr=[dir|file]] [--with-apr-util=[dir|file]]"
78
if [ ! -f $apu_config -a ! -f $apu_config/configure.in ]; then
79
echo "The apu source directory / apu-config could not be found"
80
echo "Usage: buildpkg [--with-apr=[dir|file]] [--with-apr-util=[dir|file]]"
84
./configure --prefix=$PREFIX \
85
--with-apr=$apr_config \
86
--with-apr-util=$apu_config \
87
--with-neon=$neon_config \
91
make install DESTDIR=$TEMPDIR
92
. packages/solaris/pkginfo
93
cp packages/solaris/pkginfo $TEMPDIR$PREFIX
97
echo "i pkginfo=./pkginfo" > prototype
98
find . -print | grep -v ./prototype | grep -v ./pkginfo | pkgproto | awk '{print $1" "$2" "$3" "$4" root bin"}' >> prototype
100
pkgmk -r $TEMPDIR$PREFIX -d $TEMPDIR/pkg
103
pkgtrans -s $TEMPDIR/pkg $current/$NAME-$VERSION-$ARCH-local
104
gzip $current/$NAME-$VERSION-$ARCH-local