File xmms2.spec of Package xmms2

#
# spec file for package xmms2
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

%bcond_with libsidplay
%bcond_with restricted
%bcond_with cunit
%if %suse_version >= 1120
%bcond_with gme
%endif

%define codename DrNo

%define _ruby_sitedir %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')

%if %suse_version <= 1110
%define python_sitelib	%py_sitedir
%define python_sitearch	%py_sitedir
%endif

Name:           xmms2
Summary:        A modular audio framework and plugin architecture
Version:        0.7
Release:        13
# TODO: Make sure to update the verison number in xmms2-pkgconfig.patch.
License:        LGPLv2+ and GPLv2+ and BSD
Group:          Productivity/Multimedia/Sound/Players
Source0:        %{name}-%{version}%{codename}.tar.bz2
Source1:        xmms2-client-launcher.sh
Source2:        README.SuSE
Source3:        %name-ripper.1
# Don't add extra CFLAGS, we're smart enough, thanks.
Patch0:         %name-0.7-no-O0.patch
Patch1:         %name-0.7-no-return.patch
Patch2:         %name-0.7-cli-output-verbosity.patch
Patch3:         %name-0.7-escape-minus-signes.patch
Patch4:         %name-0.7-rpath.patch
Patch5:         %name-0.7-silent-launcher.patch
Patch6:         %name-0.7-spelling-error.patch
Patch7:         %name-0.7-fix-typo-in-xmms2-mdns-avahi-manpage.patch
Patch8:         %name-0.7-vorbis-picture-support.patch
Patch9:         %name-0.7-linker-flags.patch
Patch10:        %name-0.7-fix-cast-error.patch
Patch11:        %name-0.7-remove-path_max.patch
%if %{with cunit}
Patch12:        %name-0.7-cunit.patch
%endif
# PATCH-FIX-UPSTREAM xmms2-pkgconfig.patch dimstar@opensuse.org -- pkg-config Version field contains illegal characters.
Patch13:        xmms2-pkgconfig.patch
Patch14:        %name-0.7-fixwarnings.patch
Patch15:        %name-0.7-ld_fix.patch
# PATCH-FIX-OPENSUSE xmms2-disable-parallel-build.patch idoenmez@suse.de -- Disable parallel build
Patch16:        %name-disable-parallel-build.patch
Url:            http://wiki.xmms2.xmms.se/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       %name-plugin-base
BuildRequires:  flac-devel libofa-devel libvorbis-devel speex-devel sqlite-devel
BuildRequires:  libcdio-devel libdiscid-devel libsmbclient-devel wavpack-devel
BuildRequires:  gnome-vfs2-devel jack-audio-connection-kit-devel libmpcdec-devel
BuildRequires:  alsa-lib-devel fftw3-devel libsamplerate-devel libxml2-devel
BuildRequires:  libao-devel libcurl-devel libshout-devel pyrex ruby ruby-devel
BuildRequires:  boost-devel libavahi-glib-devel libpulse-devel perl python-devel
BuildRequires:  avahi-compat-mDNSResponder-devel doxygen libmodplug-devel
BuildRequires:  autoconf automake fdupes gcc gcc-c++ libogg-devel libopenssl-devel make
BuildRequires:  SDL-devel libvisual-devel readline-devel
%ifarch %ix86 x86_64 ppc ppc64
BuildRequires:  valgrind-devel
%endif

%if %{with libsidplay}
%if %suse_version >= 1120
BuildRequires:  sidplay-libs-devel >= 2.0
%else
BuildRequires:  libsidplay-devel >= 2.0
%endif
%endif

%if %{with cunit}
BuildRequires:  cunit-devel
%endif

%if %suse_version >= 1120
%if %{with gme}
BuildRequires:  libgme0-devel
%endif
%endif

%if %{with restricted}
BuildRequires:  libfaad-devel libmms-devel libmpg123-devel
%endif

%description
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).


%package -n libxmmsclient++-glib1
License:        LGPLv2+ and GPLv2+ and BSD
Summary:        Glib c++ client library for %{name}
Group:          Productivity/Multimedia/Sound/Players

%description -n libxmmsclient++-glib1
A simple glib c++ client library for XMMS2

%package -n libxmmsclient++4
License:        LGPLv2+ and GPLv2+ and BSD
Summary:        C++ client library for  %{name}
Group:          Productivity/Multimedia/Sound/Players

%description -n libxmmsclient++4
A simple C++ client library for XMMS2

%package -n libxmmsclient-glib1
License:        LGPLv2+ and GPLv2+ and BSD
Summary:        Glib client library for  %{name}
Group:          Productivity/Multimedia/Sound/Players

