diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
commit | 1058def8e7827e56ce4a70afb4aeacb5dc44148f (patch) | |
tree | 4495d23e7b54ab5700e3839081e797c1eafe0db9 /setup/SCO_SV/combpkg | |
download | oss4-upstream.tar.gz |
Imported Upstream version 4.2-build2006upstream/4.2-build2006upstream
Diffstat (limited to 'setup/SCO_SV/combpkg')
-rw-r--r-- | setup/SCO_SV/combpkg/depend | 2 | ||||
-rwxr-xr-x | setup/SCO_SV/combpkg/mkpkg.sh | 78 | ||||
-rw-r--r-- | setup/SCO_SV/combpkg/postinstall | 82 | ||||
-rw-r--r-- | setup/SCO_SV/combpkg/request | 21 |
4 files changed, 183 insertions, 0 deletions
diff --git a/setup/SCO_SV/combpkg/depend b/setup/SCO_SV/combpkg/depend new file mode 100644 index 0000000..f3a47b4 --- /dev/null +++ b/setup/SCO_SV/combpkg/depend @@ -0,0 +1,2 @@ +# using depend in packages. +X audio Audio Subsystem diff --git a/setup/SCO_SV/combpkg/mkpkg.sh b/setup/SCO_SV/combpkg/mkpkg.sh new file mode 100755 index 0000000..2e4cb21 --- /dev/null +++ b/setup/SCO_SV/combpkg/mkpkg.sh @@ -0,0 +1,78 @@ +#!/bin/sh +if test "`uname -s`" = "UnixWare" +then + OS=unixware +else + OS=osr6 +fi +# Force both OS versions +OS=unixware_osr6 + +ARCH=i386 + +PKG=oss + +VERSION=`cat ./.version` +BUILDID=`cat ./buildid.dat` +PKGVERSION=$VERSION-$BUILDID +PKGFILE=$PKG-$OS-$PKGVERSION-$ARCH.pkg +TOPDIR=`pwd` +# Setup the scripts +echo "CLASSES=none drvcfg" > ./setup/pkginfo +echo "BASEDIR=/" >> ./setup/pkginfo +echo "PKG=$PKG" >> ./setup/pkginfo +echo "NAME=Open Sound System" >> ./setup/pkginfo +echo "VERSION=$PKGVERSION" >> ./setup/pkginfo +echo "CATEGORY=driver" >> ./setup/pkginfo +echo "DESC=Open Sound System for SCO $OS" >> ./setup/pkginfo +echo "ARCH=$ARCH" >> ./setup/pkginfo +echo "VENDOR=4Front Technologies" >> ./setup/pkginfo +echo "HOTLINE=+1 (310) 202 8530" >> ./setup/pkginfo +echo "EMAIL=support@opensound.com" >> ./setup/pkginfo + +echo "i pkginfo=./setup/pkginfo" > /tmp/$$ +if test -f .date +then + # Open Source Version + echo "i copyright=./Copying" >>/tmp/$$ +else + # Retail version + echo "i copyright=./setup/SCO_EULA" >>/tmp/$$ +fi +echo "i depend=./setup/pkgdepend" >> /tmp/$$ +echo "i postinstall=./setup/postinstall" >> /tmp/$$ +echo "i preremove=./setup/preremove" >> /tmp/$$ +echo "i postremove=./setup/postremove" >> /tmp/$$ +echo "i request=./setup/request" >> /tmp/$$ +echo "i i.drvcfg=./setup/i.drvcfg" >> /tmp/$$ +echo "i r.drvcfg=./setup/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/$$) +(cd prototype; find usr/lib/oss -type d -print | pkgproto >> /tmp/$$) +# Change the owner/group for the files +OLDOG="`id -un` `id -gn`" +cp /tmp/$$ /tmp/$$.o +cat /tmp/$$.o | sed -e "s/${OLDOG}/root sys/g" > /tmp/$$ + +# For some files, change the file type of .conf files to editable and set +# class to drvcfg. For architecture specific files, just set the class. +EXCEPTIONLIST='Space.c|userdefs|.uw7|.osr6' +/bin/grep -v -E -e $EXCEPTIONLIST /tmp/$$ > proto +EXCEPTIONLIST='Space.c|userdefs|.uw7$|.osr6$' +/bin/grep -E -e $EXCEPTIONLIST /tmp/$$ |sed -e 's/f none/e drvcfg/g' >> proto +EXCEPTIONLIST='.uw7' +/bin/grep -E -e $EXCEPTIONLIST /tmp/$$ |sed -e 's/f none/f uw7/g' >> proto +EXCEPTIONLIST='.osr6' +/bin/grep -E -e $EXCEPTIONLIST /tmp/$$ |sed -e 's/f none/f osr6/g' >> proto + +# Remove the temp file. +echo "removing /tmp/$$"; rm -f /tmp/$$ + +#now create the package. +pkgmk -o -d /tmp -r $TOPDIR/prototype -a $ARCH -f proto +echo package file is $PKGFILE +pkgtrans -s /tmp $PKGFILE $PKG +echo package file is $PKGFILE +mv /tmp/$PKGFILE $TOPDIR diff --git a/setup/SCO_SV/combpkg/postinstall b/setup/SCO_SV/combpkg/postinstall new file mode 100644 index 0000000..c49de2e --- /dev/null +++ b/setup/SCO_SV/combpkg/postinstall @@ -0,0 +1,82 @@ +#!/bin/sh + +# Place the uw/osr6 specific files into place +if [ -n "`echo $CLASSES | grep osr6`" ]; then + PRFX="osr6" +else + PRFX="uw7" +fi +while read file +do + removef oss ${file}.${PRFX} + mv ${file}.${PRFX} ${file} + installf -c none oss ${file} f +done <<!EOF + /usr/bin/ossxmix +!EOF +removef -f oss +installf -f oss + +. /etc/oss.conf + +echo "Setting up Open Sound System....please wait" + +#first remove the SCO ich driver from the system +/etc/conf/bin/idinstall -d ich > /dev/null 2>&1 + +#Remove orphaned files left from earlier OSS installations +rm -f /dev/sequencer /dev/music +rm -f /dev/*_mixer[0-9]* +rm -f /dev/*_midi[0-9]* +rm -f /dev/*_dsp[0-9]* +rm -f /dev/dsp* +rm -f /dev/mixer* +rm -f /dev/midi* +rm -f /etc/rc3.d/S99oss + +# Unload previous modules +for n in `ls $OSSLIBDIR/modules|grep -v osscore` +do + modadmin -U $n > /dev/null 2>&1 +done + +modadmin -U osscore > /dev/null 2>&1 + +# Remove previous OSS startup files +rm -f /etc/rc3.d/S99oss /etc/init.d/oss + +# (re)install osscore + +rm -f $OSSLIBDIR/modules/*/install.log + +cd $OSSLIBDIR/modules/osscore + +cd $OSSLIBDIR/build && sh install.sh + +if test ! -f $OSSLIBDIR/etc/userdefs +then + echo "autosave_mixer yes" > $OSSLIBDIR/etc/userdefs +fi + +/usr/sbin/soundon + +installf -f oss + +echo "Adding OSS startup scripts to /etc/rc2.d and /etc/init.d" +rm -f /etc/rc2.d/S89oss /etc/init.d/oss + +cp $OSSLIBDIR/etc/S89oss /etc/init.d/oss +chmod 744 /etc/init.d/oss + +ln -s /etc/init.d/oss /etc/rc2.d/S89oss +echo "" +echo "" +echo "" +echo "" +echo Thank you for installing Open Sound System +echo You can run the osstest command to test audio playback in your system. +echo +echo It may be necessary to reboot the system before all devices get properly +echo detected by the system. + +exit 0 diff --git a/setup/SCO_SV/combpkg/request b/setup/SCO_SV/combpkg/request new file mode 100644 index 0000000..005313a --- /dev/null +++ b/setup/SCO_SV/combpkg/request @@ -0,0 +1,21 @@ +#!/bin/sh + + +uver=`uname -v` +if [ "$uver" = 7.1.4 ] ; then + CLASSES="$CLASSES uw7" +else + if [ $uver = "6.0.0" ] ; then + CLASSES="$CLASSES osr6" + else + echo "invalid CLASS" + exit 2 + fi +fi + +# and so to any other packaging scripts +cat >$1 <<! +CLASSES='$CLASSES' +! + +exit 0 |