From 0a1f4e12e24edfca8b4733639ee1dae563ae937b Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 12 Apr 2009 00:15:21 +0000 Subject: [PATCH] - optimize scriptlets - Provides/Requires: phonon-backend%{_isa} ... --- phonon.spec | 49 +++++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/phonon.spec b/phonon.spec index 4312b4d..dedcf0b 100644 --- a/phonon.spec +++ b/phonon.spec @@ -1,12 +1,14 @@ Summary: Multimedia framework api Name: phonon Version: 4.3.1 -Release: 2%{?dist} +Release: 3%{?dist} Group: System Environment/Libraries License: LGPLv2+ URL: http://phonon.kde.org/ Source0: ftp://ftp.kde.org/pub/kde/stable/phonon/%{version}/%{name}-%{version}.tar.bz2 Source1: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + # Make PulseAudio the default again when listed by the backend. # Note that this currently only works for the Xine backend. Device selection in # the GStreamer backend is weird: there is a setting for "sink" which cannot be @@ -20,8 +22,6 @@ Patch1: phonon-4.2.96-xine-pulseaudio.patch Patch100: phonon-4.3.2-gstreamer-utf8-url.patch Patch101: phonon-4.3.2-gstreamer-volumefader.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - BuildRequires: automoc4 >= 0.9.86 BuildRequires: cmake >= 2.6.0 BuildRequires: glib2-devel @@ -35,9 +35,9 @@ BuildRequires: pkgconfig BuildRequires: qt4-devel >= 4.4.0 BuildRequires: xine-lib-devel -Requires: phonon-backend >= %{version} +Requires: phonon-backend%{?_isa} >= %{version} ## hard-code phonon-backend-xine, if yum chooses -gstreamer by default -#Requires(hint): phonon-backend-xine >= %{version} +#Requires(hint): phonon-backend-xine%{?_isa} >= %{version} %description %{summary}. @@ -46,9 +46,7 @@ Requires: phonon-backend >= %{version} Summary: Gstreamer phonon backend Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} -Requires(post): xdg-utils -Requires(postun): xdg-utils -Provides: phonon-backend = %{version}-%{release} +Provides: phonon-backend%{?_isa} = %{version}-%{release} Obsoletes: %{name}-backend-gst < 4.2.0-4 Provides: %{name}-backend-gst = %{version}-%{release} %description backend-gstreamer @@ -58,9 +56,7 @@ Provides: %{name}-backend-gst = %{version}-%{release} Summary: xine phonon backend Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} -Requires(post): xdg-utils -Requires(postun): xdg-utils -Provides: phonon-backend = %{version}-%{release} +Provides: phonon-backend%{?_isa} = %{version}-%{release} %description backend-xine %{summary}. @@ -81,13 +77,14 @@ Requires: pkgconfig %patch100 -p0 -b .gstreamer-utf8-url %patch101 -p0 -b .gstreamer-volumefader + %build mkdir -p %{_target_platform} pushd %{_target_platform} %{cmake} .. popd -make %{?_smp_mflags} -C %{_target_platform} VERBOSE=1 +make %{?_smp_mflags} -C %{_target_platform} %install @@ -115,17 +112,29 @@ rm -rf %{buildroot} %postun -p /sbin/ldconfig +%post backend-gstreamer +touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||: + %post backend-xine -xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || : +touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||: -%postun backend-xine -xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || : +%posttrans backend-gstreamer +gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||: -%post backend-gstreamer -xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || : +%posttrans backend-xine +gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||: %postun backend-gstreamer -xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || : +if [ $1 -eq 0 ] ; then + touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||: + gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||: +fi + +%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 %files @@ -159,6 +168,10 @@ xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || : %changelog +* Sat Apr 11 2009 Rex Dieter - 4.3.1-3 +- optimize scriptlets +- Provides/Requires: phonon-backend%%{_isa} ... + * Tue Mar 3 2009 Lukáš Tinkl - 4.3.1-2 - backport GStreamer backend bugfixes (UTF-8 file handling, volume fader)