diff options
Diffstat (limited to 'abs/extra/oss/PKGBUILD')
-rw-r--r-- | abs/extra/oss/PKGBUILD | 284 |
1 files changed, 73 insertions, 211 deletions
diff --git a/abs/extra/oss/PKGBUILD b/abs/extra/oss/PKGBUILD index d568ff3..cb9e843 100644 --- a/abs/extra/oss/PKGBUILD +++ b/abs/extra/oss/PKGBUILD @@ -1,225 +1,87 @@ -# $Id: PKGBUILD,v 1.8 2009/02/11 17:22:38 thotypous Exp $ -# Maintainer: Paulo Matias <matiasΘarchlinux-br·org> - -pkgname="oss" -pkgver="4.1_1051" -pkgrel=7 +# $Id: PKGBUILD 54037 2011-08-12 13:13:29Z bluewind $ +# Maintainer: Florian Pritz <bluewind@xinu.at> +# Contributor: Paulo Matias <matiasΘarchlinux-br·org> +# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> + +pkgname=oss +pkgver=4.2_2005 +pkgrel=1 pkgdesc="Open Sound System UNIX audio architecture" arch=('i686' 'x86_64') url="http://developer.opensound.com/" license=('GPL2') -depends=('gcc' 'make' 'kernel-headers' 'module-init-tools' 'libtool' 'sed') -makedepends=('pkgconfig' 'gawk' 'gtk2') -conflicts=('oss-linux' 'oss-linux-free' 'oss-testing') -install='oss.install' +depends=('gcc' 'make' 'kernel26-headers' 'module-init-tools' 'libtool' 'sed') +makedepends=('pkgconfig' 'gawk' 'gtk2' 'findutils') +optdepends=('gtk2: for graphical mixer (ossxmix)') +conflicts=('oss-linux' 'oss-linux-free' 'oss-testing' 'libflashsupport' 'libflashsupport-pulse' 'libflashsupport-oss') +replaces=('libflashsupport-oss') +install=oss.install +backup=('usr/lib/oss/soundon.user') source=("http://www.4front-tech.com/developer/sources/stable/gpl/oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl.tar.bz2" - 'oss.rm-init-scripts.patch' 'oss.rc' 'oss.install' 'hg-latest-fixes.diff') - - -optdepends=('gtk2: for graphical mixer (ossxmix)' - 'hal: for automatic USB audio configuration' - 'libflashsupport-oss: for Flash plugin support') + "rm-init-scripts.patch" + "rc-script" + "soundon.patch" + "remove-hal.patch" + ) +md5sums=('964b1ec63b48b22baba6688fe2fc0633' + 'b9a380a0ac8896390d71ac13676f27e1' + 'cbcbce5c03b127df5eafa8faa091492c' + '65f07fe241bfbf912f76d8b6d8f276b5' + 'cd7f1dc6166bba8c94d96f3a28e948a5') build() { - _dir="oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl" - - cd "$srcdir/$_dir" - - # Apply patchs from hg. - msg "Applying latest fixes from hg." - patch -p1 < "$srcdir/hg-latest-fixes.diff" || return 1 - - cd "$srcdir" - - # Avoid these flags conflicting with OSS build system. - unset CFLAGS - unset OSFLAGS - unset LIBRARIES - - # Remove libflashsupport, as it belongs to a separate package. - rm -f "$srcdir/$_dir/oss/lib/flashsupport.c" &> /dev/null - - msg "Preparing the build environment." - - if [ ! -d build ]; then - # Create build directory and configure - mkdir build && cd build - "$srcdir/$_dir/configure" --enable-libsalsa=NO || return 1 - else - # Change to existing build directory - cd build - fi - - msg "Building OSS." - make build || return 1 - - msg "Patching init scripts." - cd "$srcdir/build/prototype" - rm usr/lib/oss/etc/S89oss - patch -b -p0 < "$srcdir/oss.rm-init-scripts.patch" || return 1 - - msg "Copying files." - cp -R * "$pkgdir" - install -D -m755 "$srcdir/oss.rc" "$pkgdir/etc/rc.d/oss" -################################ -PREFIX=$startdir/pkg -OSSLIBDIR=$PREFIX/usr/lib/oss -UNAME=2.6.28-LinHES -KERNELDIR=/lib/modules/$UNAME/build -mkdir -p ${PREFIX}/lib/modules/$UNAME/kernel/oss - -cd $OSSLIBDIR/build -rm -f $OSSLIBDIR/.cuckoo_installed - REGPARM=REGPARM - rm -rf $OSSLIBDIR/objects - ln -s $OSSLIBDIR/objects.regparm $OSSLIBDIR/objects - rm -rf $OSSLIBDIR/modules - ln -s $OSSLIBDIR/modules.regparm $OSSLIBDIR/modules - -echo OSS build environment set up for $REGPARM kernels - -if ! test -f $OSSLIBDIR/objects/osscore.o -then - echo Error: OSS core module for $REGPARM kernel is not available in $OSSLIBDIR/objects - exit 1 -fi -OK=1 - -if ! test -d /lib/modules/$UNAME -then - echo Error: Kernel directory /lib/modules/$UNAME does not exist - exit 1 -fi - -cp -f ../objects/osscore.o osscore_mainline.o - -ln -sf ../include/sys/*.h ../include/sys/ossddk . - -rm -f Makefile -ln -s Makefile.osscore Makefile - -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 /lib/modules/$UNAME/kernel/oss -then - mkdir /lib/modules/$UNAME/kernel/oss -fi - -if ! test -d /lib/modules/$UNAME/kernel/oss -then - echo OSS module directory /lib/modules/$UNAME/kernel/oss does not exist. - exit 3 -fi - -if ! ld -r osscore.ko osscore_mainline.o -o /lib/modules/$UNAME/kernel/oss/osscore.ko -then - echo Linking the osscore module failed - exit 5 -fi - -if test -f Module.symvers -then - #Take generated symbol information and add it to module.inc - rm -f osscore_symbols.inc - echo "static const struct modversion_info ____versions[]" >> osscore_symbols.inc - echo " __attribute__((used))" >> osscore_symbols.inc - echo "__attribute__((section(\"__versions\"))) = {" >> osscore_symbols.inc - sed -e "s:^:{:" -e "s:\t:, \":" -e "s:\t\(.\)*:\"},:" < Module.symvers >> osscore_symbols.inc - echo "};" >> osscore_symbols.inc -else - echo > osscore_symbols.inc -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 /lib/modules/$UNAME/kernel/oss/$N.ko - then - echo Linking $N module failed - exit 6 - fi - - rm -f $N_mainline.o - make clean - -done -rm -f Makefile - -cp -rp /lib/modules/$UNAME/kernel/oss/* ${PREFIX}/lib/modules/$UNAME/kernel/oss/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + _dir=oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl + cd "${srcdir}/${_dir}" + + # Avoid these flags conflicting with OSS build system. + unset CFLAGS + unset LDFLAGS + unset OSFLAGS + unset LIBRARIES + export NO_WARNING_CHECKS=yes + + # Compile libflashsupport.so only in packaging time, so we avoid + # conflicts with other packages and ease package management. + msg "Building libflashsupport.so." + cd oss/lib + gcc -shared -fPIC -O2 -Wall -Werror flashsupport.c -o libflashsupport.so + + msg "Preparing the build environment." + cd "${srcdir}" + + # Create build directory and configure + rm -rf build + mkdir build && cd build + "${srcdir}/${_dir}/configure" --enable-libsalsa=NO --regparm + + msg "Building OSS." + make build + + msg "Patching init scripts." + cd "${srcdir}/build/prototype" + rm usr/lib/oss/etc/S89oss + patch -p0 -i "${srcdir}/rm-init-scripts.patch" + patch -p0 -i "${srcdir}/soundon.patch" + # remove hal dependency + patch -p0 -i "${srcdir}/remove-hal.patch" + rm -rf usr/lib/oss/scripts/oss_usb-create-devices usr/lib/oss/scripts/90-oss_usb-create-device.fdi +} +package() { + _dir=oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl + cd "${srcdir}/${_dir}" + msg "Copying files." + # Install libflashsupport.so + install -dm755 "$pkgdir/usr/lib" + ln -s oss/lib/libflashsupport.so "$pkgdir/usr/lib/libflashsupport.so" + cd "${srcdir}/build/prototype" + cp -a * "${pkgdir}" + chmod -R a+r "${pkgdir}" # All files can have read permission (FS#13815) + find "${pkgdir}" -type d -exec chmod a+x '{}' \; # Make namcap happy + install -Dm755 "${srcdir}/rc-script" "${pkgdir}/etc/rc.d/oss" } |