Blob Blame History Raw

Summary: Multimedia framework api
Name:    phonon
Version: 4.4.1
Release: 2%{?dist}
Group:   System Environment/Libraries
License: LGPLv2+
URL:     http://phonon.kde.org/
Source0: ftp://ftp.kde.org/pub/kde/stable/phonon/%{version}/phonon-%{version}.tar.bz2
## FIXME: update to point to http://gitorious.org/phonon
Source1: phonon_snapshot.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg
Source11: hi16-phonon-gstreamer.png
Source12: hi22-phonon-gstreamer.png
Source13: hi32-phonon-gstreamer.png
Source14: hi48-phonon-gstreamer.png
Source15: hi64-phonon-gstreamer.png
Source16: hi128-phonon-gstreamer.png

## Mandriva/upstreamable patches
Patch52: phonon-4.3.50-gstreamer-fix-seekable-query-failed.patch
Patch53: phonon-4.3.50-phonon-allow-stop-empty-source.patch

## Upstream patches
#  phonon-backend-xine-4.4.1 (with pulseaudio) = no audio, http://bugs.kde.org/235193
Patch100: phonon-4.4.1-kde235193.patch

BuildRequires: automoc4 >= 0.9.86
BuildRequires: cmake >= 2.6.0
BuildRequires: glib2-devel
BuildRequires: gstreamer-devel
BuildRequires: gstreamer-plugins-base-devel
BuildRequires: kde-filesystem
BuildRequires: libxcb-devel
BuildRequires: libxml2-devel
BuildRequires: pkgconfig
BuildRequires: qt4-devel
BuildRequires: xine-lib-devel
BuildRequires: pulseaudio-libs-devel >= 0.9.15

%global pulseaudio_version %(pkg-config --modversion libpulse 2>/dev/null || echo 0.9.15)

Requires: phonon-backend%{?_isa} => %{version}
Requires: pulseaudio-libs%{?_isa} >= %{pulseaudio_version}
Requires: qt4%{?_isa} >= %{_qt4_version}

%description
%{summary}.

%package devel
Summary: Developer files for %{name}
Group:   Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: qt4-devel
Requires: pkgconfig
%description devel
%{summary}.

%package backend-xine
Summary: xine phonon backend
Group:   Applications/Multimedia
Requires: %{name} = %{version}-%{release}
Provides: phonon-backend%{?_isa} = %{version}-%{release}
%description backend-xine
%{summary}.

%package backend-gstreamer
Summary: Gstreamer phonon backend
Group:   Applications/Multimedia
Epoch:   2
Requires: %{name} = %{version}-%{release}
Requires: gstreamer-plugins-good
Provides: phonon-backend%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-backend-gst < 4.2.0-4
Provides:  %{name}-backend-gst = %{version}-%{release}
%description backend-gstreamer
%{summary}.


%prep
%setup -q 

%patch52 -p1 -b .gstreamer-fix-seekable-query-failed
%patch53 -p1 -b .phonon-allow-stop-empty-source

%patch100 -p1 -b .kde235193


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} \
  %{?_cmake_skip_rpath} \
  -DUSE_INSTALL_PLUGIN=TRUE \
  ..
popd

make %{?_smp_mflags} -C %{_target_platform}%{?xine_only:/xine}


%install
rm -rf %{buildroot}

make install/fast DESTDIR=%{buildroot} -C %{_target_platform}%{?xine_only:/xine}

# symlink for qt/phonon compatibility
ln -s ../KDE/Phonon %{buildroot}%{_includedir}/phonon/Phonon

# move the oxygen-only phonon-xine icons to hicolor
mv %{buildroot}%{_datadir}/icons/oxygen \
   %{buildroot}%{_datadir}/icons/hicolor

%if ! 0%{?xine_only}
# gstreamer icons
install -D -m 0644 %{SOURCE10} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/phonon-gstreamer.svg
install -D -m 0644 %{SOURCE11} %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/phonon-gstreamer.png
install -D -m 0644 %{SOURCE12} %{buildroot}%{_datadir}/icons/hicolor/22x22/apps/phonon-gstreamer.png
install -D -m 0644 %{SOURCE13} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/phonon-gstreamer.png
install -D -m 0644 %{SOURCE14} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/phonon-gstreamer.png
install -D -m 0644 %{SOURCE15} %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/phonon-gstreamer.png
install -D -m 0644 %{SOURCE16} %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/phonon-gstreamer.png
%endif


%clean
rm -rf %{buildroot}


