File clementine.spec of Package clementine

#
# spec file for package clementine
#
# 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


Name:           clementine
Version:        0.7.3
Release:        3
License:        GPLv3
Summary:        A cross-platform Music Player based on Amarok 1.4
Url:            http://code.google.com/p/clementine-player/
Group:          Productivity/Multimedia/Sound/Players
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gettext-tools
BuildRequires:  glew-devel
#BuildRequires:  gstreamer-0_10-devel
BuildRequires:  libarchive-devel
BuildRequires:  libgpod-devel
# No gnutls means no gloox with license problem (GPLv2 only)
#BuildRequires:  libgnutls-devel
%if 0%{?suse_version} > 1120
BuildRequires:  libimobiledevice-devel
BuildRequires:  libplist-devel
BuildRequires:  libusbmuxd-devel
%endif
BuildRequires:  pkgconfig(gstreamer-0.10)
BuildRequires:  gstreamer-0_10-plugins-base-devel
BuildRequires:  libnotify-devel
BuildRequires:  liblastfm-devel
BuildRequires:  libmtp-devel
BuildRequires:  libqt4-devel
BuildRequires:  libQtWebKit-devel
#BuildRequires:  protobuf-devel
BuildRequires:  libtunepimp-devel
BuildRequires:  libcdio-devel
BuildRequires:  libxine-devel
BuildRequires:  python-qt4
BuildRequires:  python-devel
BuildRequires:  taglib-devel
BuildRequires:  zlib-devel
BuildRequires:  update-desktop-files
BuildRequires:  hicolor-icon-theme
BuildRequires:  help2man
Requires(post): desktop-file-utils
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Clementine is a modern music player and library organiser. Clementine is a
port of Amarok 1.4, with some features rewritten to take advantage of Qt4.

Features:

    * Search and play your local music library
    * Listen to internet radio from Last.fm and SomaFM
    * Edit tags on MP3 and OGG files, organise your music
    * Cross-platform - works on Windows, Mac OS X and Linux
    * Native desktop notifications on Linux (libnotify) and Mac OS X (Growl)


%prep
%setup -q
rm -rf --verbose 3rdparty/gloox
# 3rdparty/qxt

%build
export CXXFLAGS="%{optflags}"
export CFLAGS="$CXXFLAGS"
# Remote control support cannot be enabled without the owner of gloox (http://camaya.net/gloox)
# first giving permission for relicensing to GPLv2 or later. See bnc#695820
mkdir build && cd build
cmake -DCMAKE_VERBOSE_MAKEFILE=ON \
      -DCMAKE_INSTALL_PREFIX=%{_prefix} \
      -DENABLE_REMOTE=off ..
make %{?_smp_mflags}

%install
cd build
%makeinstall
%suse_update_desktop_file -r clementine AudioVideo Player

%if 0%{?suse_version} >= 1140
# Generate man page with help2man
mkdir -p %{buildroot}%{_mandir}/man1
pushd %{buildroot}%{_mandir}/man1
cp -v %{buildroot}%{_bindir}/%{name} ./
help2man \
	--version-string="%{version}" \
	-N -o %{name}.1 ./%{name}
rm %{name}
popd
%endif

%fdupes -s %{buildroot}

%post
update-desktop-database > /dev/null

%postun
update-desktop-database > /dev/null

%files
%defattr(-,root,root)
%doc Changelog COPYING
%{_bindir}/clementine
%{_datadir}/applications/clementine.desktop
%{_datadir}/clementine
%{_datadir}/icons/hicolor/64x64/apps/application-x-clementine.png
%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg
%if 0%{?suse_version} >= 1140
%{_mandir}/man1/%{name}.1.gz
%endif

%changelog
openSUSE Build Service is sponsored by