summaryrefslogtreecommitdiffstats
path: root/contrib/aix
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2002-03-17 14:05:24 -0800
committerTim Rice <tim@multitalents.net>2002-03-17 14:05:24 -0800
commit3a4234699e662e1e611b31829ea898029b66a6f4 (patch)
tree28970ddb14951a7f817ba00c47a412f64e99ad2a /contrib/aix
parent88f2ab5efb73cdce241b15cf2bf7ae477f8dd3ed (diff)
[contrib/aix/buildbff.sh contrib/aix/inventory.sh] AIX package
build fixes. Patch by Darren Tucker <dtucker@zip.com.au> [contrib/solaris/buildpkg.sh] add missing dirs to SYSTEM_DIR. Have postinstall check for $piddir and add if necessary.
Diffstat (limited to 'contrib/aix')
-rwxr-xr-xcontrib/aix/buildbff.sh37
-rwxr-xr-xcontrib/aix/inventory.sh2
2 files changed, 28 insertions, 11 deletions
diff --git a/contrib/aix/buildbff.sh b/contrib/aix/buildbff.sh
index 6c7aaf45..40958848 100755
--- a/contrib/aix/buildbff.sh
+++ b/contrib/aix/buildbff.sh
@@ -11,21 +11,14 @@
umask 022
PKGNAME=openssh
+PKGDIR=package
-PATH=$PATH:`pwd` # set path for external tools
+PATH=`pwd`:$PATH # set path for external tools
export PATH
-## Extract common info requires for the 'info' part of the package.
-VERSION=`tail -1 ../../version.h | sed -e 's/.*_\([0-9]\)/\1/g' | sed 's/\"$//'`
-BFFVERSION=`echo $VERSION | sed 's/p/./g'`
-
-echo "Building BFF for $PKGNAME $VERSION (package version $BFFVERSION)"
-PKGDIR=package
-
-# Clean build directory and package file
+# Clean build directory
rm -rf $PKGDIR
mkdir $PKGDIR
-rm -f $PKGNAME-$VERSION.bff
if [ ! -f ../../Makefile ]
then
@@ -40,6 +33,29 @@ FAKE_ROOT=$START/$PKGDIR
cd ../..
make install-nokeys DESTDIR=$FAKE_ROOT
+if [ $? -gt 0 ]
+then
+ echo "Fake root install failed, stopping."
+ exit 1
+fi
+
+#
+# Extract common info requires for the 'info' part of the package.
+# AIX requires 4-part version numbers
+#
+VERSION=`./ssh -V 2>&1 | sed -e 's/,.*//' | cut -f 2 -d _`
+MAJOR=`echo $VERSION | cut -f 1 -d p | cut -f 1 -d .`
+MINOR=`echo $VERSION | cut -f 1 -d p | cut -f 2 -d .`
+PATCH=`echo $VERSION | cut -f 1 -d p | cut -f 3 -d .`
+PORTABLE=`echo $VERSION | cut -f 2 -d p`
+if [ "$PATCH" = "" ]
+then
+ PATCH=0
+fi
+BFFVERSION=`printf "%d.%d.%d.%d" $MAJOR $MINOR $PATCH $PORTABLE`
+
+echo "Building BFF for $PKGNAME $VERSION (package version $BFFVERSION)"
+
#
# Fill in some details, like prefix and sysconfdir
# the eval also expands variables like sysconfdir=${prefix}/etc
@@ -175,6 +191,7 @@ mv ../lpp_name .
# file list on the fly and feed it to backup using -i
#
echo Creating $PKGNAME-$VERSION.bff with backup...
+rm -f $PKGNAME-$VERSION.bff
(
echo "./lpp_name"
find . ! -name lpp_name -a ! -name . -print
diff --git a/contrib/aix/inventory.sh b/contrib/aix/inventory.sh
index aa44ab9d..78df0d16 100755
--- a/contrib/aix/inventory.sh
+++ b/contrib/aix/inventory.sh
@@ -52,7 +52,7 @@ find . ! -name . -print | perl -ne '{
} elsif ( -f $_ ) {
# Entry is File
print "\ttype=FILE\n";
- print "\tsize=VOLATILE\n";
+ print "\tsize=$sz\n";
print "\tchecksum=VOLATILE\n";
} elsif ( -d $_ ) {
# Entry is Directory