Blob Blame Raw

%define snap 20110104

Summary: Gstreamer phonon backend 
Name:    phonon-backend-gstreamer
Epoch:   2
Version: 4.4.4
Release: 0.4.%{snap}%{?dist}
Group:   System Environment/Libraries
License: LGPLv2+
URL:     http://phonon.kde.org/
Source0: phonon-gstreamer-%{version}-%{snap}.tar.bz2
# run this script to generate a snapshot tarball
Source1: phonon-gstreamer_snapshot.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

## Mandriva/upstreamable patches
Patch52: phonon-4.3.50-gstreamer-fix-seekable-query-failed.patch

## Ubuntu/upstreamable patches
Patch60: phonon-4.4.3-flac_mimetype.patch

## Upstream patches

BuildRequires: automoc4
BuildRequires: cmake
BuildRequires: gstreamer-devel
BuildRequires: gstreamer-plugins-base-devel
BuildRequires: phonon-devel >= 4.4.4

%global phonon_version %(pkg-config --modversion phonon 2>/dev/null || echo 4.4.4)

Provides: phonon-backend%{?_isa} = %{phonon_version}

Obsoletes: phonon-backend-gst < 4.2.0-4
Provides:  phonon-backend-gst = %{version}-%{release}

Obsoletes: phonon-gstreamer < 4.4.4-0.2
Provides:  phonon-gstreamer = %{version}-%{release}

Requires: gstreamer-plugins-good
# not *strictly* required, but strongly recommended by upstream when built
# with USE_INSTALL_PLUGIN
Requires: PackageKit-gstreamer-plugin
Requires: phonon%{?_isa} => %{phonon_version}
Requires: qt4%{?_isa} >= %{_qt4_version}

%description
%{summary}.


%prep
%setup -q -n phonon-gstreamer-%{version}

%patch52 -p1 -b .gstreamer-fix-seekable-query-failed
%patch60 -p1 -b .flac_mimetype


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} \
  -DUSE_INSTALL_PLUGIN:BOOL=ON \
  ..
popd

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


%install
rm -rf %{buildroot}

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


%clean
rm -rf %{buildroot}


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

%postun
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 COPYING.LIB
%{_kde4_libdir}/kde4/plugins/phonon_backend/phonon_gstreamer.so
%{_kde4_datadir}/kde4/services/phononbackends/gstreamer.desktop
%{_datadir}/icons/hicolor/*/apps/phonon-gstreamer.*



%changelog
* Fri Jan 07 2011 Rex Dieter <rdieter@fedoraproject.org> - 2:4.4.4-0.4.20110104
- Requires: PackageKit-gstreamer-plugin , avoids potential crashers elsewhere 
  when built with USE_INSTALL_PLUGIN (kde#262308)

* Wed Jan 05 2011 Rex Dieter <rdieter@fedoraproject.org> - 2:4.4.4-0.3.20110104
- %%doc COPYING.LIB
- add comment on pnonon-gstreamer_snapshot.sh usage

* Wed Jan 05 2011 Rex Dieter <rdieter@fedoraproject.org> - 2:4.4.4-0.2.20110104
- phonon-backend-gstreamer

* Tue Jan 04 2011 Rex Dieter <rdieter@fedoraproject.org> - 4.4.4-0.1.20110104
- phonon-gstreamer-4.4.4-20110104 snapshot