summaryrefslogtreecommitdiff
path: root/contrib/aix/buildbff.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/aix/buildbff.sh')
-rwxr-xr-xcontrib/aix/buildbff.sh37
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
12umask 022 12umask 022
13PKGNAME=openssh 13PKGNAME=openssh
14PKGDIR=package
14 15
15PATH=$PATH:`pwd` # set path for external tools 16PATH=`pwd`:$PATH # set path for external tools
16export PATH 17export PATH
17 18
18## Extract common info requires for the 'info' part of the package. 19# Clean build directory
19VERSION=`tail -1 ../../version.h | sed -e 's/.*_\([0-9]\)/\1/g' | sed 's/\"$//'`
20BFFVERSION=`echo $VERSION | sed 's/p/./g'`
21
22echo "Building BFF for $PKGNAME $VERSION (package version $BFFVERSION)"
23PKGDIR=package
24
25# Clean build directory and package file
26rm -rf $PKGDIR 20rm -rf $PKGDIR
27mkdir $PKGDIR 21mkdir $PKGDIR
28rm -f $PKGNAME-$VERSION.bff
29 22
30if [ ! -f ../../Makefile ] 23if [ ! -f ../../Makefile ]
31then 24then
@@ -40,6 +33,29 @@ FAKE_ROOT=$START/$PKGDIR
40cd ../.. 33cd ../..
41make install-nokeys DESTDIR=$FAKE_ROOT 34make install-nokeys DESTDIR=$FAKE_ROOT
42 35
36if [ $? -gt 0 ]
37then
38 echo "Fake root install failed, stopping."
39 exit 1
40fi
41
42#
43# Extract common info requires for the 'info' part of the package.
44# AIX requires 4-part version numbers
45#
46VERSION=`./ssh -V 2>&1 | sed -e 's/,.*//' | cut -f 2 -d _`
47MAJOR=`echo $VERSION | cut -f 1 -d p | cut -f 1 -d .`
48MINOR=`echo $VERSION | cut -f 1 -d p | cut -f 2 -d .`
49PATCH=`echo $VERSION | cut -f 1 -d p | cut -f 3 -d .`
50PORTABLE=`echo $VERSION | cut -f 2 -d p`
51if [ "$PATCH" = "" ]
52then
53 PATCH=0
54fi
55BFFVERSION=`printf "%d.%d.%d.%d" $MAJOR $MINOR $PATCH $PORTABLE`
56
57echo "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#
177echo Creating $PKGNAME-$VERSION.bff with backup... 193echo Creating $PKGNAME-$VERSION.bff with backup...
194rm -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