mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 22:07:17 +08:00
92 lines
2.9 KiB
Bash
92 lines
2.9 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
|
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
# include global config
|
|
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
|
|
|
pkgname=oss
|
|
pkgver=4.2_2003
|
|
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' '50ossound')
|
|
md5sums=('d5bcdc505f5ad140791b8d0051fda74d'
|
|
'b9a380a0ac8896390d71ac13676f27e1'
|
|
'8ca7cdf94c56ab02890eb4aba6a4995f'
|
|
'65f07fe241bfbf912f76d8b6d8f276b5'
|
|
'f54d2213040c2b72dfcbc3e934d78f25')
|
|
|
|
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 || return 1
|
|
|
|
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
|
|
patch -b -p0 < ${srcdir}/oss.soundon.patch || return 1
|
|
}
|
|
|
|
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 || return 1
|
|
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
|
|
mkdir -p ${pkgdir}/etc/pm/sleep.d
|
|
cp ${srcdir}/50ossound ${pkgdir}/etc/pm/sleep.d/50ossound
|
|
}
|
|
|