core/pulseaudio/PKGBUILD
2010-08-11 17:18:31 +00:00

94 lines
2.8 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=pulseaudio
pkgver=0.9.21
pkgrel=1
__gitcommit=65f89dc
pkgdesc="A networked sound server"
arch=(i686 x86_64)
url="http://pulseaudio.org/"
license=(GPL LGPL)
depends=(libasyncns libcap attr libxtst libsm tcp_wrappers libsndfile
libtool rtkit speex libsamplerate tdb udev)
makedepends=(autoconf avahi bluez doxygen gconf intltool jack lirc-utils pkgconfig
git rsync)
optdepends=('alsa-plugins: ALSA support'
'avahi: zeroconf support'
'bluez: bluetooth support'
'gconf: configuration through gconf'
'jack: jack support'
'lirc-utils: infra-red support')
options=(emptydirs !libtool !makeflags !strip)
backup=(etc/pulse/{client.conf,daemon.conf,default.pa,system.pa})
install=pulseaudio.install
source=(pulseaudio.conf pulseaudio.rc)
md5sums=('d4a7d4ad51b406588ba7ac7931c5dd88'
'c5aa09c1d3e2217dc3bb23138e2a5a1d')
__gitroot=git://git.0pointer.de/pulseaudio.git
__gitname=pulseaudio
__gitbranch=stable-queue
build() {
cd "$srcdir"
msg2 "Checking out source from git..."
[[ ! -d $__gitname ]] && git clone $__gitroot $__gitname
cd $__gitname
git fetch origin $__gitbranch || warning 'git fetch failed!'
if [[ $(git rev-parse $__gitcommit) != $(git rev-parse origin/$__gitbranch) ]]; then
warning 'You are not building the latest revision!'
warning "Consider updating __gitcommit to $(git rev-parse --short origin/$__gitbranch)."
sleep 10
fi
git checkout $__gitcommit
cd ..
rm -rf $__gitname-build
rsync -a --exclude='.git/' $__gitname/ $__gitname-build
cd "$__gitname-build"
msg2 "Building..."
# Fix linking dependency cycle between libpulse and libpulsecommon
LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
LDFLAGS="${LDFLAGS//,--as-needed}"
LDFLAGS="${LDFLAGS//--as-needed}"
# Fix strict aliasing warnings
CFLAGS+=" -fno-strict-aliasing"
echo "$pkgver" > .tarball-version
sh autogen.sh --disable-hal --disable-rpath \
--libexecdir=/usr/lib --localstatedir=/var \
--prefix=/usr --sysconfdir=/etc --with-database=tdb
make
make doxygen
}
package() {
cd "$srcdir/$__gitname-build"
make DESTDIR="$pkgdir" install
install -Dm755 "$srcdir/pulseaudio.rc" "$pkgdir/etc/rc.d/pulseaudio"
install -Dm644 "$srcdir/pulseaudio.conf" "$pkgdir/etc/conf.d/pulseaudio"
install -dm755 "$pkgdir/var/run/pulse"
# Ugly fix for pulseaudio system users
install -dm755 "$pkgdir/var/pulse"
echo -e '\n### Automatically restore volumes\nload-module module-volume-restore table="/var/pulse/volume-restore.table"' \
>> "$pkgdir/etc/pulse/system.pa"
}