PKGBUILDs/extra/pulseaudio/PKGBUILD

198 lines
5.9 KiB
Bash
Raw Normal View History

2013-06-07 14:16:15 +00:00
# $Id$
2013-04-01 23:50:22 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - added --disable-neon-opt to configure
2015-05-15 04:37:46 +00:00
# - removed xen pieces
2013-04-01 23:50:22 +00:00
pkgbase=pulseaudio
2015-05-15 04:37:46 +00:00
pkgname=(pulseaudio libpulse pulseaudio-{gconf,zeroconf,lirc,jack,bluetooth,equalizer})
2013-04-01 23:50:22 +00:00
pkgdesc="A featureful, general-purpose sound server"
2015-09-24 18:16:08 +00:00
pkgver=7.0
pkgrel=1
2013-04-01 23:50:22 +00:00
arch=(i686 x86_64)
url="http://www.freedesktop.org/wiki/Software/PulseAudio"
2015-05-15 04:37:46 +00:00
license=(LGPL)
2015-09-24 18:16:08 +00:00
makedepends=(libasyncns libcap attr libxtst libsm libsndfile libtool rtkit libsoxr
2015-02-13 04:30:17 +00:00
speexdsp tdb systemd dbus avahi bluez bluez-libs gconf intltool jack2-dbus sbc
lirc openssl fftw orc json-c gtk3 webrtc-audio-processing
check)
2014-03-03 22:30:09 +00:00
options=(!emptydirs)
2015-09-24 18:16:08 +00:00
source=(http://freedesktop.org/software/$pkgbase/releases/$pkgbase-$pkgver.tar.xz
padsp-lib32.patch)
sha256sums=('ca1ae1377e8926bfc3ffe2aeb9f657f6c363a16f72861166fcf9454e3eeae8fa'
'7832fc59df76538ff10aedd297c03cb7ff117235da8bfad26082994bb5b84332')
2013-04-01 23:50:22 +00:00
2013-10-30 14:06:42 +00:00
prepare() {
cd $pkgbase-$pkgver
}
2013-10-28 14:04:55 +00:00
2013-04-01 23:50:22 +00:00
build() {
cd $pkgbase-$pkgver
2014-03-03 22:30:09 +00:00
./configure --prefix=/usr \
2013-04-01 23:50:22 +00:00
--sysconfdir=/etc \
--libexecdir=/usr/lib \
--localstatedir=/var \
--with-udev-rules-dir=/usr/lib/udev/rules.d \
--with-database=tdb \
--disable-tcpwrap \
2014-03-03 22:30:09 +00:00
--disable-bluez4 \
2015-02-13 04:30:17 +00:00
--disable-samplerate \
2013-04-01 23:50:22 +00:00
--disable-rpath \
--disable-default-build-tests \
--disable-neon-opt
# fight unused direct deps
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
package_pulseaudio() {
2015-05-15 04:37:46 +00:00
depends=("libpulse=$pkgver-$pkgrel" rtkit libltdl speexdsp tdb orc
2015-09-24 18:16:08 +00:00
webrtc-audio-processing sbc libsoxr)
2015-05-15 04:37:46 +00:00
optdepends=('pulseaudio-alsa: ALSA configuration (recommended)')
2013-04-01 23:50:22 +00:00
backup=(etc/pulse/{daemon.conf,default.pa,system.pa})
2015-05-15 04:37:46 +00:00
install=pulseaudio.install
2013-04-01 23:50:22 +00:00
cd $pkgbase-$pkgver
2015-09-24 18:16:08 +00:00
_pulsever=$(./git-version-gen .tarball-version)
[[ $_pulsever = *.*.* ]] && _pulsever=${_pulsever%.*}
2013-06-07 14:16:15 +00:00
make -j1 DESTDIR="$pkgdir" install \
bashcompletiondir=/usr/share/bash-completion/completions
2013-04-01 23:50:22 +00:00
2015-09-24 18:16:08 +00:00
cd "$pkgdir"
patch -Np1 -i "$srcdir/padsp-lib32.patch"
sed -e '/flat-volumes/iflat-volumes=no' \
-i etc/pulse/daemon.conf
# Superseded by socket activation
sed -e '/autospawn/iautospawn=no' \
-i etc/pulse/client.conf
2013-04-01 23:50:22 +00:00
# Disable cork-request module, can result in e.g. media players unpausing
# when there's a Skype call incoming
sed -e 's|/usr/bin/pactl load-module module-x11-cork-request|#&|' \
2015-09-24 18:16:08 +00:00
-i usr/bin/start-pulseaudio-x11
2013-04-01 23:50:22 +00:00
2015-09-24 18:16:08 +00:00
rm etc/dbus-1/system.d/pulseaudio-system.conf
mkdir usr/lib/systemd/user/sockets.target.wants
ln -s ../pulseaudio.socket \
usr/lib/systemd/user/sockets.target.wants/pulseaudio.socket
2013-04-01 23:50:22 +00:00
### Split libpulse
mkdir -p "$srcdir"/libpulse/{etc/pulse,usr/{bin,lib/pulseaudio,share/man/man{1,5}}}
2015-09-24 18:16:08 +00:00
mv etc/pulse/client.conf \
"$srcdir/libpulse/etc/pulse"
2013-04-01 23:50:22 +00:00
2015-09-24 18:16:08 +00:00
mv usr/bin/pa{cat,ctl,dsp,mon,play,rec,record} \
2013-04-01 23:50:22 +00:00
"$srcdir/libpulse/usr/bin"
2015-09-24 18:16:08 +00:00
mv usr/lib/libpulse{,-simple,-mainloop-glib}.so* \
usr/lib/{cmake,pkgconfig} \
2013-04-01 23:50:22 +00:00
"$srcdir/libpulse/usr/lib"
2015-09-24 18:16:08 +00:00
mv usr/lib/pulseaudio/libpulse{dsp,common-*}.so \
2013-04-01 23:50:22 +00:00
"$srcdir/libpulse/usr/lib/pulseaudio"
2015-09-24 18:16:08 +00:00
mv usr/include \
"$srcdir/libpulse/usr"
2013-04-01 23:50:22 +00:00
2015-09-24 18:16:08 +00:00
mv usr/share/man/man1/pa{cat,ctl,dsp,mon,play,rec,record}.1 \
2013-04-01 23:50:22 +00:00
"$srcdir/libpulse/usr/share/man/man1"
2015-09-24 18:16:08 +00:00
mv usr/share/man/man5/pulse-client.conf.5 \
"$srcdir/libpulse/usr/share/man/man5"
mv usr/share/vala \
"$srcdir/libpulse/usr/share"
2015-05-15 04:37:46 +00:00
### Split modules
2015-09-24 18:16:08 +00:00
mkdir -p "$srcdir"/{gconf,zeroconf,lirc,jack,bluetooth,equalizer}/usr/lib/pulse-$_pulsever/modules \
2015-05-15 04:37:46 +00:00
"$srcdir"/{gconf/usr/lib/pulse,equalizer/usr/bin}
2015-09-24 18:16:08 +00:00
mv usr/lib/pulse-$_pulsever/modules/module-gconf.so \
"$srcdir/gconf/usr/lib/pulse-$_pulsever/modules"
mv usr/lib/pulse/gconf-helper \
"$srcdir/gconf/usr/lib/pulse"
2015-05-15 04:37:46 +00:00
2015-09-24 18:16:08 +00:00
mv usr/lib/pulse-$_pulsever/modules/{libavahi-wrap,module-{zeroconf-{publish,discover},raop-discover}}.so \
"$srcdir/zeroconf/usr/lib/pulse-$_pulsever/modules"
2015-05-15 04:37:46 +00:00
2015-09-24 18:16:08 +00:00
mv usr/lib/pulse-$_pulsever/modules/module-lirc.so \
"$srcdir/lirc/usr/lib/pulse-$_pulsever/modules"
2015-05-15 04:37:46 +00:00
2015-09-24 18:16:08 +00:00
mv usr/lib/pulse-$_pulsever/modules/module-jack{-sink,-source,dbus-detect}.so \
"$srcdir/jack/usr/lib/pulse-$_pulsever/modules"
2015-05-15 04:37:46 +00:00
2015-09-24 18:16:08 +00:00
mv usr/lib/pulse-$_pulsever/modules/{libbluez5-util,module-{bluetooth-{discover,policy},bluez5-{discover,device}}}.so \
"$srcdir/bluetooth/usr/lib/pulse-$_pulsever/modules"
2015-05-15 04:37:46 +00:00
2015-09-24 18:16:08 +00:00
mv usr/lib/pulse-$_pulsever/modules/module-equalizer-sink.so \
"$srcdir/equalizer/usr/lib/pulse-$_pulsever/modules"
mv usr/bin/qpaeq \
"$srcdir/equalizer/usr/bin"
2013-04-01 23:50:22 +00:00
}
package_libpulse() {
pkgdesc="$pkgdesc (client library)"
2014-03-03 22:30:09 +00:00
depends=(dbus libasyncns libcap libxtst libsm libsndfile json-c systemd)
2013-04-01 23:50:22 +00:00
backup=(etc/pulse/client.conf)
mv "$srcdir"/libpulse/* "$pkgdir"
}
2015-05-15 04:37:46 +00:00
package_pulseaudio-gconf(){
pkgdesc="GConf support for PulseAudio"
2015-09-24 18:16:08 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" gconf)
2015-05-15 04:37:46 +00:00
mv "$srcdir"/gconf/* "$pkgdir"
}
package_pulseaudio-zeroconf(){
pkgdesc="Zeroconf support for PulseAudio"
2015-09-24 18:16:08 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" avahi openssl)
2015-05-15 04:37:46 +00:00
mv "$srcdir"/zeroconf/* "$pkgdir"
}
package_pulseaudio-lirc(){
pkgdesc="IR (lirc) support for PulseAudio"
2015-09-24 18:16:08 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" lirc)
2015-05-15 04:37:46 +00:00
mv "$srcdir"/lirc/* "$pkgdir"
}
package_pulseaudio-jack(){
pkgdesc="Jack support for PulseAudio"
2015-09-24 18:16:08 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" jack2)
2015-05-15 04:37:46 +00:00
mv "$srcdir"/jack/* "$pkgdir"
}
package_pulseaudio-bluetooth(){
pkgdesc="Bluetooth support for PulseAudio"
2015-09-24 18:16:08 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" bluez bluez-libs)
2015-05-15 04:37:46 +00:00
mv "$srcdir"/bluetooth/* "$pkgdir"
}
package_pulseaudio-equalizer(){
pkgdesc="Equalizer for PulseAudio"
2015-09-24 18:16:08 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" python-pyqt4 fftw)
2015-05-15 04:37:46 +00:00
license=(AGPL3)
mv "$srcdir"/equalizer/* "$pkgdir"
}