diff options
author | James Meyer <james.meyer@operamail.com> | 2008-11-23 03:47:32 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2008-11-23 03:47:32 (GMT) |
commit | a73aa26202d19da424722bcf1285b566dbfd9d8d (patch) | |
tree | cc24843c13127ef3b5d8207aa7c82be0b1f00d37 /abs/mv-core/oss-sound/oss-linux-free | |
parent | a1219610c24fc89e2e4c1b81194fe25e40933cf5 (diff) | |
download | linhes_pkgbuild-a73aa26202d19da424722bcf1285b566dbfd9d8d.zip linhes_pkgbuild-a73aa26202d19da424722bcf1285b566dbfd9d8d.tar.gz linhes_pkgbuild-a73aa26202d19da424722bcf1285b566dbfd9d8d.tar.bz2 |
add mythvantage specific packages.
Diffstat (limited to 'abs/mv-core/oss-sound/oss-linux-free')
5 files changed, 223 insertions, 0 deletions
diff --git a/abs/mv-core/oss-sound/oss-linux-free/PKGBUILD b/abs/mv-core/oss-sound/oss-linux-free/PKGBUILD new file mode 100644 index 0000000..b652603 --- /dev/null +++ b/abs/mv-core/oss-sound/oss-linux-free/PKGBUILD @@ -0,0 +1,45 @@ +pkgname=oss-linux-free +pkgver=4.0_1016 +pkgrel=3 +_realname=oss-v4.0-build1016-src-gpl +pkgdesc="OSS/Open source driver" +arch=('i686' 'x86_64') +url="http://www.opensound.com/" +license=('GPL2') +depends=('gcc' 'make' 'gtk2' 'libtool' 'bc' 'sed') +makedepends=('gawk' 'pkgconfig') +conflicts=('oss-linux') +provides=('oss') +install=oss.install +source=(rc.oss-linux-free http://www.4front-tech.com/developer/sources/stable/gpl/$_realname.tar.bz2 oss4_1016-kernel2626.diff oss4_1016-moduleinc.diff) +md5sums=('f343bb70a4dbd1aabefabbea0f76e886' + 'b8c3409b477387dbe87118caf46773ed' + '376fce5cfd92d7793ee90d7352c1cafa' + '4077a972a6b26ae960ce15cfec8aa34f') + +build() { + +rm -rf build ; mkdir build ; cd build + +sed -i "s|export HAVE_ALSA=1|# export HAVE_ALSA=1|g" $srcdir/$_realname/configure +sed -i "s|700|755|g" $srcdir/$_realname/setup/Linux/build.sh +unset CFLAGS + +# Thanks to majeru of the OSS forums for this patch +cd $srcdir/$_realname +patch -p0 -i $srcdir/oss4_1016-kernel2626.diff || return 1 +# Thanks to cesium of the OSS forums for this patch +patch -p1 -i $srcdir/oss4_1016-moduleinc.diff || return 1 +cd $srcdir/build +$srcdir/$_realname/configure || return 1 +make build || return 1 + +cp -r prototype/{etc,usr} $pkgdir/ +install -Dm755 ../rc.oss-linux-free $pkgdir/etc/rc.d/oss-linux-free + +if [ `uname -m` == "i686" ]; then +cd setup/Linux/oss/lib +gcc -m32 -shared -fPIC -O2 -Wall -Werror -lssl flashsupport.c -o libflashsupport.so || return 1 +cp libflashsupport.so $pkgdir/usr/lib/oss/lib/ +fi +} diff --git a/abs/mv-core/oss-sound/oss-linux-free/oss.install b/abs/mv-core/oss-sound/oss-linux-free/oss.install new file mode 100644 index 0000000..e17dd0e --- /dev/null +++ b/abs/mv-core/oss-sound/oss-linux-free/oss.install @@ -0,0 +1,40 @@ +post_install() { + echo "Probing soundcards, change /usr/lib/oss/etc/installed_drivers as needed afterwards if + you want to disable any of the OSS modules. You can run '/usr/sbin/ossdetect -v' at any time + if you have changed soundcards." + /usr/sbin/ossdetect -v + /sbin/ldconfig + /bin/true +} + +pre_upgrade() { + /etc/rc.d/oss-linux-free stop + /bin/true +} + +post_upgrade() { + /etc/rc.d/oss-linux-free start + echo "If you changed your soundcard, reprobe for soundcards using '/usr/sbin/ossdetect -v'." + /sbin/ldconfig # We need to run this since libflashsupport.so is installed on x86 + /bin/true +} + +pre_remove() { + /etc/rc.d/oss-linux-free stop + sh /usr/lib/oss/scripts/restore_drv.sh +} + +post_remove() { + echo "/usr/lib/oss/ will still contain files after removal as those files were generated by OSS + after instalation. Delete them manually unless you want to keep them for later use." + if [ `uname -m` == "i686" ]; then + rm -f /usr/lib/libflashsupport.so + fi + /bin/true +} + +op=$1 +shift +[ "$(type -t "$op")" = "function" ] && $op "$@" + +# vim:set ts=2 sw=2 et: diff --git a/abs/mv-core/oss-sound/oss-linux-free/oss4_1016-kernel2626.diff b/abs/mv-core/oss-sound/oss-linux-free/oss4_1016-kernel2626.diff new file mode 100644 index 0000000..730c19e --- /dev/null +++ b/abs/mv-core/oss-sound/oss-linux-free/oss4_1016-kernel2626.diff @@ -0,0 +1,21 @@ +diff -uNr setup/Linux/oss/build/osscore.c setup/Linux/oss/build/osscore.c +--- setup/Linux/oss/build/osscore.c 2008-05-24 04:54:28.000000000 +0200 ++++ setup/Linux/oss/build/osscore.c 2008-07-31 19:47:53.000000000 +0200 +@@ -285,7 +285,7 @@ + init_proc_fs (void) + { + if ((oss_proc_root = +- create_proc_entry ("opensound", 0700 | S_IFDIR, &proc_root)) == NULL) ++ create_proc_entry ("opensound", 0700 | S_IFDIR, NULL)) == NULL) + { + oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n"); + return; +@@ -308,7 +308,7 @@ + { + if (oss_proc_devfiles) + remove_proc_entry ("devfiles", oss_proc_root); +- remove_proc_entry ("opensound", &proc_root); ++ remove_proc_entry ("opensound", NULL); + } + } + diff --git a/abs/mv-core/oss-sound/oss-linux-free/oss4_1016-moduleinc.diff b/abs/mv-core/oss-sound/oss-linux-free/oss4_1016-moduleinc.diff new file mode 100644 index 0000000..4595ead --- /dev/null +++ b/abs/mv-core/oss-sound/oss-linux-free/oss4_1016-moduleinc.diff @@ -0,0 +1,44 @@ +diff -uNr oss-v4.0-build1016-src-gpl/setup/Linux/oss/build/install.sh oss-v4.0-build1016-src-gpl.bak/setup/Linux/oss/build/install.sh +--- oss-v4.0-build1016-src-gpl/setup/Linux/oss/build/install.sh 2008-02-05 18:58:46.000000000 +0100 ++++ oss-v4.0-build1016-src-gpl.bak/setup/Linux/oss/build/install.sh 2008-07-31 10:36:09.000000000 +0200 +@@ -159,6 +159,7 @@ + ln -sf ../include/sys/*.h ../include/sys/ossddk . + + rm -f Makefile ++cp module.inc module.inc.orig + ln -s Makefile.osscore Makefile + + if ! test -d $OSSLIBDIR/logs +@@ -221,7 +222,8 @@ + make clean + done + +-rm -f Makefile ++cp module.inc.orig module.inc ++rm -f Makefile module.inc.orig + + echo "depmod -a" + depmod -a +diff -uNr oss-v4.0-build1016-src-gpl/setup/Linux/oss/build/Makefile.osscore oss-v4.0-build1016-src-gpl.bak/setup/Linux/oss/build/Makefile.osscore +--- oss-v4.0-build1016-src-gpl/setup/Linux/oss/build/Makefile.osscore 2005-11-23 23:52:32.000000000 +0100 ++++ oss-v4.0-build1016-src-gpl.bak/setup/Linux/oss/build/Makefile.osscore 2008-07-31 10:34:23.000000000 +0200 +@@ -7,11 +7,17 @@ + + KERNELDIR ?= /lib/modules/$(shell uname -r)/build + PWD := $(shell pwd) ++endif + + default: + $(MAKE) -C $(KERNELDIR) M=$(PWD) modules +- +-endif ++ @#Take generated symbol information and add it to module.inc ++ @echo >> module.inc ++ @echo "static const struct modversion_info ____versions[]" >> module.inc ++ @echo " __attribute__((used))" >> module.inc ++ @echo "__attribute__((section(\"__versions\"))) = {" >> module.inc ++ @sed -e "s:^:{:" -e "s:\t:, \":" -e "s:\t\(.\)*:\"},:" < Module.symvers >> module.inc ++ @echo "};" >> module.inc + + clean: + rm -f *.o *.ko *.mod.c *.mod.o .*.cmd core core.* x y z diff --git a/abs/mv-core/oss-sound/oss-linux-free/rc.oss-linux-free b/abs/mv-core/oss-sound/oss-linux-free/rc.oss-linux-free new file mode 100755 index 0000000..48b65e0 --- /dev/null +++ b/abs/mv-core/oss-sound/oss-linux-free/rc.oss-linux-free @@ -0,0 +1,73 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +terminateapps() { + # Thanks to the Gentoo ebuild/start script for the following + # http://bugs.gentoo.org/show_bug.cgi?id=184123 + # http://bugs.gentoo.org/attachment.cgi?id=153689 + devs=`perl -e '{while (<>) {m/^(\S*)/; print "/dev/$1\n"}}' \ + < /proc/opensound/devfiles` + fuser -k ${devs} >/dev/null 2>/dev/null +} + +case "$1" in + start) + stat_busy "Starting OSS/Open source driver" + # start + /usr/sbin/soundon + if [ $? -gt 0 ]; then + stat_fail + else + grep '^softoss' /proc/modules >/dev/null 2>/dev/null + if [ $? -eq 0 ]; then + stat_busy "Replacing old \"softoss\" module with \"vmix\"" + rmmod softoss + modprobe vmix + sed -i 's/^softoss.*$/vmix/' /usr/lib/oss/etc/installed_drivers + fi + add_daemon oss-linux-free + stat_done + fi + ;; + stop) + stat_busy "Saving OSS mixer" + /usr/sbin/savemixer + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + grep '^"cuckoo"' /proc/modules >/dev/null 2>/dev/null + if [ $? -eq 0 ]; then + stat_busy "Removing \"cuckoo\" module" + rmmod cuckoo + fi + stat_busy "Killing processes using OSS" + terminateapps + stat_done + # It doesn't matter if it didnt kill anything! + stat_busy "Stopping OSS/Open source driver" + /usr/sbin/soundoff + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon oss-linux-free + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + terminateapps) + stat_busy "Killing processes using OSS" + terminateapps + stat_done + # It doesn't matter if it didnt kill anything! + ;; + *) + echo "usage: $0 {start|stop|restart|terminateapps}" +esac |