File banshee-1.spec of Package banshee-1

#
# spec file for package banshee-1 (Version 1.5.1)
#
# Copyright (c) 2009 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


Name:           banshee-1
Version:        1.5.1
Release:        1.<RELEASE1>
License:        MIT License (or similar)
Summary:        A media playback and management application
Group:          Productivity/Multimedia/Sound/Players
Url:            http://banshee-project.org/
Source0:        %{name}-%{version}.tar.bz2
Source1:        bundleize-pkg-config.awk
PreReq:         filesystem gconf2
ExcludeArch:    s390 s390x
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  intltool perl-XML-Parser update-desktop-files
BuildRequires:  gnome-desktop-devel gnome-vfs2-devel
BuildRequires:  gstreamer010-plugins-base-devel
BuildRequires:  sqlite-devel >= 3.4
BuildRequires:  gconf-sharp2 glade-sharp2 gtk-sharp2
BuildRequires:  mono-data-sqlite mono-devel mono-zeroconf-devel
BuildRequires:  taglib-sharp-devel
BuildRequires:  ndesk-dbus ndesk-dbus-glib-devel
BuildRequires:  ipod-sharp-devel libmtp-devel
%if %suse_version > 1100
%define have_boo 1
BuildRequires:  boo-devel >= 0.8.1
%endif
%define upstream_project 0
%if %(echo '%distribution' | grep -Ec '^home:.+:Banshee.*/|^Banshee')
%define upstream_project 1
%endif
# FIXME: is this needed at all anymore with 11.2?
%if %upstream_project == 1
BuildRequires:  mono-addins >= 0.4
%else
BuildRequires:  mono-addins
%endif
Requires:       gstreamer010-plugins-good
Requires:       ndesk-dbus >= 0.5 ndesk-dbus-glib >= 0.3
Requires:       %{name}-lang = %{version}
Requires:       %{name}-core = %{version}
Requires:       %{name}-client = %{version}
Requires:       %{name}-backend-engine-gstreamer = %{version}
Requires:       %{name}-backend-platform-unix = %{version}
Recommends:     %{name}-backend-platform-gnome = %{version}
Recommends:     %{name}-client-classic = %{version}
Recommends:     %{name}-extensions-default = %{version}
Recommends:     %{name}-dap = %{version}
Recommends:     %{name}-dap-mtp = %{version}
Recommends:     %{name}-dap-ipod = %{version}
Obsoletes:      banshee helix-banshee
Provides:       banshee = %{version} helix-banshee = %{version}

%description
Import, organize, and discover new music with Banshee through its
simple and powerful interface and wide array of innovative features.
Create your own radio stations or listen to a friends' through Last.fm
integration; experience automatic cover art fetching as you listen; and
easily browse, search, and control your media collection.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files
%defattr(-,root,root)
%doc NEWS COPYING AUTHORS README

%package devel
License:        MIT License (or similar)
Summary:        Development package for Banshee
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       gstreamer010-devel gstreamer010-plugins-base-devel gnome-vfs2-devel gtk2-devel 
Requires:       glib-sharp2 gtk-sharp2 gconf-sharp2
Requires:       ndesk-dbus ndesk-dbus-glib-devel
%if %upstream_project == 0
Requires:       taglib-sharp mono-addins
%endif

%description devel
Users who wish to extend Banshee should install this package. It
includes standard Linux development files and other tools for building
extensions and applications on top of the Banshee core application
framework.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files devel
%defattr(-,root,root)
%{_libdir}/banshee-1/gconf-schema-extractor.exe
%{_libdir}/pkgconfig/banshee-1-*.pc
%exclude %{_libdir}/banshee-1/libbanshee.*a
%exclude %{_libdir}/banshee-1/gstreamer-0.10/libgstequalizer.*a

