# $Id: PKGBUILD 1938 2009-09-06 17:41:02Z pmatias $ # Maintainer: Paulo Matias pkgname="oss" pkgver="4.2_2000" 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' 'findutils') optdepends=('gtk2: for graphical mixer (ossxmix)' 'hal: for automatic USB audio configuration') conflicts=('oss-linux' 'oss-linux-free' 'oss-testing' 'libflashsupport' 'libflashsupport-pulse' 'libflashsupport-oss') replaces=('libflashsupport-oss') install='oss.install' 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') md5sums=('552d728ca28aef73ec715cecd7a743fa' 'b9a380a0ac8896390d71ac13676f27e1' '8ca7cdf94c56ab02890eb4aba6a4995f') build() { _dir="oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl" cd "${srcdir}/${_dir}" # Avoid these flags conflicting with OSS build system. unset CFLAGS unset OSFLAGS unset LIBRARIES # 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 || return 1 install -Dm755 libflashsupport.so "${pkgdir}/usr/lib/libflashsupport.so" || return 1 rm -f "flashsupport.c" "libflashsupport.so" &> /dev/null msg "Preparing the build environment." cd "$srcdir" 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 -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 -D -m755 "${srcdir}/oss.rc" "${pkgdir}/etc/rc.d/oss" }