%if ! 0%{?xine_only}
%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

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

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

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

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

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

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

%if ! 0%{?xine_only}
%files
%defattr(-,root,root,-)
%doc COPYING.LIB
%{_libdir}/libphonon*.so.4*
%{_datadir}/dbus-1/interfaces/org.kde.Phonon.AudioOutput.xml
# kde4-specific dirs
%dir %{_kde4_libdir}/kde4/plugins/phonon_backend/
%dir %{_kde4_datadir}/kde4/services/phononbackends/

%files devel
%defattr(-,root,root,-)
%dir %{_includedir}/KDE
%{_includedir}/KDE/Phonon/
%{_includedir}/phonon/
%{_libdir}/pkgconfig/phonon.pc
%{_libdir}/libphonon*.so

%files backend-gstreamer
%defattr(-,root,root,-)
%{_kde4_libdir}/kde4/plugins/phonon_backend/phonon_gstreamer.so
%{_kde4_datadir}/kde4/services/phononbackends/gstreamer.desktop
%{_datadir}/icons/hicolor/*/apps/phonon-gstreamer.*
%endif

%files backend-xine
%defattr(-,root,root,-)
%{_kde4_libdir}/kde4/plugins/phonon_backend/phonon_xine.so
%{_kde4_datadir}/kde4/services/phononbackends/xine.desktop
%{_datadir}/icons/hicolor/*/apps/phonon-xine.*