%package core
License:        MIT License (or similar)
Summary:        Core Banshee platform libraries, services, and resources
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description core
This package provides core libraries, services, and resources for
building Banshee clients and user experiences.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files core
%defattr(-,root,root)
%dir %{_libdir}/banshee-1
%dir %{_libdir}/banshee-1/Extensions
%dir %{_libdir}/banshee-1/Backends
%dir %{_libdir}/banshee-1/gstreamer-0.10
%dir %{_datadir}/banshee-1
%dir %{_datadir}/banshee-1/audio-profiles
%dir %{_datadir}/banshee-1/icons
%dir %{_datadir}/banshee-1/icons/hicolor
%dir %{_datadir}/banshee-1/icons/hicolor/*
%dir %{_datadir}/banshee-1/icons/hicolor/*/*
%{_libdir}/banshee-1/Mono.Data.Sqlite.dll*
%{_libdir}/banshee-1/Hyena.dll*
%{_libdir}/banshee-1/Hyena.Gui.dll*
%{_libdir}/banshee-1/Migo.dll*
%{_libdir}/banshee-1/MusicBrainz.dll*
%{_libdir}/banshee-1/Mono.Media.dll*
%{_libdir}/banshee-1/Lastfm.dll*
%{_libdir}/banshee-1/Lastfm.Gui.dll*
%{_libdir}/banshee-1/Banshee.Core.dll*
%{_libdir}/banshee-1/Banshee.Services.dll*
%{_libdir}/banshee-1/Banshee.Services.addins
%{_libdir}/banshee-1/Banshee.Widgets.dll*
%{_libdir}/banshee-1/Banshee.ThickClient.dll*
%{_libdir}/banshee-1/Banshee.CollectionIndexer.dll*
%{_libdir}/banshee-1/Banshee.exe*
%{_libdir}/banshee-1/Halie.exe*
%{_libdir}/banshee-1/Beroe.exe*
%{_datadir}/dbus-1/services/org.bansheeproject.Banshee.service
%{_datadir}/dbus-1/services/org.bansheeproject.CollectionIndexer.service
%{_datadir}/banshee-1/icons/hicolor/*/categories/source-playlist.png
%{_datadir}/banshee-1/icons/hicolor/*/categories/source-smart-playlist.png
%{_datadir}/banshee-1/icons/hicolor/*/actions/media-repeat-all.png
%{_datadir}/banshee-1/icons/hicolor/*/actions/media-repeat-none.png
%{_datadir}/banshee-1/icons/hicolor/*/actions/media-repeat-single.png
%{_datadir}/banshee-1/icons/hicolor/*/actions/encode.png
%{_datadir}/banshee-1/icons/hicolor/*/emblems//creative-commons*.png
%{_datadir}/icons/hicolor/16x16/apps/media-player-banshee.png
%{_datadir}/icons/hicolor/22x22/apps/media-player-banshee.png
%{_datadir}/icons/hicolor/24x24/apps/media-player-banshee.png
%{_datadir}/icons/hicolor/32x32/apps/media-player-banshee.png
%{_datadir}/icons/hicolor/48x48/apps/media-player-banshee.png
%{_datadir}/icons/hicolor/192x192/apps/media-player-banshee.png
%if %upstream_project == 1
%{_libdir}/banshee-1/taglib-sharp.dll*
%{_libdir}/banshee-1/Mono.Addins*.dll*
%endif

%package backend-engine-gstreamer
License:        MIT License (or similar)
Summary:        GStreamer engine support for Banshee
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description backend-engine-gstreamer
This package provides the playback engine used by Banshee, built on the
GStreamer multimedia framework.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files backend-engine-gstreamer
%defattr(-,root,root)
%{_libdir}/banshee-1/libbanshee.so
%{_libdir}/banshee-1/gstreamer-0.10/libgstequalizer.so
%{_libdir}/banshee-1/Backends/Banshee.GStreamer.dll*
%{_datadir}/banshee-1/audio-profiles/*.xml

%package backend-platform-unix
License:        MIT License (or similar)
Summary:        UNIX platform support for Banshee
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description backend-platform-unix
This package provides many optimizations for UNIX based platforms. In
particular, it provides a POSIX IO layer that performs better than the
default System.IO/.NET IO layer provided in the base banshee-1 package.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files backend-platform-unix
%defattr(-,root,root)
%{_libdir}/banshee-1/Backends/Banshee.Unix.dll*
%{_libdir}/banshee-1/Backends/Banshee.Hal.dll*

%package backend-platform-gnome
License:        MIT License (or similar)
Summary:        GNOME platform support for Banshee
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}
Requires:       %{name}-backend-platform-unix = %{version}

%description backend-platform-gnome
This package provides platform integration with the GNOME Desktop for
Banshee. Most notably it provides a configuration backend to GConf, so
all user settings can be stored there. Other GNOME specific integration
hooks are provided as well.

Users running Banshee on GNOME are recommended to install this package.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files backend-platform-gnome
%defattr(-,root,root)
%{_libdir}/banshee-1/Backends/Banshee.Gnome.dll*
%{_libdir}/banshee-1/Backends/Banshee.NowPlaying.X11.dll*
%{_libdir}/banshee-1/Backends/libbnpx11.so
%{_datadir}/banshee-1/icons/hicolor/*/actions/media-write-cd.png
%exclude %{_libdir}/banshee-1/Backends/libbnpx11.*a

