Blob Blame History Raw
Name:           clementine
Version:        0.7
Release:        1%{?dist}
Summary:        A music player and library organizer

Group:          Applications/Multimedia
License:        GPLv3+ and GPLv2+
URL:            http://code.google.com/p/clementine-player
Source0:        http://clementine-player.googlecode.com/files/%{name}-%{version}.tar.gz
# Use system gmock. Patch accepted by upstream
# http://code.google.com/p/clementine-player/issues/detail?id=1653
Patch0:         clementine-gmock-system.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  desktop-file-utils
BuildRequires:  gettext
BuildRequires:  gmock-devel
BuildRequires:  gstreamer-devel
BuildRequires:  gtest-devel
BuildRequires:  libechonest-devel
%ifnarch s390 s390x
BuildRequires:  libgpod-devel
BuildRequires:  libimobiledevice-devel
%endif
BuildRequires:  liblastfm-devel
BuildRequires:  libmtp-devel 
BuildRequires:  libnotify-devel
BuildRequires:  libplist-devel 
BuildRequires:  libprojectM-devel >= 2.0.1-7
BuildRequires:  libqxt-devel
BuildRequires:  notification-daemon
BuildRequires:  qt4-devel
BuildRequires:  qtiocompressor-devel
BuildRequires:  qtsinglecoreapplication-devel
BuildRequires:  qtsingleapplication-devel >= 2.6.1-2
BuildRequires:  sqlite-devel
BuildRequires:  taglib-devel

BuildRequires(check): xorg-x11-server-Xvfb
BuildRequires(check): xorg-x11-xauth

Requires:       hicolor-icon-theme
Requires:       libprojectM >= 2.0.1-7
Requires:       qtsingleapplication >= 2.6.1-2

%description
Clementine is a multiplatform music player. It is inspired by Amarok 1.4,
focusing on a fast and easy-to-use interface for searching and playing your
music.

%prep
%setup -q
%patch0 -p1 -b .gmock

# Remove all 3rdparty libraries exceph universalchardet
# as it is not available as a separate library.
mv 3rdparty/universalchardet/ .
rm -fr 3rdparty/*
mv universalchardet/ 3rdparty/

# Can't run all the unit tests
#   songloader requires internet connection
#   mpris1 requires a dbus session
for test in mpris1 songloader; do
    sed -i -e "/${test}_test/d" tests/CMakeLists.txt
done

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
    %{cmake} \
        -DUSE_SYSTEM_QTSINGLEAPPLICATION=1 \
        -DUSE_SYSTEM_PROJECTM=1 \
        -DUSE_SYSTEM_QXT=1 \
        -DSTATIC_SQLITE=0 \
        .. 

    # Parallel build fails sometimes
    make VERBOSE=1
popd

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} -C %{_target_platform}


%check
pushd %{_target_platform}
    # Run a fake X session since some tests check for X
    xvfb-run -a -n 10 make test
popd
desktop-file-validate \
    %{buildroot}%{_datadir}/applications/%{name}.desktop

%clean
rm -rf %{buildroot}

%post
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
update-desktop-database &> /dev/null || :
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files
%defattr(-,root,root,-)
%doc Changelog COPYING TODO
%{_bindir}/clementine
%{_datadir}/applications/clementine.desktop
%{_datadir}/icons/hicolor/64x64/apps/application-x-clementine.png
%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg


%changelog
* Wed Mar 30 2011 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.7-1
- New upstream version
- Drop all upstreamed patches

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Dec 27 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.6-2
- Rebuilt against new libimobiledevice on F-15

* Thu Dec 23 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.6-1
- New upstream version

* Thu Oct 14 2010 Dan HorĂ¡k <dan[at]danny.cz> - 0.5.3-2
- Update BRs for s390(x)

* Wed Sep 29 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.5.3-1
- New upstream version

* Sun Sep 26 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.5.2-1
- New upstream version

* Wed Sep 22 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.5.1-1
- New upstream version
- Drop all upstreamed patches

* Sun Aug 08 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.4.2-9
- Only create the OpenGL graphics context when you first open the visualisations
  window. Fixes RHBZ#621913

* Fri Aug 06 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.4.2-8
- Enforce Fedora compilation flags

* Thu Aug 05 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.4.2-7
- Fix crash on lastfm tree RHBZ#618474

* Tue Jul 27 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.4.2-6
- Rebuild against new boost on F-14

* Fri Jul 23 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.4.2-5
- Add missing scriptlets

* Wed Jul 21 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.4.2-4
- Use: make VERBOSE=1
- License is GPLv3+ and GPLv2+
- Put BRs in alphabetical order
- Remove redundant BRs: glew-devel, xine-lib-devel, and
  the extra libprojectM-devel
- Add R: hicolor-icon-theme

* Sun Jul 18 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.4.2-3
- Better qxt split patch

* Sat Jul 17 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.4.2-2
- Fix font paths issue, which caused a segfault on visualizations

* Sat Jul 17 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.4.2-1
- Version 0.4.2

* Fri May 07 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.3-1
- Version 0.3

* Sat Apr 17 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.2-2
- Patch out the external libraries
- Build the libclementine_lib into the final executable

* Sat Mar 27 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.2-1
- Fedorized the upstream specfile

* Mon Mar 22 2010 David Sansome <me@davidsansome.com> - 0.2
- Version 0.2

* Sun Feb 21 2010 David Sansome <me@davidsansome.com> - 0.1-5
- Various last-minute bugfixes

* Sun Jan 17 2010 David Sansome <me@davidsansome.com> - 0.1-1
- Initial package