4
PKGDIR=$BASEDIR/combpkg
5
UW7DIR=$BASEDIR/oss-4.0-uw7.BUILD
6
OSR6DIR=$BASEDIR/oss-4.0-osr6.BUILD
7
COMBDIR=$BASEDIR/oss-4.0-comb
8
ARCHFILES="/usr/bin/ossxmix"
9
SETUPDIR=$COMBDIR/setup
11
# We must do this on a UW7 machine to redo the manual pages properly
12
if [ "`uname -s`" != "UnixWare" ]; then
13
echo "Error: the combined build must be done on a UnixWare 7 machine!"
17
# Make sure we have the built directories in place
18
if [ ! -d $UW7DIR ]; then
19
echo "Error: you must have a build $UW7DIR directory installed!"
22
if [ ! -d $OSR6DIR ]; then
23
echo "Error: you must have a build $OSR6DIR directory installed!"
28
# Recreate the combined directory
35
find prototype | cpio -pdumvL $COMBDIR
37
# Rename OSR6/copy UW7 files which are OS dependent
38
for file in $ARCHFILES
40
mv $COMBDIR/prototype/$file $COMBDIR/prototype/$file.osr6
41
cp $UW7DIR/prototype/$file $COMBDIR/prototype/$file.uw7
44
# Use the UW7 manual pages, which have the right format
45
rm -rf $COMBDIR/prototype/usr/man/*
46
cp -r $UW7DIR/prototype/usr/man/* $COMBDIR/prototype/usr/man
48
# Recreate the manual pages as plain installable text files
49
MANPATH=$COMBDIR/prototype/usr/man; export MANPATH
51
find * -print | while read file
53
mfile=${file#man[1-9]/}
54
if [ "$file" != "$mfile" ]; then
55
mfile=${mfile%\.[1-9]}
56
man $mfile - > /dev/null
58
# Rename the directory the correct way
60
mv $MANPATH/$file $MANPATH/man.$sect
63
rm -rf $MANPATH/man.[0-9]
65
# Copy the packaging files
70
cp $OSR6DIR/setup/SCO_SV/$file $SETUPDIR
84
# Copy the new/modified packaging files
86
find * -print | cpio -pdumvL $SETUPDIR
88
# Create a version file
89
grep "define OSS_VERSION_ID" $OSR6DIR/kernel/framework/include/oss_version.h|sed 's/.*_ID "/v/'|sed 's/"//' > $COMBDIR/.version
91
# Copy the buildid file
92
cp $OSR6DIR/buildid.dat $COMBDIR
94
# Run the mkpkg.sh to create the final package