%package client-classic
License:        MIT License (or similar)
Summary:        Banshee client providing the classic interface
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}
Provides:       %{name}-client = %{version}

%description client-classic
The Classic Banshee client provides a familiar user interface with a
source list and three-pane layout for browsing and exploring media.
This client is the most feature rich, but does not sacrifice usability.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files client-classic
%defattr(-,root,root)
%{_prefix}/bin/banshee-1
%{_datadir}/applications/banshee-1*.desktop
%{_libdir}/banshee-1/Nereid.exe*

%package client-muinshee
License:        MIT License (or similar)
Summary:        Banshee client modeled after the Muine music player interface
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}
Provides:       %{name}-client = %{version}

%description client-muinshee
The Muinshee Banshee client provides a user interface modeled directly
after the old GNOME Muine media player.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files client-muinshee
%defattr(-,root,root)
%{_prefix}/bin/muinshee
%{_libdir}/banshee-1/Muinshee.exe*

%package extensions-default
License:        MIT License (or similar)
Summary:        Extra features extending the Banshee Media Player
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description extensions-default
This package provides a number of useful features for Banshee,
including a Play Queue, Last.fm streaming, Last.fm Audioscrobbling, and
Multimedia Key support. This package is highly recommended as it
greatly enhances the end user experience of Banshee.

Import, organize, and discover new music with Banshee through its
simple and powerful interface and wide array of innovative features.
Create your own radio stations or listen to a friends' through Last.fm
integration; experience automatic cover art fetching as you listen; and
easily browse, search, and control your media collection.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files extensions-default
%defattr(-,root,root)
%{_libdir}/banshee-1/Extensions/Banshee.InternetRadio.dll*
%{_libdir}/banshee-1/Extensions/Banshee.Daap.dll*
%{_libdir}/banshee-1/Extensions/Banshee.Bookmarks.dll*
%{_libdir}/banshee-1/Extensions/Banshee.CoverArt.dll*
%{_libdir}/banshee-1/Extensions/Banshee.FileSystemQueue.dll*
%{_libdir}/banshee-1/Extensions/Banshee.Lastfm.dll*
%{_libdir}/banshee-1/Extensions/Banshee.MultimediaKeys.dll*
%{_libdir}/banshee-1/Extensions/Banshee.NotificationArea.dll*
%{_libdir}/banshee-1/Extensions/Banshee.PlayQueue.dll*
%{_libdir}/banshee-1/Extensions/Banshee.NowPlaying.dll*
%{_libdir}/banshee-1/Extensions/Banshee.AudioCd.dll*
%{_libdir}/banshee-1/Extensions/Banshee.Podcasting.dll*
%{_libdir}/banshee-1/Extensions/Banshee.MiniMode.dll*
%{_libdir}/banshee-1/Extensions/Banshee.Bpm.dll*
%{_libdir}/banshee-1/Extensions/Banshee.PlayerMigration.dll*
%{_datadir}/banshee-1/icons/hicolor/*/categories/lastfm-*.png
%{_datadir}/banshee-1/icons/hicolor/*/categories/podcast*.png
%{_datadir}/banshee-1/icons/hicolor/*/categories/radio.*
%{_datadir}/banshee-1/icons/hicolor/*/categories/amazon-mp3-source.*
%{_datadir}/banshee-1/icons/hicolor/*/status/podcast*.png
%{_datadir}/banshee-1/icons/hicolor/*/actions/media-import-audio-cd.png
%if 0%{?have_boo}

