summaryrefslogtreecommitdiff
path: root/setup/SunOS/mkpkg.sh
blob: 5c436943677fd3cdeb18ba67feebaa4cb7810b66 (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
#!/usr/bin/bash
case `uname -r` in
 "5.6") OS=solaris6
	REL=6
	;;
 "5.7") OS=solaris7
	REL=7
	;;
 "5.8") OS=solaris8
	REL=8
	;;
 "5.9") OS=solaris9
	REL=9
	;;
 *)	OS=solaris
	REL=10
	;;
esac

ARCH=`uname -p`
PKG=oss
VERSION=`sh $ARCH/showversion.sh`
BUILDID=`cat $ARCH/buildid.dat`
PKGVERSION=$VERSION-$BUILDID
PKGFILE=$PKG-$OS-$PKGVERSION-$ARCH.pkg
# Setup the scripts
echo "CLASSES=none drvcfg" > $ARCH/setup/SunOS/pkginfo
echo "BASEDIR=/" >> $ARCH/setup/SunOS/pkginfo
echo "TZ=PST" >> $ARCH/setup/SunOS/pkginfo
echo "PKG=$PKG" >> $ARCH/setup/SunOS/pkginfo
echo "PATH=/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin" >> $ARCH/setup/SunOS/pkginfo
echo "NAME=Open Sound System" >> $ARCH/setup/SunOS/pkginfo
echo "VERSION=$PKGVERSION" >> $ARCH/setup/SunOS/pkginfo
echo "CATEGORY=driver" >> $ARCH/setup/SunOS/pkginfo
echo "DESC=Open Sound System for Solaris $ARCH" >> $ARCH/setup/SunOS/pkginfo
echo "ARCH=$ARCH" >> $ARCH/setup/SunOS/pkginfo
echo "VENDOR=4Front Technologies" >> $ARCH/setup/SunOS/pkginfo
echo "HOTLINE=+1 (310) 202 8530" >> $ARCH/setup/SunOS/pkginfo
echo "EMAIL=support@opensound.com" >> $ARCH/setup/SunOS/pkginfo
echo "VSTOCK=" >> $ARCH/setup/SunOS/pkginfo
echo "PSTAMP=" >> $ARCH/setup/SunOS/pkginfo
echo "PKGINST=oss" >> $ARCH/setup/SunOS/pkginfo
echo "PKGSAV=/var/sadm/pkg/OSS/save" >> $ARCH/setup/SunOS/pkginfo
echo "INSTDATE=" >> $ARCH/setup/SunOS/pkginfo

echo "i pkginfo=$ARCH/setup/SunOS/pkginfo" 		> /tmp/$$
if test -f $ARCH/.date
then
  # Open source version
  echo "i copyright=$ARCH/COPYING"	 		>> /tmp/$$
else
  # Retail version
  echo "i copyright=$ARCH/EULA"		 		>> /tmp/$$
fi
echo "i postinstall=$ARCH/setup/SunOS/postinstall" 	>> /tmp/$$
echo "i preremove=$ARCH/setup/SunOS/preremove" 	>>/tmp/$$
echo "i postremove=$ARCH/setup/SunOS/postremove" 	>>/tmp/$$
echo "i i.drvcfg=$ARCH/setup/SunOS/i.drvcfg" 		>>/tmp/$$
echo "i r.drvcfg=$ARCH/setup/SunOS/r.drvcfg" 		>>/tmp/$$

# now get a list of all the files and directories
(cd prototype; find . -type f -print |pkgproto 		>> /tmp/$$)
(cd prototype; find . -type l -print |pkgproto 		>> /tmp/$$)

# now change the file type of .conf files to editable and set class to drvcfg
EXCEPTIONLIST='.conf|userdefs'

/usr/xpg4/bin/grep -v -E -e $EXCEPTIONLIST /tmp/$$ > proto
/usr/xpg4/bin/grep -E -e $EXCEPTIONLIST /tmp/$$ |sed -e 's/f none/e drvcfg/g' >> proto

# Remove the temp file.
echo "removing /tmp/$$"; rm -f /tmp/$$

#now create the package.
pkgmk -o -d /tmp -r prototype -a $ARCH -f proto
touch $PKGFILE
pkgtrans -s /tmp $PKGFILE $PKG
echo package file is $PKGFILE

if test -f $ARCH/4front-private/export_package.sh
then
  sh $ARCH/4front-private/export_package.sh $PKGFILE $ARCH `sh $ARCH/showversion.sh` /tmp $ARCH-$REL
fi