blob: 63adcb1b906f64c9e1b4a020dc227d4450a8cc97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
#!/usr/bin/ksh
BASEDIR=`pwd`
PKGDIR=$BASEDIR/combpkg
UW7DIR=$BASEDIR/oss-4.0-uw7.BUILD
OSR6DIR=$BASEDIR/oss-4.0-osr6.BUILD
COMBDIR=$BASEDIR/oss-4.0-comb
ARCHFILES="/usr/bin/ossxmix"
SETUPDIR=$COMBDIR/setup
# We must do this on a UW7 machine to redo the manual pages properly
if [ "`uname -s`" != "UnixWare" ]; then
echo "Error: the combined build must be done on a UnixWare 7 machine!"
exit 1
fi
# Make sure we have the built directories in place
if [ ! -d $UW7DIR ]; then
echo "Error: you must have a build $UW7DIR directory installed!"
exit 1
fi
if [ ! -d $OSR6DIR ]; then
echo "Error: you must have a build $OSR6DIR directory installed!"
exit 1
fi
#
# Recreate the combined directory
#
rm -rf $COMBDIR
mkdir $COMBDIR
# Copy the OSR6 files
cd $OSR6DIR
find prototype | cpio -pdumvL $COMBDIR
# Rename OSR6/copy UW7 files which are OS dependent
for file in $ARCHFILES
do
mv $COMBDIR/prototype/$file $COMBDIR/prototype/$file.osr6
cp $UW7DIR/prototype/$file $COMBDIR/prototype/$file.uw7
done
# Use the UW7 manual pages, which have the right format
rm -rf $COMBDIR/prototype/usr/man/*
cp -r $UW7DIR/prototype/usr/man/* $COMBDIR/prototype/usr/man
# Recreate the manual pages as plain installable text files
MANPATH=$COMBDIR/prototype/usr/man; export MANPATH
cd $MANPATH
find * -print | while read file
do
mfile=${file#man[1-9]/}
if [ "$file" != "$mfile" ]; then
mfile=${mfile%\.[1-9]}
man $mfile - > /dev/null
else
# Rename the directory the correct way
sect=${file#man}
mv $MANPATH/$file $MANPATH/man.$sect
fi
done
rm -rf $MANPATH/man.[0-9]
# Copy the packaging files
rm -rf $SETUPDIR
mkdir $SETUPDIR
while read file
do
cp $OSR6DIR/setup/SCO_SV/$file $SETUPDIR
done <<!EOF
mkpkg.sh
S89oss
SCO_EULA
i.drvcfg
pkgdepend
pkginfo
postinstall
postremove
preremove
r.drvcfg
!EOF
# Copy the new/modified packaging files
cd $PKGDIR
find * -print | cpio -pdumvL $SETUPDIR
# Create a version file
grep "define OSS_VERSION_ID" $OSR6DIR/kernel/framework/include/oss_version.h|sed 's/.*_ID "/v/'|sed 's/"//' > $COMBDIR/.version
# Copy the buildid file
cp $OSR6DIR/buildid.dat $COMBDIR
# Run the mkpkg.sh to create the final package
cd $COMBDIR
./setup/mkpkg.sh
|