[Arch] Phonon without KDE and PulseAudio

OSS specific Linux discussion (x86/amd64)

Moderators: kodachi, hannu, dev, cesium

[Arch] Phonon without KDE and PulseAudio

Postby igorzwx » Sat Dec 04, 2010 4:46 am

Phonon for Gnome and XFCE users (without PulseAudio and KDE things)

What is the purpose of it? If, for example, you want to install Minitube (to watch YouTube videos without Flash Player), you may get it together with PulseAudio, libpulse, and xine-lib.

Minitube → Phonon → libpulse

See: http://www.archlinux.org/packages/extra/i686/phonon/

If you do not like PulseAudio, you can easily compile a minimal Phonon, which depends on Qt and GStreamer only.

Why does Arch package "phonon" depend on "libpulse"? Because it was deliberately built with PulseAudio.
If you have ABS installed, you may find the official Arch PKGBUILD for Phonon here: /var/abs/extra/phonon/PKGBUILD

Code: Select all
# $Id: PKGBUILD 100628 2010-11-24 21:36:12Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>

pkgname=('phonon' 'phonon-xine' 'phonon-gstreamer')
makedepends=('cmake' 'automoc4' 'qt' 'xine-lib' 'gstreamer0.10-base-plugins' 'mesa' 'pulseaudio')
  pkgdesc="The multimedia API for KDE4"
  depends=('qt' 'phonon-backend' 'libpulse')
  optdepends=('pulseaudio: PulseAudio support')

It turned out that phonon can be easily compiled without PulseAudio. The magic options are these:

Code: Select all
      -DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed' \
      -DWITH_GStreamer=ON  \
      -DWITH_Xine=OFF \
      -DWITH_Alsa=OFF \

It is really very simple. You make the package with one command: makepkg
To work such wonders, you need to install the Arch Build System (ABS) http://wiki.archlinux.org/index.php/ABS

Step 1: Install the Arch Build System

Code: Select all
# pacman -Syy
# pacman -Syu
# pacman -S abs
# pacman -S base-devel

Step 2: Download (or refresh) the ABS tree

Code: Select all
# abs

The ABS tree is very small, it contains PKGBUILD scripts, some other small scripts, and nothing more.

Step 3: Install dependencies:

Code: Select all
depends=('qt' 'gstreamer0.10-base')
makedepends=('pkgconfig' 'cmake' 'automoc4')

For example:

Code: Select all
# pacman -S cmake automoc4

Step 4: Download and unpack "phonon-git--gst-noxine-nopulse.tar.bz2" (in the Attachment)

Code: Select all
$ tar -xf phonon-git--gst-noxine-nopulse.tar.bz2
$ cd phonon-git--gst-noxine-nopulse

Step 5: Run makepkg (as ordinary user)

Code: Select all
$ makepkg

The result should look like this:

Code: Select all
$ ls

The Arch package "phonon-git--gst-noxine-nopulse-20101204-2-i686.pkg.tar.xz" is very small (187 KB)
Total Installed Size: 1.39 MB

Step 6: Remove the old Phonon (if you have it installed):

Code: Select all
$ sudo pacman -Rd phonon

Step 7: Install "phonon-git--gst-noxine-nopulse"

Code: Select all
$ sudo pacman -U phonon-git--gst-noxine-nopulse-20101204-2-i686.pkg.tar.xz

Now you can install "minitube-git" (if you want):

Code: Select all
$ yaourt minitube
1 unarch/minitube-git 20100821-1
    Native YouTube client in Qt
2 adslgr32/minitube-git 20090704-1
    Native YouTube client in Qt
3 aur/minitube 1.2-1 (280)
    A native YouTube client in QT. Watch YouTube videos without Flash Player
4 aur/minitube-git 20100726-1 (101)
    Native YouTube client in Qt
==> Enter n° of packages to be installed (ex: 1 2 3 or 1-3)
==> -------------------------------------------------------
==> 4

==> Downloading minitube-git PKGBUILD from AUR...
x minitube.install

==> minitube-git dependencies:
- qt (already installed)
- phonon (already installed)
- git (already installed)

You may also rename the package "minitube-git" (edit PKGBUILD) to prevent unwanted upgrades (infected with PulseAudio)

In the Attachment: phonon-git--gst-noxine-nopulse.tar.bz2
Code: Select all
md5sum:  034f53f92f4f35c09bd18e6a06913fce
md5sum: 034f53f92f4f35c09bd18e6a06913fce
(1 KiB) Downloaded 1422 times
Known Member
Posts: 1165
Joined: Sun Jun 28, 2009 9:31 pm

Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest