Created
February 18, 2017 14:56
-
-
Save anonymous/546cd3e47908668f0f255a9ed04805c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_pkgname="pulseaudio" | |
pkgname="$_pkgname-hfp" | |
pkgdesc="A featureful, general-purpose sound server" | |
pkgver=tanuk.8367.af043266 | |
pkgrel=1 | |
arch=("i686" "x86_64" "armv7h") | |
url="http://pulseaudio.org/" | |
license=("GPL" "LGPL") | |
depends=("rtkit" "libltdl" "speex" "tdb" "systemd" "fftw" "orc" "libsamplerate" | |
"webrtc-audio-processing" "sbc" "libasyncns" "libxtst" "libsm" "libsndfile" "json-c") | |
makedepends=("git" "attr" "avahi" "bluez" "gconf" "intltool" "openssl" "bluez-libs") | |
optdepends=("alsa-plugins: ALSA support" | |
"avahi: zeroconf support" | |
"bluez: bluetooth support" | |
"gconf: configuration through gconf" | |
"jack: jack support" | |
"lirc-utils: infra-red support" | |
"openssl: RAOP support" | |
"python-pyqt4: Equalizer GUI (qpaeq)") | |
backup=(etc/pulse/{daemon.conf,default.pa,system.pa,client.conf}) | |
provides=("pulseaudio" "libpulse" "pulseaudio-zeroconf" "pulseaudio-gconf" "pulseaudio-equalizer" "pulseaudio-bluetooth" "pulseaudio-jack" "pulseaudio-xen" "pulseaudio-lirc") | |
conflicts=("pulseaudio" "libpulse" "pulseaudio-zeroconf" "pulseaudio-gconf" "pulseaudio-equalizer" "pulseaudio-bluetooth" "pulseaudio-jack" "pulseaudio-xen" "pulseaudio-lirc") | |
replaces=("pulseaudio" "libpulse" "pulseaudio-zeroconf" "pulseaudio-gconf" "pulseaudio-equalizer" "pulseaudio-bluetooth" "pulseaudio-jack" "pulseaudio-xen" "pulseaudio-lirc") | |
options=(!emptydirs) | |
source=("git://people.freedesktop.org/~tanuk/pulseaudio#branch=hfp") | |
sha256sums=("SKIP") | |
pkgver() { | |
cd "$srcdir/$_pkgname" | |
# git describe --always | sed "s/-/./g" | |
printf "%s.%s.%s" "tanuk" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | |
} | |
build() { | |
cd "$srcdir/$_pkgname" | |
GIT_DESCRIBE_FOR_BUILD="$pkgver" ./autogen.sh --prefix=/usr \ | |
--sysconfdir=/etc \ | |
--libexecdir=/usr/lib \ | |
--localstatedir=/var \ | |
--with-udev-rules-dir=/usr/lib/udev/rules.d \ | |
--with-database=tdb \ | |
--disable-hal-compat \ | |
--disable-tcpwrap \ | |
--disable-bluez4 \ | |
--disable-rpath \ | |
--disable-default-build-tests | |
make | |
} | |
package() { | |
cd "$srcdir/$_pkgname" | |
make DESTDIR="$pkgdir" install bashcompletiondir=/usr/share/bash-completion/completions | |
# Speed up pulseaudio shutdown so that it exits immediately with | |
# the last user session (module-systemd-login keeps it alive) | |
sed -e "/exit-idle-time/iexit-idle-time=0" -i "$pkgdir/etc/pulse/daemon.conf" | |
# 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|#&|" -i "$pkgdir/usr/bin/start-pulseaudio-x11" | |
rm "$pkgdir/etc/dbus-1/system.d/pulseaudio-system.conf" | |
install -Dm644 shell-completion/zsh/_pulseaudio "$pkgdir/usr/share/zsh/site-functions/_pulseaudio" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I could build the package after adding the following lines:
and pathes memfd_create.patch and
raop_client.patch
:To install this package, I had to remove the original libpulse, pulseaudio, and pulseaudio-* packages and a bunch of packages that used them.
After rebooting I was able to pair my headset via HSP/HFP protocol only and use a microphone. But the sound quality was awful and built-in audio wasn't available anymore so I reversed all changes.
For some reason, now I can choose between A2DP and HSP/HFP protocols.