Blob Blame History Raw

# define to enable kde integration
%define kde 1

Summary: Client for the Music Player Daemon (MPD)
Name:    cantata
Version: 0.9.2
Release: 1%{?dist}

License: GPLv2+
#URL:    http://kde-apps.org/content/show.php/Cantata?content=147733
URL:     http://code.google.com/p/cantata/
Source0: http://cantata.googlecode.com/files/cantata-%{version}.tar.bz2

## upstreamable patches
# s|^#!/usr/bin/env perl|#!/usr/bin/perl|
Patch101: cantata-0.9.1-perl_env.patch
# fix wierd build failure
Patch102: cantata-0.9.1-fix_build.patch

BuildRequires: gettext
BuildRequires: kdelibs4-devel
BuildRequires: pkgconfig(taglib)
BuildRequires: pkgconfig(taglib-extras)
BuildRequires: pkgconfig(libmtp)
BuildRequires: pkgconfig(phonon)
BuildRequires: pkgconfig(QtWebKit)

%description
Cantata is a (yet another!) client for the music player daemon (MPD). 


%prep
%setup -q

%patch101 -p1 -b .perl_env
%patch102 -p1 -b .fix_build

# nuke bundled qtsingleapplication, not used
rm -rfv qtsingleapplication/


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_kde4} \
  -DENABLE_KDE:BOOL=%{?kde:ON}%{!?kde:OFF} \
  -DENABLE_FFMPEG:BOOL=OFF \
  -DENABLE_MPG123:BOOL=OFF \
  -DENABLE_PHONON:BOOL=ON \
  -DENABLE_WEBKIT:BOOL=ON \
  ..
popd

make %{?_smp_mflags} -C %{_target_platform}


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}

%find_lang cantata %{!?kde:--with-qt} %{?kde:--with-kde} --all-name || touch %%{name}.lang


%check
desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/%{?kde:kde4}/cantata.desktop


%post
touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :

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

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

%files -f cantata.lang
%doc LICENSE
%doc AUTHORS ChangeLog README TODO
%{_kde4_bindir}/cantata
# FIXME: create/ship systemd init script
%{_kde4_bindir}/cantata-dynamic
%{_kde4_datadir}/applications/%{?kde:kde4}/cantata.desktop
%{?kde:%{_kde4_appsdir}/cantata/}
%{_kde4_iconsdir}/hicolor/*/*/*


%changelog
* Mon Jan 28 2013 Rex Dieter <rdieter@fedoraproject.org> 0.9.2-1
- 0.9.2

* Sat Jan 05 2013 Rex Dieter <rdieter@fedoraproject.org> 0.9.1-1
- cantata-0.9.1

* Wed Nov 28 2012 Rex Dieter <rdieter@fedoraproject.org> 0.8.3.1-2
- patch s|^#!/usr/bin/env perl|#!/usr/bin/perl|

* Tue Sep 25 2012 Rex Dieter <rdieter@fedoraproject.org> 0.8.3.1-1
- cantata-0.8.3.1
- run desktop-file-validate
- add icon scriptlets
- drop Requires: mpd
- %%doc LICENSE AUTHORS ChangeLog README TODO
- omit and explicitly disable ffmpeg, mpg123 support

* Thu Aug 02 2012 Rex Dieter <rdieter@fedoraproject.org> 0.8.2-1
- first try