summaryrefslogtreecommitdiff
path: root/community/oss/PKGBUILD
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/oss/PKGBUILD
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/oss/PKGBUILD')
-rw-r--r--community/oss/PKGBUILD84
1 files changed, 84 insertions, 0 deletions
diff --git a/community/oss/PKGBUILD b/community/oss/PKGBUILD
new file mode 100644
index 000000000..c251c41b6
--- /dev/null
+++ b/community/oss/PKGBUILD
@@ -0,0 +1,84 @@
+# $Id: PKGBUILD 36678 2011-01-05 23:16:19Z bluewind $
+# Contributor: Paulo Matias <matiasΘarchlinux-br·org>
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=oss
+pkgver=4.2_2004
+pkgrel=1
+pkgdesc="Open Sound System UNIX audio architecture"
+arch=('i686' 'x86_64')
+url="http://developer.opensound.com/"
+license=('GPL2')
+depends=('gcc' 'make' 'kernel26-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
+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.soundon.patch')
+md5sums=('256aba264d523fb8ee444aaacfb8d3da'
+ 'b9a380a0ac8896390d71ac13676f27e1'
+ '8ca7cdf94c56ab02890eb4aba6a4995f'
+ '65f07fe241bfbf912f76d8b6d8f276b5')
+
+build() {
+ _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}
+
+ if [ ! -d build ]; then
+ # Create build directory and configure
+ mkdir build && cd build
+ ${srcdir}/${_dir}/configure --enable-libsalsa=NO
+ else
+ # Change to existing build directory
+ cd build
+ fi
+
+ msg "Building OSS."
+ make build
+
+ msg "Patching init scripts."
+ cd ${srcdir}/build/prototype
+ rm usr/lib/oss/etc/S89oss
+ patch -b -p0 < ${srcdir}/oss.rm-init-scripts.patch
+ patch -b -p0 < ${srcdir}/oss.soundon.patch
+
+}
+
+package() {
+ _dir=oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl
+ cd ${srcdir}/${_dir}
+
+ msg "Copying files."
+
+ # Install libflashsupport.so
+ install -Dm755 oss/lib/libflashsupport.so \
+ ${pkgdir}/usr/lib/libflashsupport.so
+ rm -f oss/lib/{flashsupport.c,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}/oss.rc ${pkgdir}/etc/rc.d/oss
+}
+