%description -n libxmmsclient-glib1
A simple Glib client library for XMMS2

%package -n libxmmsclient6
License:        LGPLv2+ and GPLv2+ and BSD
Summary:        Client library for  %{name}
Group:          Productivity/Multimedia/Sound/Players

%description -n libxmmsclient6
A simple client library for XMMS2

%package devel
License:        LGPLv2+ and GPLv2+ and BSD
Summary:        Development libraries and headers for XMMS2
Group:          Development/Libraries/C and C++
Requires:       glib2-devel
Requires:       boost-devel
Requires:       pkgconfig
Requires:       libxmmsclient6
Requires:       libxmmsclient-glib1
Requires:       libxmmsclient++4
Requires:       libxmmsclient++-glib1
Requires:       %{name} = %{version}

%description devel
Development libraries and headers for XMMS2. You probably need this to develop
or build new plugins for XMMS2.

%package docs
License:        LGPLv2+ and GPLv2+ and BSD
Summary:        Development documentation for XMMS2
Group:          Documentation/Other
Requires:       %{name} = %{version}

%description docs
API documentation for the XMMS2 modular audio framework architecture.

%package -n python-xmms2
License:        LGPLv2+ and GPLv2+ and BSD
Summary:        Python support for XMMS2
Group:          System/Libraries
Requires:       %{name} = %{version}
Requires:       python

%description -n python-xmms2
Python bindings for XMMS2.

%package perl
Summary:        Perl support for XMMS2
License:        GPL+ or Artistic
Group:          System/Libraries
Requires:       %{name} = %{version}
Requires:       perl-base

%description perl
Perl bindings for XMMS2.

%package ruby
License:        GPL+ or Artistic
Summary:        Ruby support for XMMS2
Group:          System/Libraries
Requires:       %{name} = %{version}
Requires:       ruby >= 1.8

%description ruby
Ruby bindings for XMMS2.


%package plugin-base
License:        GPL+ or Artistic
Summary:        Base plugins for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-base
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-airplay
License:        GPL+ or Artistic
Summary:        Airplay Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-airplay
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-ao
License:        GPL+ or Artistic
Summary:        Ao Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-ao
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-apefile
License:        GPL+ or Artistic
Summary:        Apefile Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-apefile
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-asf
License:        GPL+ or Artistic
Summary:        Asf Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-asf
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-asx
License:        GPL+ or Artistic
Summary:        Asx Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-asx
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-cdda
License:        GPL+ or Artistic
Summary:        Cdda Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-cdda
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-cue
License:        GPL+ or Artistic
Summary:        Cue Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-cue
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-curl
License:        GPL+ or Artistic
Summary:        Curl Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-curl
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-daap
License:        GPL+ or Artistic
Summary:        Daap Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-daap 
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-flac
License:        GPL+ or Artistic
Summary:        Flac Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-flac
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-flv
License:        GPL+ or Artistic
Summary:        Flv Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-flv
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-gvfs
License:        GPL+ or Artistic
Summary:        Gvfs Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-gvfs 
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%if %suse_version >= 1120
%if %{with gme}

%package plugin-gme
License:        GPL+ or Artistic
Summary:        Gme Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-gme
XMMS2 is an audio framework, but it is not a general multimedia player - it
will not play videos. It has a modular framework and plugin architecture for
audio processing, visualisation and output, but this framework has not been
designed to support video. Also the client-server design of XMMS2 (and the
daemon being independent of any graphics output) practically prevents direct
video output being implemented. It has support for a wide range of audio
formats, which is expandable via plugins. It includes a basic CLI interface
to the XMMS2 framework, but most users will want to install a graphical XMMS2
client (such as gxmms2 or esperanza).
%endif
%endif

%package plugin-html
License:        GPL+ or Artistic
Summary:        Html Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-html
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-ices
License:        GPL+ or Artistic
Summary:        Ices Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-ices
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-icymetaint
License:        GPL+ or Artistic
Summary:        SDL Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-icymetaint
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-id3v2
License:        GPL+ or Artistic
Summary:        Id3v2 Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-id3v2
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-jack
License:        GPL+ or Artistic
Summary:        Jack Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-jack
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-karaoke
License:        GPL+ or Artistic
Summary:        Karaoke Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-karaoke
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-m3u
License:        GPL+ or Artistic
Summary:        M3u Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-m3u
XMMS2 is an audio framework, but it is not a general multimedia player - it
will not play videos. It has a modular framework and plugin architecture for
audio processing, visualisation and output, but this framework has not been
designed to support video. Also the client-server design of XMMS2 (and the
daemon being independent of any graphics output) practically prevents direct
video output being implemented. It has support for a wide range of audio
formats, which is expandable via plugins. It includes a basic CLI interface
to the XMMS2 framework, but most users will want to install a graphical XMMS2
client (such as gxmms2 or esperanza).

