PKGBUILDs/extra/pulseaudio/PKGBUILD

202 lines
6 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
pkgbase=pulseaudio
2018-06-21 12:56:44 +00:00
pkgname=(pulseaudio libpulse pulseaudio-{zeroconf,lirc,jack,bluetooth,equalizer})
2013-04-01 23:50:22 +00:00
pkgdesc="A featureful, general-purpose sound server"
2018-07-16 23:27:12 +00:00
pkgver=12.2
2018-07-26 12:21:35 +00:00
pkgrel=2
2018-06-21 12:56:44 +00:00
arch=(x86_64)
url="https://www.freedesktop.org/wiki/Software/PulseAudio/"
2017-01-19 02:24:35 +00:00
license=(GPL)
2015-09-24 18:16:08 +00:00
makedepends=(libasyncns libcap attr libxtst libsm libsndfile libtool rtkit libsoxr
2018-06-21 12:56:44 +00:00
speexdsp tdb systemd dbus avahi bluez bluez-libs intltool jack2-dbus sbc
2017-01-19 02:24:35 +00:00
lirc openssl fftw orc gtk3 webrtc-audio-processing
check autoconf-archive git)
2014-03-03 22:30:09 +00:00
options=(!emptydirs)
2018-07-16 23:27:12 +00:00
_commit=ee910cf6daa5120ab534eb2e6c573d94b9b182e7 # tags/v12.2^0
2017-09-06 00:05:22 +00:00
source=("git+https://anongit.freedesktop.org/git/pulseaudio/pulseaudio#commit=$_commit")
sha256sums=('SKIP')
2013-04-01 23:50:22 +00:00
2017-01-19 02:24:35 +00:00
pkgver() {
cd pulseaudio
git describe --tags | sed 's/^v//;s/-/+/g'
}
2013-10-30 14:06:42 +00:00
prepare() {
2017-01-19 02:24:35 +00:00
cd pulseaudio
NOCONFIGURE=1 ./bootstrap.sh
2013-10-30 14:06:42 +00:00
}
2013-10-28 14:04:55 +00:00
2013-04-01 23:50:22 +00:00
build() {
2017-01-19 02:24:35 +00:00
cd pulseaudio
[[ $CARCH != "aarch64" ]] && CONFIG="--disable-neon-opt"
2013-04-01 23:50:22 +00:00
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 \
2017-09-06 00:05:22 +00:00
--with-pulsedsp-location='/usr/\\$$LIB/pulseaudio' \
2013-04-01 23:50:22 +00:00
--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 \
2017-01-19 02:24:35 +00:00
$CONFIG \
2018-06-21 12:56:44 +00:00
DATADIRNAME=share
2013-04-01 23:50:22 +00:00
# fight unused direct deps
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
package_pulseaudio() {
2017-01-19 02:24:35 +00:00
depends=("libpulse=$pkgver-$pkgrel" rtkit libltdl speexdsp tdb orc libsoxr
webrtc-audio-processing)
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
2018-06-21 12:56:44 +00:00
replaces=('pulseaudio-xen<=9.0' 'pulseaudio-gconf<=11.1')
2013-04-01 23:50:22 +00:00
2017-01-19 02:24:35 +00:00
cd pulseaudio
2015-09-24 18:16:08 +00:00
_pulsever=$(./git-version-gen .tarball-version)
2015-09-27 17:00:34 +00:00
while [[ $_pulsever = *.*.* ]]; do
_pulsever=${_pulsever%.*}
done
_pulsever=${_pulsever%%-*}
2015-09-24 18:16:08 +00:00
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"
2016-01-22 21:50:15 +00:00
# Assumes that any volume adjustment is intended by the user, who can control
# each app's volume. Misbehaving clients can trigger earsplitting volume
# jumps. App volumes can diverge wildly and cause apps without their own
# volume control to fall below sink volume; a sink-only volume control will
# suddenly be unable to make such an app loud enough.
2015-12-10 05:58:36 +00:00
sed -e '/flat-volumes/iflat-volumes = no' \
2015-09-24 18:16:08 +00:00
-i etc/pulse/daemon.conf
# Superseded by socket activation
2015-12-10 05:58:36 +00:00
sed -e '/autospawn/iautospawn = no' \
2015-09-24 18:16:08 +00:00
-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
2018-07-26 12:21:35 +00:00
# Required by qpaeq
sed -e '/Load several protocols/aload-module module-dbus-protocol' \
-i etc/pulse/default.pa
2015-09-24 18:16:08 +00:00
rm etc/dbus-1/system.d/pulseaudio-system.conf
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
2018-06-21 12:56:44 +00:00
mkdir -p "$srcdir"/{zeroconf,lirc,jack,bluetooth,equalizer}/usr/lib/pulse-$_pulsever/modules \
"$srcdir"/equalizer/usr/bin
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)"
2017-01-19 02:24:35 +00:00
depends=(dbus libasyncns libcap libxtst libsm libsndfile systemd)
license=(LGPL)
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-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"
2017-01-19 18:45:27 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" jack)
2015-05-15 04:37:46 +00:00
mv "$srcdir"/jack/* "$pkgdir"
}
package_pulseaudio-bluetooth(){
pkgdesc="Bluetooth support for PulseAudio"
2017-01-19 02:24:35 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" bluez bluez-libs sbc)
2015-05-15 04:37:46 +00:00
mv "$srcdir"/bluetooth/* "$pkgdir"
}
package_pulseaudio-equalizer(){
pkgdesc="Equalizer for PulseAudio"
2018-07-26 12:21:35 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" python-{pyqt5,dbus,sip} fftw)
2015-05-15 04:37:46 +00:00
mv "$srcdir"/equalizer/* "$pkgdir"
}