%changelog
* Sat Apr 24 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.1-2
- phonon-backend-xine-4.4.1 (with pulseaudio) = no audio (kde#235193)

* Thu Apr 22 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.1-1
- phonon-4.4.1

* Thu Apr 01 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.0-3
- add minimal pulseaudio runtime dep

* Wed Mar 17 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.0-2
- pa glib/qt eventloop patch (kde#228324)

* Tue Mar 16 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.0-1
- phonon-4.4.0 final

* Fri Mar 12 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.0-0.3
- phonon-4.3.80-pulse-devicemove-rejig.patch (from mdv)

* Wed Feb 24 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.0-0.2
- preliminary phonon-4.4.0 tarball

* Fri Jan 22 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.80-6
- sync w/mdv patches

* Fri Jan 22 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.80-5.2
- F11: patch/modularize pa device-manager bits 

* Fri Jan 22 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.3.80-5.1
- F11: port the old PA device priorities patch as we don't have PA integration

* Thu Jan 21 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.80-5
- no sound with phonon-xine/pulseaudio (kde#223662, rh#553945)

* Thu Jan 21 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.80-4
- snarf mdv patches

* Mon Jan 18 2010 Than Ngo <than@redhat.com> - 4.3.80-3
- backport GStreamer backend bugfixes, fix random disappearing sound under KDE

* Thu Dec 03 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.80-2
- phonon-4.3.80 (upstream tarball, yes getting ridiculous now)

* Thu Dec 03 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.80-1.20091203
- phonon-4.3.80 (20091203 snapshot)

* Thu Dec 03 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.50-6.20091203
- phonon-4.3.50 (20091203 snapshot)

* Mon Nov 30 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.50-5.20091124
- backend-gstreamer: Requires: gstreamer-plugins-good

* Fri Nov 27 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.50-4.20091124
- ln -s ../KDE/Phonon %%_includedir/phonon/Phonon (qt/phonon compat)

* Wed Nov 18 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.50-3.20091124
- phonon-4.3.50 (20091124 snapshot)
- enable pulseaudio integration (F-12+)

* Wed Nov 18 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.50-2.20091118
- phonon-4.3.50 (20091118 snapshot)

* Mon Oct 19 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.50-1.20091019
- phonon-4.3.50 (20091019 snapshot)

* Sat Oct 03 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.1-102
- Requires: qt4 >= 4.5.2-21 (f12+)

* Tue Sep 29 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.1-101
- revert to kde/phonon
- inflate to Release: 101
- -backend-gstreamer: Epoch: 2

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jun 18 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.1-11
- fix for '#' in filenames

* Tue Jun 09 2009 Than Ngo <than@redhat.com> - 4.3.1-10
- make InitialPreference=9

* Sun Jun 07 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.1-9
- optimize scriptlets
- Req: phonon >= %%phonon_version_major

* Fri Jun 05 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.3.1-8
- restore patches to the xine backend

* Fri Jun 05 2009 Than Ngo <than@redhat.com> - 4.3.1-7
- only xine-backend

* Wed May 20 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.1-6
- phonon-backend-gstreamer multilib conflict (#501816)

* Wed May 20 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.1-5
- s/ImageMagick/GraphicsMagick/, avail on more secondary archs, is faster,
  yields better results.

* Mon May 04 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.1-4
- fix Source0 Url
- xine backend will not play files with non-ascii names (kdebug#172242)

* Sat Apr 11 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.1-3
- optimize scriptlets
- Provides/Requires: phonon-backend%%{_isa} ...

* Tue Mar  3 2009 Lukáš Tinkl <ltinkl@redhat.com> - 4.3.1-2
- backport GStreamer backend bugfixes (UTF-8 file handling, volume
fader)

* Fri Feb 27 2009 Than Ngo <than@redhat.com> - 4.3.1-1
- 4.3.1

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Feb 01 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.0-5
- put icons in the right subpkg

* Thu Jan 29 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.0-4
- Requires: phonon-backend >= %%version
- move icons to hicolor theme and into -backend subpkgs
- BR: libxcb-devel
- move phonon-gstreamer.svg to sources

* Mon Jan 26 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.0-3
- BR: automoc4 >= 0.9.86

* Fri Jan 23 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.3.0-2
- fix typo in postun scriptlet (introduced in 4.2.96-3)

* Thu Jan 22 2009 Than Ngo <than@redhat.com> - 4.3.0-1
- 4.3.0

* Thu Jan 08 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.2.96-3
- new tarball
- put icons/scriptlets into main pkg
- Requires: phonon-backend

* Thu Jan 08 2009 Lorenzo Villani <lvillani@binaryhelix.net> - 4.2.96-2
- add gstreaer-logo.svg

* Thu Jan 08 2009 Lorenzo Villani <lvillani@binaryhelix.net> - 4.2.96-1
- 4.2.96
- rebase phonon-4.2.0-pulseaudio.patch (-> phonon-4.2.96-pulseaudio.patch)
- rebase phonon-4.2.70-xine-pulseaudio.patch 
  (-> phonon-4.2.96-xine-pulseaudio.patch)

* Fri Dec 12 2008 Rex Dieter <rdieter@fedoraproject.org> 4.2.80-3
- rebuild for pkgconfig deps

* Tue Nov 25 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.2.80-2
- phonon-backend-xine: don't Obsolete/Provide itself, Provides: phonon-backend

* Tue Nov 25 2008 Than Ngo <than@redhat.com> 4.2.80-1
- 4.2.80

* Fri Nov 21 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 4.2.80-0.1.20081121svn887051
- Use subversion (4.2.80) snapshot
- phonon-backend-xine subpkg
- make VERBOSE=1
- make install/fast
- Xine backend is in phonon now, add xine-lib-devel as BR
- BR cmake >= 2.6.0
- forward-port xine pulseaudio patch

* Tue Sep 30 2008 Than Ngo <than@redhat.com> 4.2.0-7
- fix tranparent issue by convert

* Tue Sep 30 2008 Than Ngo <than@redhat.com> 4.2.0-6
- add missing icon

* Wed Sep 17 2008 Rex Dieter <rdieter@fedoraproject.org> 4.2.0-5
- Requires: phonon-backend-xine

* Sun Aug 10 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.2.0-4
- rename -backend-gst back to -backend-gstreamer (longer name as -backend-xine)
  The GStreamer backend isn't ready to be the default, and KDE 4.1 also defaults
  to the Xine backend when both are installed.
- fix PulseAudio not being the default in the Xine backend (4.2 regression)

* Sat Aug 02 2008 Rex Dieter <rdieter@fedoraproject.org> 4.2.0-3
- -backend-gst: Obsoletes: -backend-gstreamer < 4.2.0-2

* Thu Jul 24 2008 Rex Dieter <rdieter@fedoraproject.org> 4.2.0-2
- rename -backend-gstreamer -> backend-gst

* Wed Jul 23 2008 Rex Dieter <rdieter@fedoraproject.org> 4.2.0-1
- phonon-4.2.0

* Mon Jul 14 2008 Rex Dieter <rdieter@fedoraproject.org> 4.2-0.4.beta2
- BR: automoc4
- -backend-gstreamer subpkg

* Tue Jul 01 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.2-0.3.beta2
- drop automoc libsuffix patch, no longer needed

* Fri Jun 20 2008 Rex Dieter <rdieter@fedoraproject.org> 4.2-0.2.beta2
- phonon 4.2beta2 (aka 4.1.83)

* Sat Jun 14 2008 Rex Dieter <rdieter@fedoraproject.org> 4.2-0.1.20080614svn820634
- first try