Remove no-longer-used svn_*_get_mergeinfo_for_tree APIs.
[svn.git] / packages / solaris / buildpkg.sh
blob79b3757fc05dc6364027fead20e5e6c184b3e0a5
1 #!/bin/sh
2 # Copyright 2000-2004 The Apache Software Foundation
3 #
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
19 # provided.
21 PREFIX=/usr/local/
22 TEMPDIR=/var/tmp/$USER/subversion-root
23 rm -rf $TEMPDIR
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`
30 apxs=
32 while test $# -gt 0
34 # Normalize
35 case "$1" in
36 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
37 *) optarg= ;;
38 esac
40 case "$1" in
41 --with-apr=*)
42 apr_config=$optarg
44 esac
46 case "$1" in
47 --with-apr-util=*)
48 apu_config=$optarg
50 esac
52 case "$1" in
53 --with-neon=*)
54 neon_config=$optarg
56 esac
58 case "$1" in
59 --with-apxs=*)
60 apxs="--with-apxs=$optarg"
62 esac
64 case "$1" in
65 --prefix=*)
66 PREFIX=$optarg
67 esac
69 shift
70 done
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]]"
75 exit 1
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]]"
81 exit 1
84 ./configure --prefix=$PREFIX \
85 --with-apr=$apr_config \
86 --with-apr-util=$apu_config \
87 --with-neon=$neon_config \
88 $apxs --with-ssl
90 make
91 make install DESTDIR=$TEMPDIR
92 . packages/solaris/pkginfo
93 cp packages/solaris/pkginfo $TEMPDIR$PREFIX
95 current=`pwd`
96 cd $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
99 mkdir $TEMPDIR/pkg
100 pkgmk -r $TEMPDIR$PREFIX -d $TEMPDIR/pkg
102 cd $current
103 pkgtrans -s $TEMPDIR/pkg $current/$NAME-$VERSION-$ARCH-local
104 gzip $current/$NAME-$VERSION-$ARCH-local
106 rm -rf $TEMPDIR