%package plugin-modplug
License:        GPL+ or Artistic
Summary:        Modplug Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-modplug
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-mp4
License:        GPL+ or Artistic
Summary:        Mp4 Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-mp4
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-musepack
License:        GPL+ or Artistic
Summary:        Musepack Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-musepack
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-normalize
License:        GPL+ or Artistic
Summary:        Normalize Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-normalize
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-ofa
License:        GPL+ or Artistic
Summary:        Ofa Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-ofa
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-pulse
License:        GPL+ or Artistic
Summary:        Pulse Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-pulse
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-samba
License:        GPL+ or Artistic
Summary:        Samba Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-samba
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-speex
License:        GPL+ or Artistic
Summary:        Speex Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-speex
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-tta
License:        GPL+ or Artistic
Summary:        Tta Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-tta
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-vocoder
License:        GPL+ or Artistic
Summary:        Vocoder Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-vocoder
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-wave
License:        GPL+ or Artistic
Summary:        Wave Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-wave
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%package plugin-wavpack
License:        GPL+ or Artistic
Summary:        Wavpack Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-wavpack
XMMS2 is an audio framework, but it is not a general multimedia player - it 
will not play videos. It has a modular framework and plugin architecture for 
audio processing, visualisation and output, but this framework has not been 
designed to support video. Also the client-server design of XMMS2 (and the 
daemon being independent of any graphics output) practically prevents direct 
video output being implemented. It has support for a wide range of audio 
formats, which is expandable via plugins. It includes a basic CLI interface 
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
client (such as gxmms2 or esperanza).

%if %{with restricted}

%package plugin-restricted
License:        GPL+ or Artistic
Summary:        Restricted plugins Support for %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description plugin-restricted
XMMS2 is an audio framework, but it is not a general multimedia player - it
will not play videos. It has a modular framework and plugin architecture for
audio processing, visualisation and output, but this framework has not been
designed to support video. Also the client-server design of XMMS2 (and the
daemon being independent of any graphics output) practically prevents direct
video output being implemented. It has support for a wide range of audio
formats, which is expandable via plugins. It includes a basic CLI interface
to the XMMS2 framework, but most users will want to install a graphical XMMS2
client (such as gxmms2 or esperanza).
%endif

%prep
%setup -q -n %{name}-%{version}%{codename}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%if %{with cunit}
%patch12 -p1
%endif
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16

# This header doesn't need to be executable
chmod -x src/include/xmmsclient/xmmsclient++/dict.h
# Clean up paths in wafadmin
WAFADMIN_FILES=`find wafadmin/ -type f`
for i in $WAFADMIN_FILES; do
	sed -i 's|/usr/lib|%{_libdir}|g' $i
done

%build
%__cp %SOURCE2 .
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
./waf configure --prefix=%{_prefix} --libdir=%{_libdir} --with-perl-archdir=%{perl_archlib} --with-pkgconfigdir=%{_libdir}/pkgconfig
./waf build -v %{?_smp_mflags}
# make the docs
doxygen

