diff options
Diffstat (limited to 'contrib/aix/buildbff.sh')
-rwxr-xr-x | contrib/aix/buildbff.sh | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/contrib/aix/buildbff.sh b/contrib/aix/buildbff.sh index 6c7aaf454..409588484 100755 --- a/contrib/aix/buildbff.sh +++ b/contrib/aix/buildbff.sh | |||
@@ -11,21 +11,14 @@ | |||
11 | 11 | ||
12 | umask 022 | 12 | umask 022 |
13 | PKGNAME=openssh | 13 | PKGNAME=openssh |
14 | PKGDIR=package | ||
14 | 15 | ||
15 | PATH=$PATH:`pwd` # set path for external tools | 16 | PATH=`pwd`:$PATH # set path for external tools |
16 | export PATH | 17 | export PATH |
17 | 18 | ||
18 | ## Extract common info requires for the 'info' part of the package. | 19 | # Clean build directory |
19 | VERSION=`tail -1 ../../version.h | sed -e 's/.*_\([0-9]\)/\1/g' | sed 's/\"$//'` | ||
20 | BFFVERSION=`echo $VERSION | sed 's/p/./g'` | ||
21 | |||
22 | echo "Building BFF for $PKGNAME $VERSION (package version $BFFVERSION)" | ||
23 | PKGDIR=package | ||
24 | |||
25 | # Clean build directory and package file | ||
26 | rm -rf $PKGDIR | 20 | rm -rf $PKGDIR |
27 | mkdir $PKGDIR | 21 | mkdir $PKGDIR |
28 | rm -f $PKGNAME-$VERSION.bff | ||
29 | 22 | ||
30 | if [ ! -f ../../Makefile ] | 23 | if [ ! -f ../../Makefile ] |
31 | then | 24 | then |
@@ -40,6 +33,29 @@ FAKE_ROOT=$START/$PKGDIR | |||
40 | cd ../.. | 33 | cd ../.. |
41 | make install-nokeys DESTDIR=$FAKE_ROOT | 34 | make install-nokeys DESTDIR=$FAKE_ROOT |
42 | 35 | ||
36 | if [ $? -gt 0 ] | ||
37 | then | ||
38 | echo "Fake root install failed, stopping." | ||
39 | exit 1 | ||
40 | fi | ||
41 | |||
42 | # | ||
43 | # Extract common info requires for the 'info' part of the package. | ||
44 | # AIX requires 4-part version numbers | ||
45 | # | ||
46 | VERSION=`./ssh -V 2>&1 | sed -e 's/,.*//' | cut -f 2 -d _` | ||
47 | MAJOR=`echo $VERSION | cut -f 1 -d p | cut -f 1 -d .` | ||
48 | MINOR=`echo $VERSION | cut -f 1 -d p | cut -f 2 -d .` | ||
49 | PATCH=`echo $VERSION | cut -f 1 -d p | cut -f 3 -d .` | ||
50 | PORTABLE=`echo $VERSION | cut -f 2 -d p` | ||
51 | if [ "$PATCH" = "" ] | ||
52 | then | ||
53 | PATCH=0 | ||
54 | fi | ||
55 | BFFVERSION=`printf "%d.%d.%d.%d" $MAJOR $MINOR $PATCH $PORTABLE` | ||
56 | |||
57 | echo "Building BFF for $PKGNAME $VERSION (package version $BFFVERSION)" | ||
58 | |||
43 | # | 59 | # |
44 | # Fill in some details, like prefix and sysconfdir | 60 | # Fill in some details, like prefix and sysconfdir |
45 | # the eval also expands variables like sysconfdir=${prefix}/etc | 61 | # the eval also expands variables like sysconfdir=${prefix}/etc |
@@ -175,6 +191,7 @@ mv ../lpp_name . | |||
175 | # file list on the fly and feed it to backup using -i | 191 | # file list on the fly and feed it to backup using -i |
176 | # | 192 | # |
177 | echo Creating $PKGNAME-$VERSION.bff with backup... | 193 | echo Creating $PKGNAME-$VERSION.bff with backup... |
194 | rm -f $PKGNAME-$VERSION.bff | ||
178 | ( | 195 | ( |
179 | echo "./lpp_name" | 196 | echo "./lpp_name" |
180 | find . ! -name lpp_name -a ! -name . -print | 197 | find . ! -name lpp_name -a ! -name . -print |