Commit 5035a0c8 authored by Daniele's avatar Daniele

Beautification of the pulseaudio PKGBUILD.

parent 8d71f0bd
......@@ -8,95 +8,100 @@
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgbase=pulseaudio
pkgname=(pulseaudio libpulse)
pkgname=('pulseaudio' 'libpulse')
pkgdesc="A featureful, general-purpose sound server"
pkgver=1.1
pkgrel=1
arch=(i686 x86_64)
arch=('i686' 'x86_64')
url="http://pulseaudio.org/"
license=(GPL LGPL)
makedepends=(libasyncns libcap attr libxtst libsm libsamplerate libtool rtkit
speex tdb udev dbus-core xcb-util avahi bluez intltool jack
lirc-utils openssl fftw orc json-c)
license=('GPL' 'LGPL')
makedepends=('libasyncns' 'libcap' 'attr' 'libxtst' 'libsm' 'libsamplerate'
'libtool' 'rtkit' 'speex' 'tdb' 'udev' 'dbus-core' 'xcb-util'
'avahi' 'bluez' 'intltool' 'jack' 'lirc-utils' 'openssl' 'fftw' 'orc' 'json-c')
options=(!emptydirs !libtool !makeflags)
source=(http://freedesktop.org/software/$pkgbase/releases/$pkgbase-$pkgver.tar.xz
$pkgbase.xinit)
source=("http://freedesktop.org/software/${pkgbase}/releases/${pkgbase}-${pkgver}.tar.xz"
"${pkgbase}.xinit")
sha256sums=('6fe531136f6ebce2d35872a2d2c914278cdc5dcdd5eea516dc52c81f9001f5ee'
'4beae1ce931ae4bde3d2faca25735cc62a6eac182323f257dd9e703d499f7aa8')
build() {
cd "$srcdir/$pkgbase-$pkgver"
cd "${srcdir}/${pkgbase}-${pkgver}"
./configure --prefix=/usr \
--sysconfdir=/etc \
--libexecdir=/usr/lib \
--localstatedir=/var \
--with-database=tdb \
--disable-hal \
--disable-tcpwrap \
--disable-rpath \
--disable-default-build-tests
--sysconfdir=/etc \
--libexecdir=/usr/lib \
--localstatedir=/var \
--with-database=tdb \
--disable-hal \
--disable-tcpwrap \
--disable-rpath \
--disable-default-build-tests
make
}
package_pulseaudio() {
depends=("libpulse=$pkgver-$pkgrel" rtkit libtool speex tdb udev fftw orc)
optdepends=('avahi: zeroconf support'
'bluez: bluetooth support'
'gconf: configuration through gconf (paprefs)'
'jack: jack support'
'lirc-utils: infra-red support'
'openssl: RAOP support')
backup=(etc/pulse/{daemon.conf,default.pa,system.pa})
install=pulseaudio.install
cd "$srcdir/$pkgbase-$pkgver"
make DESTDIR="$pkgdir" install
depends=("libpulse=${pkgver}-${pkgrel}" 'rtkit' 'libtool' 'speex' 'tdb'
'udev' 'fftw' 'orc')
optdepends=('avahi: zeroconf support'
'bluez: bluetooth support'
'gconf: configuration through gconf (paprefs)'
'jack: jack support'
'lirc-utils: infra-red support'
'openssl: RAOP support')
backup=(etc/pulse/{daemon.conf,default.pa,system.pa})
install="pulseaudio.install"
cd "${srcdir}/${pkgbase}-${pkgver}"
make DESTDIR="${pkgdir}" install
# Lower resample quality, saves CPU
sed -e '/resample-method/iresample-method=speex-float-0' \
-i "$pkgdir/etc/pulse/daemon.conf"
-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"
-i "${pkgdir}/usr/bin/start-pulseaudio-x11"
# Make some modules optional
sed -e $'/load-module module-console-kit/{i.nofail\n;a.fail\n;}' \
-e '/load-module module-jackdbus-detect/s/^/#/' \
-i "$pkgdir/etc/pulse/default.pa"
-i "${pkgdir}/etc/pulse/default.pa"
# Python fix
sed -i '1s:python$:&2:' "$pkgdir/usr/bin/qpaeq"
sed -i '1s:python$:&2:' "${pkgdir}/usr/bin/qpaeq"
install -Dm755 "$srcdir/pulseaudio.xinit" "$pkgdir/etc/X11/xinit/xinitrc.d/pulseaudio"
install -D -m755 "${srcdir}/pulseaudio.xinit" "${pkgdir}/etc/X11/xinit/xinitrc.d/pulseaudio"
rm "$pkgdir/etc/dbus-1/system.d/pulseaudio-system.conf"
rm "${pkgdir}/etc/dbus-1/system.d/pulseaudio-system.conf"
### Split libpulse
mkdir -p "$srcdir"/libpulse/{etc/pulse,usr/{lib,share/man/man5}}
mkdir -p "${srcdir}"/libpulse/{etc/pulse,usr/{lib,share/man/man5}}
mv {"$pkgdir","$srcdir/libpulse"}/etc/pulse/client.conf
mv {"${pkgdir}","${srcdir}/libpulse"}/etc/pulse/client.conf
mv "$pkgdir"/usr/lib/libpulse{,dsp,-simple,-mainloop-glib}.so* \
"$pkgdir"/usr/lib/libpulsecommon-*.so \
"$srcdir/libpulse/usr/lib"
mv "${pkgdir}"/usr/lib/libpulse{,dsp,-simple,-mainloop-glib}.so* \
"${pkgdir}"/usr/lib/libpulsecommon-*.so \
"${srcdir}/libpulse/usr/lib"
mv {"$pkgdir","$srcdir/libpulse"}/usr/lib/pkgconfig
mv {"$pkgdir","$srcdir/libpulse"}/usr/include
mv {"${pkgdir}","${srcdir}/libpulse"}/usr/lib/pkgconfig
mv {"${pkgdir}","${srcdir}/libpulse"}/usr/include
mv {"$pkgdir","$srcdir/libpulse"}/usr/share/man/man5/pulse-client.conf.5
mv {"$pkgdir","$srcdir/libpulse"}/usr/share/vala
mv {"${pkgdir}","${srcdir}/libpulse"}/usr/share/man/man5/pulse-client.conf.5
mv {"${pkgdir}","${srcdir}/libpulse"}/usr/share/vala
}
package_libpulse() {
pkgdesc="$pkgdesc (client library)"
depends=(dbus-core xcb-util libasyncns libcap libxtst libsm libsamplerate json-c)
optdepends=('alsa-plugins: ALSA support'
'avahi: zeroconf support')
backup=(etc/pulse/client.conf)
mv "$srcdir"/libpulse/* "$pkgdir"
pkgdesc="${pkgdesc} (client library)"
depends=('dbus-core' 'xcb-util' 'libasyncns' 'libcap' 'libxtst' 'libsm'
'libsamplerate' 'json-c')
optdepends=('alsa-plugins: ALSA support'
'avahi: zeroconf support')
backup=(etc/pulse/client.conf)
mv "${srcdir}/libpulse"/* "${pkgdir}"
}
# vim:set ts=2 sw=2 et:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment