summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/oss-sound/PKGBUILD
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-11-23 03:47:32 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-11-23 03:47:32 (GMT)
commita73aa26202d19da424722bcf1285b566dbfd9d8d (patch)
treecc24843c13127ef3b5d8207aa7c82be0b1f00d37 /abs/mv-core/oss-sound/PKGBUILD
parenta1219610c24fc89e2e4c1b81194fe25e40933cf5 (diff)
downloadlinhes_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/PKGBUILD')
-rwxr-xr-xabs/mv-core/oss-sound/PKGBUILD147
1 files changed, 147 insertions, 0 deletions
diff --git a/abs/mv-core/oss-sound/PKGBUILD b/abs/mv-core/oss-sound/PKGBUILD
new file mode 100755
index 0000000..f9135f0
--- /dev/null
+++ b/abs/mv-core/oss-sound/PKGBUILD
@@ -0,0 +1,147 @@
+pkgname=oss-linux-free
+pkgver=4.0_1016
+pkgrel=12
+_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
+
+#building modules
+ PREFIX=$startdir/pkg
+ OSSLIBDIR=$PREFIX/usr/lib/oss
+cd $OSSLIBDIR/build
+REGPARM=REGPARM
+pushd $OSSLIBDIR
+rm -rf objects
+ln -s objects.regparm objects
+rm -rf modules
+ln -s modules.regparm modules
+popd
+
+
+if ! test -f $OSSLIBDIR/objects/osscore.o
+then
+ echo Error: OSS core module for $REGPARM kernel are not available
+ exit 1
+fi
+
+if ! test -f $OSSLIBDIR/modules/ich.o
+then
+ echo Error: OSS driver modules for $REGPARM kernel are not available
+ exit 1
+fi
+
+echo
+echo OSS build environment set up for $REGPARM kernels
+BASEKERNEL=/lib/modules/2.6.26-ARCH
+PKGKERNEL=$startdir/pkg$BASEKERNEL
+KERNELDIR=$BASEKERNEL/build
+
+cp -f ../objects/osscore.o osscore_mainline.o
+
+ln -sf ../include/sys/*.h ../include/sys/ossddk .
+
+rm -f Makefile
+ln -s Makefile.osscore Makefile
+
+if ! test -d $OSSLIBDIR/logs
+then
+ mkdir $OSSLIBDIR/logs
+fi
+
+echo Building module osscore
+
+if ! make KERNELDIR=$KERNELDIR> build.list 2>&1
+then
+ echo Failed to compile OSS
+ cat build.list
+ exit 2
+fi
+
+if ! test -d $PKGKERNEL/kernel/oss
+then
+ mkdir -p $PKGKERNEL/kernel/oss
+fi
+
+if ! test -d $PKGKERNEL/kernel/oss
+then
+ echo OSS module directory $PKGKERNEL/kernel/oss does not exist.
+ exit 3
+fi
+
+if ! ld -r osscore.ko osscore_mainline.o -o $PKGKERNEL/kernel/oss/osscore.ko
+then
+ echo Linking the osscore module failed
+ exit 5
+fi
+
+#depmod -a
+
+for n in ../modules/*.o
+do
+ N=`basename $n .o`
+ echo Building module $N
+
+ rm -f $N_mainline.o Makefile
+
+ sed "s/MODNAME/$N/" < Makefile.tmpl > Makefile
+ ln -s $n $N_mainline.o
+
+ if ! make KERNELDIR=$KERNELDIR > build.list 2>&1
+ then
+ echo Compiling module $N failed
+ cat build.list
+ exit 4
+ fi
+
+ if ! ld -r $N.ko $N_mainline.o -o $PKGKERNEL/kernel/oss/$N.ko
+ then
+ echo Linking $N module failed
+ exit 6
+ fi
+
+ rm -f $N_mainline.o
+ make clean
+done
+
+rm -f Makefile
+
+
+}