diff options
author | Florian Pritz <bluewind@xssn.at> | 2010-07-12 02:15:38 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xssn.at> | 2010-07-12 02:15:38 +0200 |
commit | 8d23351755ef023dc68e90de539ae086dda7dcec (patch) | |
tree | 4ac438d200788bb91041820c145abedb516c2355 /oss-hg | |
parent | 1c24ee62ce885a56c4228b2082e1bf9147eb1ad7 (diff) | |
download | aur-packages-8d23351755ef023dc68e90de539ae086dda7dcec.tar.gz aur-packages-8d23351755ef023dc68e90de539ae086dda7dcec.tar.xz |
updates
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'oss-hg')
-rw-r--r-- | oss-hg/.gitignore | 1 | ||||
-rw-r--r-- | oss-hg/PKGBUILD | 83 | ||||
-rw-r--r-- | oss-hg/oss.rc | 82 | ||||
-rw-r--r-- | oss-hg/oss.soundon.patch | 28 | ||||
-rw-r--r-- | oss-hg/ossxmix.desktop | 10 | ||||
-rw-r--r-- | oss-hg/ossxmix.png | bin | 0 -> 6689 bytes |
6 files changed, 145 insertions, 59 deletions
diff --git a/oss-hg/.gitignore b/oss-hg/.gitignore new file mode 100644 index 0000000..62ab099 --- /dev/null +++ b/oss-hg/.gitignore @@ -0,0 +1 @@ +oss diff --git a/oss-hg/PKGBUILD b/oss-hg/PKGBUILD index 0267f56..79f1ad9 100644 --- a/oss-hg/PKGBUILD +++ b/oss-hg/PKGBUILD @@ -1,70 +1,85 @@ -# Contributor: lh <jarryson#gmail.com> +# Archlive <http://archlive-pkg.googlecode.com> + pkgname=oss-hg -pkgver=666 +pkgver=907 pkgrel=1 pkgdesc="Open Sound System UNIX audio architecture" arch=('i686' 'x86_64') -url="http://developer.opensound.com/" +url="http://www.opensound.com/" license=('GPL2') -depends=('gcc' 'make' 'kernel-headers' 'module-init-tools' 'libtool' 'sed') -makedepends=('pkgconfig' 'gawk' 'gtk2' 'mercurial') -provides=('oss') +depends=('module-init-tools' 'libtool' 'sed') +makedepends=('pkgconfig' 'gawk' 'gtk2' 'mercurial' 'gcc' 'make') +provides=('oss' 'oss4') conflicts=('oss-linux' 'oss-linux-free' 'oss-testing' 'oss' 'oss-mercurial') install='oss.install' -source=('oss.rm-init-scripts.patch' 'oss.rc' 'oss.install') -md5sums=('b9a380a0ac8896390d71ac13676f27e1' - '8ca7cdf94c56ab02890eb4aba6a4995f' - '1494a2304a1eb7a1979e7e83d894c67a') +backup=('usr/lib/oss/soundon.user') +source=('oss.rm-init-scripts.patch' 'oss.soundon.patch' 'oss.rc' 'oss.install' + 'ossxmix.png' 'ossxmix.desktop') +md5sums=() optdepends=('gtk2: for graphical mixer (ossxmix)' - 'hal: for automatic USB audio configuration' - 'libflashsupport-oss: for Flash plugin support') + 'hal: for automatic USB audio configuration') -[ "$CARCH" = "x86_64" ] && optdepends[2]='lib32-libflashsupport-oss: for Flash plugin support' +_hgroot="http://opensound.hg.sourceforge.net:8000/hgroot/opensound/opensound" +_hgrepo="oss" -_hgroot=http://mercurial.opensound.com -_hgrepo=oss build() { - cd $srcdir + cd $startdir if [ -d ${_hgrepo} ]; then - cd ${srcdir}/${_hgrepo} - hg pull -u + cd ${_hgrepo} && hg pull -u -r ${pkgver} else hg clone ${_hgroot} ${_hgrepo} || return 1 - cd ${srcdir}/${_hgrepo} fi + + [ -d $srcdir/${_hgrepo} ] && rm -rf $srcdir/${_hgrepo} + hg clone $startdir/${_hgrepo} $srcdir/${_hgrepo} + cd $srcdir/${_hgrepo} + zsh # Avoid these flags conflicting with OSS build system. unset CFLAGS unset OSFLAGS unset LIBRARIES export NO_WARNING_CHECKS=yes - - # Remove libflashsupport, as it belongs to a separate package. - rm -f "$srcdir/$_hgrepo/oss/lib/flashsupport.c" &> /dev/null - msg "Preparing the build environment." + # 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 - # have to remove this dir. because maybe the scource is different now. - rm -rf $srcdir/$_hgrepo-build - # Create build directory and configure - mkdir $srcdir/$_hgrepo-build && cd srcdir/$_hgrepo-build - "$srcdir/$_hgrepo/configure" --enable-libsalsa=NO || return 1 + msg "Preparing the build environment." + cd $srcdir/${_hgrepo} + [ -d build ] && rm -rf build + mkdir build && cd build + ../configure --regparm --config-midi=YES --enable-timings --portable-build || return 1 + #../configure --enable-libsalsa=YES || return 1 msg "Building OSS." make build || return 1 msg "Patching init scripts." - cd "$srcdir/build/prototype" + cd prototype rm usr/lib/oss/etc/S89oss - patch -b -p0 < "$srcdir/oss.rm-init-scripts.patch" || return 1 + patch -Np0 -i "$srcdir/oss.rm-init-scripts.patch" || return 1 + patch -Np0 -i "$srcdir/oss.soundon.patch" || return 1 msg "Copying files." - cp -R * "$pkgdir" - chmod 755 "$pkgdir/usr/sbin/" "$pkgdir/usr/lib/oss/etc/" "$pkgdir/usr/lib/oss/build/" + cp -a * "${pkgdir}" + chmod -R a+r "${pkgdir}" + find "${pkgdir}" -type d -exec chmod a+x '{}' \; install -D -m755 "$srcdir/oss.rc" "$pkgdir/etc/rc.d/oss" - + install -D -m755 "$srcdir/ossxmix.desktop" "$pkgdir/usr/share/applications/ossxmix.desktop" + install -D -m644 "$srcdir/ossxmix.png" "$pkgdir/usr/share/pixmaps/ossxmix.png" } - +md5sums=('b9a380a0ac8896390d71ac13676f27e1' + '65f07fe241bfbf912f76d8b6d8f276b5' + 'b70f139f73c2f1ee9db2680ce48121fb' + '1494a2304a1eb7a1979e7e83d894c67a' + 'f6a0fa9d274d21ab92cd03fca885add7' + '81e0f51ec04379dee64c31c32b045028') +# vim: set ft=zsh: diff --git a/oss-hg/oss.rc b/oss-hg/oss.rc index 3f63378..1724aa2 100644 --- a/oss-hg/oss.rc +++ b/oss-hg/oss.rc @@ -1,32 +1,64 @@ #!/bin/bash . /etc/rc.conf . /etc/rc.d/functions - case "$1" in - start) - stat_busy 'Starting Open Sound System' - if /usr/sbin/soundon - then - add_daemon oss - stat_done + start) + if [ "${msg_lang}" = "cn" ]; then + stat_busy "正在启动 OSS 开源驱动" else - stat_fail + stat_busy "Starting OSS/Open source driver" fi - ;; - stop) - stat_busy 'Stopping Open Sound System' - if /usr/sbin/soundoff - then - rm_daemon oss - stat_done - else - stat_fail - fi - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "Usage: $0 {start|stop|restart}" + # 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 oss4 + stat_done + fi + ;; + stop) + if [ "${msg_lang}" = "cn" ]; then + stat_busy "正在保存 OSS 设置" + else + stat_busy "Saving OSS mixer" + fi + /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 + if [ "${msg_lang}" = "cn" ]; then + stat_busy "正在关闭 OSS 开源驱动" + else + stat_busy "Stopping OSS/Open source driver" + fi + /usr/sbin/soundoff + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon oss4 + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" esac diff --git a/oss-hg/oss.soundon.patch b/oss-hg/oss.soundon.patch new file mode 100644 index 0000000..4702b86 --- /dev/null +++ b/oss-hg/oss.soundon.patch @@ -0,0 +1,28 @@ +--- usr/sbin/soundon.old 2009-09-04 06:35:26.000000000 +0100 ++++ usr/sbin/soundon 2009-11-15 13:59:53.000000000 +0000 +@@ -255,7 +255,10 @@ + then + if test "`uname -m` " = "x86_64 " + then +- ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib64/libasound.so.2 ++ # Fix for compatibility with Arch's directory structure ++ # Not that we use it, there is no $OSSLIBDIR/.libsalsa_installed ++ ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib/libasound.so.2 ++ #ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib64/libasound.so.2 + #ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64 + else + if test -s /lib/libasound.so.2 +@@ -278,8 +281,11 @@ + then + if test "`uname -m` " = "x86_64 " + then +- ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64 +- ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib64 ++ # Fix for compatibility with Arch's directory structure ++ ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib ++ ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib ++ #ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64 ++ #ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib64 + else + if test -s /lib/libasound.so.2 + then diff --git a/oss-hg/ossxmix.desktop b/oss-hg/ossxmix.desktop new file mode 100644 index 0000000..2022bd7 --- /dev/null +++ b/oss-hg/ossxmix.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=OSS X Mixer +Name[zh_CN]=OSS 声音设置 +Type=Application +Comment=OSS Setup +Exec=ossxmix +Categories=System;Application; +GenericName=OSS X Mixer +Icon=/usr/share/pixmaps/ossxmix.png diff --git a/oss-hg/ossxmix.png b/oss-hg/ossxmix.png Binary files differnew file mode 100644 index 0000000..8758fdb --- /dev/null +++ b/oss-hg/ossxmix.png |