%install
./waf install --destdir=%{buildroot} --prefix=%{_prefix} --libdir=%{_libdir} --with-ruby-libdir=%{ruby_sitearch} --with-perl-archdir=%{perl_archlib} --with-pkgconfigdir=%{_libdir}/pkgconfig
# Convert to utf-8
for i in %{buildroot}%{_mandir}/man1/*.gz; do
	gunzip $i;
done
for i in %{buildroot}%{_mandir}/man1/*.1 ChangeLog; do
	iconv -o $i.iso88591 -f iso88591 -t utf8 $i
	mv $i.iso88591 $i
done
install -m0755 %SOURCE1 %{buildroot}%{_bindir}

#the libraries are built as 64bit, they are just installed in the wrong dir
%if "%_lib" == "lib64"
%__mv %buildroot/usr/lib/* %buildroot/%_libdir/
%__mv %buildroot/%_libdir/perl* %buildroot/usr/lib/
%endif

%__cp %{SOURCE3} %buildroot/%_mandir/man1/
%fdupes -s %{buildroot}

%clean
rm -rf %{buildroot}

%post -n libxmmsclient++-glib1 -p /sbin/ldconfig

%postun -n libxmmsclient++-glib1 -p /sbin/ldconfig

%post -n libxmmsclient++4 -p /sbin/ldconfig

%postun -n libxmmsclient++4 -p /sbin/ldconfig

%post -n libxmmsclient-glib1 -p /sbin/ldconfig

%postun -n libxmmsclient-glib1 -p /sbin/ldconfig

%post -n libxmmsclient6 -p /sbin/ldconfig

%postun -n libxmmsclient6 -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING COPYING.GPL COPYING.LGPL README TODO README.SuSE
%_bindir/*
%dir %_libdir/%name
%_mandir/man1/*.gz
%_datadir/pixmaps/*
%dir %_datadir/%name
%_datadir/%name/*

%files -n libxmmsclient++-glib1
%defattr(-,root,root,-)
%_libdir/libxmmsclient++-glib.so.1
%_libdir/libxmmsclient++-glib.so.1.0.0

%files -n libxmmsclient++4
%defattr(-,root,root,-)
%_libdir/libxmmsclient++.so.4
%_libdir/libxmmsclient++.so.4.0.0

%files -n libxmmsclient-glib1
%defattr(-,root,root,-)
%_libdir/libxmmsclient-glib.so.1
%_libdir/libxmmsclient-glib.so.1.0.0

%files -n libxmmsclient6
%defattr(-,root,root,-)
%_libdir/libxmmsclient.so.6
%_libdir/libxmmsclient.so.6.0.0

%files devel
%defattr(-,root,root,-)
%dir %_includedir/%name
%_includedir/%name/*
%_libdir/libxmmsclient*.so
%_libdir/pkgconfig/%name-*.pc

%files docs
%defattr(-,root,root,-)
%doc doc/xmms2/html

%files perl
%defattr(-,root,root,-)
%{perl_archlib}/Audio/
%{perl_archlib}/auto/Audio/

%files -n python-xmms2
%defattr(-,root,root,-)
%dir %{python_sitearch}/xmmsclient/
%{python_sitearch}/xmmsclient/*

%files ruby
%defattr(-,root,root,-)
%dir %_ruby_sitedir/xmmsclient
%_ruby_sitedir/*

%files plugin-base
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_alsa.so
%_libdir/xmms2/libxmms_diskwrite.so
%_libdir/xmms2/libxmms_equalizer.so
%_libdir/xmms2/libxmms_file.so
%_libdir/xmms2/libxmms_xml.so
%_libdir/xmms2/libxmms_vorbis.so
%_libdir/xmms2/libxmms_null.so
%_libdir/xmms2/libxmms_nulstripper.so
%_libdir/xmms2/libxmms_oss.so
%_libdir/xmms2/libxmms_pls.so
%_libdir/xmms2/libxmms_replaygain.so
%_libdir/xmms2/libxmms_rss.so
%_libdir/xmms2/libxmms_xspf.so

%files plugin-airplay
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_airplay.so

%files plugin-ao
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_ao.so

%files plugin-apefile
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_apefile.so

%files plugin-asf
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_asf.so

%files plugin-asx
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_asx.so

%files plugin-cdda
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_cdda.so

%files plugin-cue
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_cue.so

%files plugin-curl
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_curl.so

%files plugin-daap
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_daap.so

%files plugin-flac
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_flac.so

%files plugin-flv
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_flv.so

%files plugin-gvfs
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_gvfs.so

%if %suse_version >= 1120
%if %{with gme}

%files plugin-gme
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_gme.so
%endif
%endif

%files plugin-html
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_html.so

%files plugin-ices
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_ices.so

%files plugin-icymetaint
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_icymetaint.so

%files plugin-id3v2
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_id3v2.so

%files plugin-jack
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_jack.so

%files plugin-karaoke
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_karaoke.so

%files plugin-m3u
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_m3u.so

%files plugin-modplug
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_modplug.so

%files plugin-mp4
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_mp4.so

%files plugin-musepack
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_musepack.so

%files plugin-normalize
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_normalize.so

%files plugin-ofa
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_ofa.so

%files plugin-pulse
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_pulse.so

%files plugin-samba
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_samba.so

%files plugin-speex
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_speex.so

%files plugin-tta
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_tta.so

%files plugin-vocoder
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_vocoder.so

%files plugin-wave
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_wave.so

%files plugin-wavpack
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_wavpack.so

%if %{with restricted}

%files plugin-restricted
%defattr(-,root,root,-)
%_libdir/xmms2/libxmms_faad.so
%_libdir/xmms2/libxmms_mms.so
%_libdir/xmms2/libxmms_mpg123.so
%endif

%changelog