~ubuntu-branches/ubuntu/trusty/subversion/trusty-proposed

« back to all changes in this revision

Viewing changes to packages/solaris/buildpkg.sh

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft
  • Date: 2012-06-21 15:36:36 UTC
  • mfrom: (0.4.13 sid)
  • Revision ID: package-import@ubuntu.com-20120621153636-amqqmuidgwgxz1ly
Tags: 1.7.5-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - Create pot file on build.
  - Build a python-subversion-dbg package.
  - Build-depend on python-dbg.
  - Build-depend on default-jre-headless/-jdk.
  - Do not apply java-build patch.
  - debian/rules: Manually create the doxygen output directory, otherwise
    we get weird build failures when running parallel builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
7
 
#
8
 
#    http://www.apache.org/licenses/LICENSE-2.0
9
 
#
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.
15
 
#
16
 
#
17
 
 
18
 
# buildpkg.sh: This script builds a Solaris PKG from the source tree
19
 
#              provided.
20
 
 
21
 
PREFIX=/usr/local/
22
 
TEMPDIR=/var/tmp/$USER/subversion-root
23
 
rm -rf $TEMPDIR
24
 
 
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=
31
 
 
32
 
while test $# -gt 0 
33
 
do
34
 
  # Normalize
35
 
  case "$1" in
36
 
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
37
 
  *) optarg= ;;
38
 
  esac
39
 
 
40
 
  case "$1" in
41
 
  --with-apr=*)
42
 
  apr_config=$optarg
43
 
  ;;
44
 
  esac
45
 
 
46
 
  case "$1" in
47
 
  --with-apr-util=*)
48
 
  apu_config=$optarg
49
 
  ;;
50
 
  esac
51
 
 
52
 
  case "$1" in
53
 
  --with-neon=*)
54
 
  neon_config=$optarg
55
 
  ;;
56
 
  esac
57
 
 
58
 
  case "$1" in
59
 
  --with-apxs=*)
60
 
  apxs="--with-apxs=$optarg"
61
 
  ;;
62
 
  esac
63
 
 
64
 
  case "$1" in
65
 
  --prefix=*)
66
 
  PREFIX=$optarg
67
 
  esac
68
 
 
69
 
  shift
70
 
done
71
 
 
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
76
 
fi
77
 
 
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
82
 
fi
83
 
 
84
 
./configure --prefix=$PREFIX \
85
 
            --with-apr=$apr_config \
86
 
            --with-apr-util=$apu_config \
87
 
            --with-neon=$neon_config \
88
 
            $apxs --with-ssl
89
 
 
90
 
make
91
 
make install DESTDIR=$TEMPDIR
92
 
. packages/solaris/pkginfo
93
 
cp packages/solaris/pkginfo $TEMPDIR$PREFIX
94
 
 
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
101
 
 
102
 
cd $current
103
 
pkgtrans -s $TEMPDIR/pkg $current/$NAME-$VERSION-$ARCH-local
104
 
gzip $current/$NAME-$VERSION-$ARCH-local
105
 
 
106
 
rm -rf $TEMPDIR
107