rpms/totem/devel totem-bin-backend-ondemand.sh, NONE, 1.1 totem.spec, 1.165, 1.166

Bastien Nocera (hadess) fedora-extras-commits at redhat.com
Mon Mar 3 19:39:21 UTC 2008


Author: hadess

Update of /cvs/pkgs/rpms/totem/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21364

Modified Files:
	totem.spec 
Added Files:
	totem-bin-backend-ondemand.sh 
Log Message:
* Mon Mar 03 2008 - Bastien Nocera <bnocera at redhat.com> - 2.21.96-1
- Update to 2.21.96
- Add ppc and ppc64 to ExcludeArch as liboil is crashing on us (#435771)
- Add big patch from Stewart Adam <s.adam at diffingo.com> to allow
  switching between the GStreamer and the xine-lib backends at
  run-time, see #327211 for details



--- NEW FILE totem-bin-backend-ondemand.sh ---
#!/bin/sh

# setup some variables
BIN=totem
ARCH="$(uname -m)"

if [ "$ARCH" == "x86_64" ];then
  _LIBDIR="/usr/lib64"
elif [ "$ARCH" == "ppc64" ];then
  _LIBDIR="/usr/lib64"
else
  _LIBDIR="/usr/lib"
fi

# start functions
setBackend() {
TOTEM_BACKEND=$1
# Default to GStreamer if there's no config
if [ -z $TOTEM_BACKEND ] ; then
  TOTEM_BACKEND=gstreamer
fi
# Default to GStreamer if the backend is invalid
if [ $TOTEM_BACKEND != "xine" -a $TOTEM_BACKEND != "gstreamer" ] ; then
  TOTEM_BACKEND=gstreamer
fi

  if [ "$UID" -eq "0" ];then
    ln -sf totem-plugin-viewer-$TOTEM_BACKEND /usr/libexec/totem-plugin-viewer
    ln -sf ../../libtotem-properties-page-$TOTEM_BACKEND.so ${_LIBDIR}/nautilus/extensions-2.0/libtotem-properties-page.so
  fi
  gconftool-2 -s /apps/totem/backend $TOTEM_BACKEND --type string
  exit 0
}
# end functions

# start execution
if [ "$1" == "-b" ];then
  # if we are setting backend, do so and exit
  setBackend $2
elif [ -z $TOTEM_BACKEND ] ; then
  # Default to GStreamer if there's no config
  TOTEM_BACKEND=gstreamer
elif [ $TOTEM_BACKEND != "xine" -a $TOTEM_BACKEND != "gstreamer" ] ; then
  # Default to GStreamer if the backend is invalid
  TOTEM_BACKEND=gstreamer
fi

# if no opts are passed, do this
TOTEM_BACKEND="$(gconftool-2 -g /apps/totem/backend)"
exec $BIN-$TOTEM_BACKEND "$@"
exit $?


Index: totem.spec
===================================================================
RCS file: /cvs/pkgs/rpms/totem/devel/totem.spec,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -r1.165 -r1.166
--- totem.spec	26 Feb 2008 18:36:16 -0000	1.165
+++ totem.spec	3 Mar 2008 19:38:44 -0000	1.166
@@ -1,17 +1,22 @@
-%define gstreamer_version	0.10.1
-%define gstreamer_plugins_base_version	0.10.14-3
-%define gstreamer_plugins_good_version	0.10.0
-%define gtk2_version	2.12.1
-%define gecko_version	1.9
+%define with_gstreamer 1
+%define with_xine 1
+
+%define gstreamer_version 0.10.1
+%define gstreamer_plugins_base_version 0.10.14-3
+%define gstreamer_plugins_good_version 0.10.0
+%define gtk2_version 2.12.1
+%define gecko_version 1.9
+%define xine_version 1.1.7
 
 Summary: Movie player for GNOME
 Name: totem
-Version: 2.21.95
+Version: 2.21.96
 Release: 1%{?dist} 
 License: GPLv2 with exception
 Group: Applications/Multimedia
 URL: http://www.gnome.org/projects/totem/
 Source0: http://ftp.gnome.org/pub/GNOME/sources/totem/2.21/totem-%{version}.tar.bz2
+Source1: totem-bin-backend-ondemand.sh
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
 
 Requires(pre): GConf2 >= 2.14
@@ -23,17 +28,14 @@
 Requires(postun): scrollkeeper
 
 Requires: gnome-desktop >= 2.6.0
-Requires: gstreamer >= %gstreamer_version
-Requires: gstreamer-plugins-base >= %gstreamer_plugins_base_version
-Requires: gstreamer-plugins-good >= %gstreamer_plugins_good_version
 Requires: iso-codes
 Requires: gnome-themes
 Requires: gtk2 >= %gtk2_version
+# FIXME?
+#Requires: %{name}-backend = %{version}-%{release}
+Requires: %{name}-gstreamer
 
 BuildRequires: gcc-c++, pkgconfig, gettext, scrollkeeper
-BuildRequires: gstreamer-devel >= %gstreamer_version
-BuildRequires: gstreamer-plugins-base-devel >= %gstreamer_plugins_base_version
-BuildRequires: gstreamer-plugins-good >= %gstreamer_plugins_good_version
 BuildRequires: gnome-desktop-devel >= 2.6.0, gnome-vfs2-devel, libglade2-devel
 BuildRequires: perl(XML::Parser)
 BuildRequires: iso-codes-devel
@@ -60,14 +62,51 @@
 
 Obsoletes: nautilus-media
 
+# See bug 435771
+ExcludeArch: ppc ppc64
+
 # http://bugzilla.gnome.org/show_bug.cgi?id=458324
 Patch0: totem-xul-4.patch
+Patch1: totem-2.21.95-backend-schema.patch
+Patch2: totem-2.21.95-svnhead.patch
+Patch3: totem-2.21.95-nohelp.patch
 
 %description
 Totem is simple movie player for the Gnome desktop. It features a
 simple playlist, a full-screen mode, seek and volume controls, as well as
 a pretty complete keyboard navigation.
 
+%if %{with_gstreamer}
+%package gstreamer
+Summary: Gstreamer backend for Totem
+Group: Applications/Multimedia
+Provides: %{name}-backend
+Requires: %{name} = %{version}
+Requires: gstreamer >= %gstreamer_version
+Requires: gstreamer-plugins-base >= %gstreamer_plugins_base_version
+Requires: gstreamer-plugins-good >= %gstreamer_plugins_good_version
+BuildRequires: gstreamer-devel >= %gstreamer_version
+BuildRequires: gstreamer-plugins-base-devel >= %gstreamer_plugins_base_version
+BuildRequires: gstreamer-plugins-good >= %gstreamer_plugins_good_version
+
+%description gstreamer
+This package provides the gstreamer backend for the Totem media player.
+%endif
+
+%if %{with_xine}
+%package xine
+Summary: Gstreamer backend for Totem
+Group: Applications/Multimedia
+Provides: %{name}-backend
+Requires: %{name} = %{version}
+Requires: xine-lib >= %{xine_version}
+BuildRequires: xine-lib-devel >= %{xine_version}
+Obsoletes: totem-xine-plparser <= %{version}-%{release}
+
+%description xine
+This package provides the xine backend for the Totem media player.
+%endif
+
 %package mozplugin
 Summary: Mozilla plugin for Totem
 Group: Applications/Internet
@@ -135,48 +174,141 @@
 A plugin to allow you to share your current playlist (and the files included
 in that playlist) with other Totems on the same local network.
 
-%package nautilus
+%if %{with_gstreamer}
+%package nautilus-gstreamer
 Summary: Video and Audio Properties tab for Nautilus
 Group: Applications/Multimedia
 Requires: %{name} = %{version}-%{release}
 
-%description nautilus
+%description nautilus-gstreamer
 A Nautilus extension that shows the properties of audio and video files in
-the properties dialogue.
+the properties dialogue. This package provides the plugin linked against the
+gstreamer backend.
+%endif
+
+%if %{with_xine}
+%package nautilus-xine
+Summary: Video and Audio Properties tab for Nautilus
+Group: Applications/Multimedia
+Requires: %{name} = %{version}-%{release}
+
+%description nautilus-xine
+A Nautilus extension that shows the properties of audio and video files in
+the properties dialogue. This package provides the plugin linked against the
+xine backend.
+%endif
 
 %prep
-%setup -q
+%setup -q -c
+# Whatever needs to be changed in both copies do here
+## remember to update me when changing %doc
+for i in AUTHORS COPYING NEWS README TODO;do
+  cp totem-%{version}/$i .
+done
 
+pushd totem-%{version}
 %patch0 -p0 -b .xulrunner
+
+# regen
 automake
 autoconf
+popd
+
+# duplicate sources
+cp -a totem-%{version} xine
+mv totem-%{version} gstreamer
 
 %build
+
+%if %{with_gstreamer}
+pushd gstreamer
 # try to work around a problem where gst-inspect does 
 # not find playbin the first time around
 /usr/bin/gst-inspect-0.10 --print-all > /dev/null
 export MOZILLA_PLUGINDIR=%{_libdir}/mozilla/plugins
+%configure \
+  --enable-gstreamer \
+  --enable-mozilla \
+  --enable-nautilus \
+  --disable-scrollkeeper \
+  --disable-nvtv \
+  --program-suffix '-gstreamer'
 
-%configure			\
-	--enable-gstreamer 	\
-	--enable-mozilla 	\
-	--enable-nautilus	\
-	--disable-scrollkeeper  \
-	--disable-nvtv
+make %{?_smp_mflags}
+popd
+%endif
+
+%if %{with_xine}
+pushd xine
+# works around a bug where xine compilation fails due to gnome-keyring.h not
+# being found ** this seems to be fixed now **
+#export CFLAGS="-I/usr/include/gnome-keyring-1/"
+export MOZILLA_PLUGINDIR=%{_libdir}/mozilla/plugins
+%configure \
+  --enable-xine \
+  --disable-gstreamer \
+  --enable-mozilla   \
+  --enable-nautilus  \
+  --disable-scrollkeeper  \
+  --disable-nvtv \
+  --program-suffix '-xine'
 
 make %{?_smp_mflags}
+popd
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
-make install DESTDIR=$RPM_BUILD_ROOT
 
-rm -f $RPM_BUILD_ROOT%{_libdir}/totem/plugins/*/*.{a,la}	\
-	$RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/*.{a,la}	\
-	$RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-2.0/*.{a,la}
+%if %{with_gstreamer}
+# GSTREAMER INSTALL
+pushd gstreamer/
+make install DESTDIR=$RPM_BUILD_ROOT
+# language hack
+%find_lang %{name} --with-gnome
+mv %{name}.lang ../
+# nautilus plugin doesn't use --program-suffix: copy manually
+install -m755 ./src/.libs/libtotem-properties-page.so $RPM_BUILD_ROOT%{_libdir}/libtotem-properties-page-gstreamer.so
+popd
+%endif
+
+%if %{with_xine}
+# XINE INSTALL
+pushd xine
+make install DESTDIR=$RPM_BUILD_ROOT
+# nautilus plugin doesn't use --program-suffix :/
+# copy manually
+install -m755 ./src/.libs/libtotem-properties-page.so $RPM_BUILD_ROOT%{_libdir}/libtotem-properties-page-xine.so
+popd
+%endif
+
+rm -f $RPM_BUILD_ROOT%{_libdir}/totem/plugins/*/*.{a,la} \
+ $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/*.{a,la} \
+ $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-2.0/*.{a,la}
+
+# nautilus plugin doesn't use --program-suffix :/
+# remove binary file so we can symlink it
+rm -f $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-2.0/libtotem-properties-page.so
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-2.0/
+ln -sf ../../libtotem-properties-page-gstreamer.so $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-2.0/libtotem-properties-page.so
 
 %find_lang %{name} --with-gnome
 
+# these man pages are one and the same... so make one copy
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/%{name}*xine*
+mv $RPM_BUILD_ROOT%{_mandir}/man1/%{name}-gstreamer.1 \
+  $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
+mv $RPM_BUILD_ROOT%{_mandir}/man1/totem-video-thumbnailer-gstreamer.1 \
+  $RPM_BUILD_ROOT%{_mandir}/man1/totem-video-thumbnailer.1
+
+install -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
+# link other binaries
+ln -sf %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}-video-thumbnailer
+ln -sf %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}-video-indexer
+ln -sf %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}-audio-preview
+ln -sf %{name}-plugin-viewer-gstreamer $RPM_BUILD_ROOT%{_libexecdir}/%{name}-plugin-viewer
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -185,10 +317,10 @@
 update-desktop-database -q
 export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 gconftool-2 --makefile-install-rule \
-        %{_sysconfdir}/gconf/schemas/totem.schemas 			\
-        %{_sysconfdir}/gconf/schemas/totem-handlers.schemas 		\
-        %{_sysconfdir}/gconf/schemas/totem-video-thumbnail.schemas 	\
-	>& /dev/null || :
+        %{_sysconfdir}/gconf/schemas/totem.schemas \
+        %{_sysconfdir}/gconf/schemas/totem-handlers.schemas \
+        %{_sysconfdir}/gconf/schemas/totem-video-thumbnail.schemas \
+ >& /dev/null || :
 touch %{_datadir}/icons/hicolor
 if [ -x /usr/bin/gtk-update-icon-cache ]; then
   /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
@@ -197,21 +329,21 @@
 %pre
 if [ "$1" -gt 1 ]; then
     export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
-    gconftool-2 --makefile-uninstall-rule 				\
-        %{_sysconfdir}/gconf/schemas/totem.schemas 			\
-        %{_sysconfdir}/gconf/schemas/totem-handlers.schemas 		\
-        %{_sysconfdir}/gconf/schemas/totem-video-thumbnail.schemas 	\
-	>& /dev/null || :
+    gconftool-2 --makefile-uninstall-rule \
+        %{_sysconfdir}/gconf/schemas/totem.schemas \
+        %{_sysconfdir}/gconf/schemas/totem-handlers.schemas \
+        %{_sysconfdir}/gconf/schemas/totem-video-thumbnail.schemas \
+ >& /dev/null || :
 fi
  
 %preun
 if [ "$1" -eq 0 ]; then
     export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
-    gconftool-2 --makefile-uninstall-rule 				\
-        %{_sysconfdir}/gconf/schemas/totem.schemas 			\
-        %{_sysconfdir}/gconf/schemas/totem-handlers.schemas 		\
-        %{_sysconfdir}/gconf/schemas/totem-video-thumbnail.schemas 	\
-	>& /dev/null || :
+    gconftool-2 --makefile-uninstall-rule \
+        %{_sysconfdir}/gconf/schemas/totem.schemas \
+        %{_sysconfdir}/gconf/schemas/totem-handlers.schemas \
+        %{_sysconfdir}/gconf/schemas/totem-video-thumbnail.schemas \
+ >& /dev/null || :
 fi
 
 %postun
@@ -226,15 +358,15 @@
 %post mythtv
 export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 gconftool-2 --makefile-install-rule \
-        %{_sysconfdir}/gconf/schemas/totem-mythtv.schemas 		\
-	>& /dev/null || :
+        %{_sysconfdir}/gconf/schemas/totem-mythtv.schemas \
+ >& /dev/null || :
 
 %pre mythtv
 if [ "$1" -gt 1 ]; then
     export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
     if [ -f %{_sysconfdir}/gconf/schemas/totem-mythtv.schemas ] ; then
-        gconftool-2 --makefile-uninstall-rule				\
-            %{_sysconfdir}/gconf/schemas/totem-mythtv.schemas		\
+        gconftool-2 --makefile-uninstall-rule \
+            %{_sysconfdir}/gconf/schemas/totem-mythtv.schemas \
             >& /dev/null || :
     fi
 fi
@@ -243,8 +375,8 @@
 if [ "$1" -eq 0 ]; then
     export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
     if [ -f %{_sysconfdir}/gconf/schemas/totem-mythtv.schemas ] ; then
-        gconftool-2 --makefile-uninstall-rule				\
-            %{_sysconfdir}/gconf/schemas/totem-mythtv.schemas		\
+        gconftool-2 --makefile-uninstall-rule \
+            %{_sysconfdir}/gconf/schemas/totem-mythtv.schemas \
             >& /dev/null || :
     fi
 fi
@@ -256,8 +388,13 @@
 %config %{_sysconfdir}/gconf/schemas/totem-handlers.schemas
 %config %{_sysconfdir}/gconf/schemas/totem-video-thumbnail.schemas
 %{_bindir}/%{name}
+%{_bindir}/%{name}-video-thumbnailer
+%{_bindir}/%{name}-video-indexer
+%{_bindir}/%{name}-audio-preview
 %{_datadir}/applications/%{name}.desktop
 %{_datadir}/%{name}/
+%{_libdir}/nautilus/extensions-2.0/*.so*
+%dir %{_libexecdir}/totem
 %dir %{_libdir}/totem/plugins
 %{_libdir}/totem/plugins/gromit
 %{_libdir}/totem/plugins/ontop
@@ -268,9 +405,6 @@
 %{_libdir}/totem/plugins/totem
 %{_libdir}/totem/plugins/thumbnail
 #%{_libdir}/totem/plugins/bemused
-%{_bindir}/%{name}-video-thumbnailer
-%{_bindir}/%{name}-video-indexer
-%{_bindir}/%{name}-audio-preview
 %{_datadir}/icons/hicolor/*/apps/totem.png
 %{_datadir}/icons/hicolor/scalable/apps/totem.svg
 %{_mandir}/man1/%{name}.1*
@@ -306,11 +440,44 @@
 %defattr(-, root, root)
 %{_libdir}/totem/plugins/publish
 
-%files nautilus
+%if %{with_gstreamer}
+%files gstreamer
+%{_bindir}/%{name}-gstreamer
+%{_bindir}/%{name}-video-thumbnailer-gstreamer
+%{_bindir}/%{name}-video-indexer-gstreamer
+%{_bindir}/%{name}-audio-preview-gstreamer
+%{_libexecdir}/totem-plugin-viewer-gstreamer
+%{_libexecdir}/totem/*gstreamer*
+
+%files nautilus-gstreamer
 %defattr(-, root, root)
-%{_libdir}/nautilus/extensions-*/*.so*
+# installed to libdir so we can symlink the real spot
+%{_libdir}/libtotem*gstreamer*.so*
+%endif
+
+%if %{with_xine}
+%files xine
+%{_bindir}/%{name}-xine
+%{_bindir}/%{name}-video-thumbnailer-xine
+%{_bindir}/%{name}-video-indexer-xine
+%{_bindir}/%{name}-audio-preview-xine
+%{_libexecdir}/totem-plugin-viewer-xine
+%{_libexecdir}/totem/*xine*
+
+%files nautilus-xine
+%defattr(-, root, root)
+# installed to libdir so we can symlink the real spot
+%{_libdir}/libtotem*xine*.so*
+%endif
 
 %changelog
+* Mon Mar 03 2008 - Bastien Nocera <bnocera at redhat.com> - 2.21.96-1
+- Update to 2.21.96
+- Add ppc and ppc64 to ExcludeArch as liboil is crashing on us (#435771)
+- Add big patch from Stewart Adam <s.adam at diffingo.com> to allow
+  switching between the GStreamer and the xine-lib backends at
+  run-time, see #327211 for details
+
 * Tue Feb 26 2008 - Bastien Nocera <bnocera at redhat.com> - 2.21.95-1
 - Update to 2.21.95
 
@@ -350,7 +517,7 @@
 * Sun Dec  9 2007  Matthias Clasen  <mclasen at redhat.com> - 2.21.5-2
 - Make it build
 
-* Sun Dec 09 2007 - Bastien Nocera <bnocera at redhat.com>	- 2.21.5-1
+* Sun Dec 09 2007 - Bastien Nocera <bnocera at redhat.com> - 2.21.5-1
 - Update to 2.21.5
 - Remove -devel and -plparser subpackages, they're in totem-pl-parser now
 




More information about the fedora-extras-commits mailing list