%package extensions-boo
License:        MIT License (or similar)
Summary:        Boo scripting support for Banshee
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description extensions-boo
This package provides the Boo scripting extension, useful for power
users and developers looking to customize and extend the functionality
of Banshee using Boo, the Python-like language for .NET.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files extensions-boo
%defattr(-,root,root)
%{_libdir}/banshee-1/Extensions/Banshee.BooScript.dll*
%endif

%package dmp
License:        MIT License (or similar)
Summary:        Digital Media Player support for Banshee
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}

%description dmp
Core support for Digital Media Player support. Includes generic
USB mass storage device support.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files dmp
%defattr(-,root,root)
%{_libdir}/banshee-1/Extensions/Banshee.Dap.dll*
%{_libdir}/banshee-1/Extensions/Banshee.Dap.MassStorage.dll*
%{_datadir}/banshee-1/icons/hicolor/*/devices/phone-*

%package dmp-ipod
License:        MIT License (or similar)
Summary:        Apple(R) iPod(R) Digital Media Player support for Banshee
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}
Requires:       %{name}-dmp = %{version}
Requires:       podsleuth

%description dmp-ipod
Support for iPod(R) devices including the iPod Classic(R) and iPod Nano(R).
Does not support iPod Touch(R) or iPhone(R).



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files dmp-ipod
%defattr(-,root,root)
%{_libdir}/banshee-1/Extensions/Banshee.Dap.Ipod.dll*
%{_libdir}/banshee-1/Extensions/ipod-sharp*dll*
%{_datadir}/banshee-1/icons/hicolor/*/devices/multimedia-player-ipod-*

%package dmp-mtp
License:        MIT License (or similar)
Summary:        MTP/PlaysForSure Digital Media Player support for Banshee
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name} = %{version}
Requires:       %{name}-dmp = %{version}

%description dmp-mtp
Support for various MTP/PlaysForSure/Certified For Windows Vista(R)
devices as provided by libmtp.



Authors:
--------
    Aaron Bockover <abock@gnome.org>
    Gabriel Burt <gabriel.burt@gmail.com>
    Scott Peterson <lunchtimemama@gmail.com>

%files dmp-mtp
%defattr(-,root,root)
%{_libdir}/banshee-1/Mtp.dll*
%{_libdir}/banshee-1/Extensions/Banshee.Dap.Mtp.dll*
%lang_package

%files lang -f %{name}.lang

%prep
%setup -q
# update pkg-config files for the -devel package since we internalize
# some BuildRequires in cases where we will upgrade a package that 
# might also be provided by the distro (e.g. taglib-sharp)
%if %upstream_project == 1
pushd $RPM_BUILD_DIR/%{name}-%{version}/build/pkg-config
for pkg_config in *.pc.in; do
	awk -f %{S:1} < $pkg_config > ${pkg_config}.in
	mv ${pkg_config}.in $pkg_config
done
popd
%endif

%build
%{?env_options}
%configure \
	--with-vendor-build-id="%distribution" \
%if !0%{?have_boo}
	--disable-boo \
%endif
	--disable-docs
%{__make} %{?jobs:-j%jobs}

%install
%makeinstall
%find_lang %{name}
chmod -x $RPM_BUILD_ROOT%{_libdir}/banshee-1/*.config
chmod -x $RPM_BUILD_ROOT%{_libdir}/banshee-1/*/*.config
%suse_update_desktop_file -r -N "Banshee" -G "Media Player" %{name} GNOME Player AudioVideo X-Ximian-Main X-Red-Hat-Base
%suse_update_desktop_file %{name}-audiocd
%suse_update_desktop_file %{name}-media-player
# If we are building for upstream, we want to bundle libraries that
# we might want to differ from the downstream distribution
%if %upstream_project == 1
for package in taglib-sharp mono-addins; do
	for assembly in $(find %{_prefix}/lib/mono/${package}/ -name \*.dll); do
		cp $(dirname $(readlink -e $assembly))/* $RPM_BUILD_ROOT%{_libdir}/banshee-1
	done
done
%endif

%clean
rm -rf "$RPM_BUILD_ROOT"

%changelog
openSUSE Build Service is sponsored by