Skip to content

Instantly share code, notes, and snippets.

@KB3NZQ
Forked from anonymous/PKGBUILD
Created April 2, 2021 15:03
Show Gist options
  • Select an option

  • Save KB3NZQ/77a93fc0e236976831b70715ff793ad7 to your computer and use it in GitHub Desktop.

Select an option

Save KB3NZQ/77a93fc0e236976831b70715ff793ad7 to your computer and use it in GitHub Desktop.
_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