File totem.spec of Package totem

#
# spec file for package totem (Version 2.28.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           totem
BuildRequires:  bluez-devel
BuildRequires:  gnome-control-center-devel
BuildRequires:  dbus-1-glib-devel
BuildRequires:  evolution-data-server-devel
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gnome-common
BuildRequires:  gnome-desktop-devel
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  gnome-icon-theme-devel
BuildRequires:  gstreamer-0_10-plugins-base-devel
BuildRequires:  gstreamer-0_10-plugins-good
BuildRequires:  intltool
BuildRequires:  iso-codes-devel
BuildRequires:  lirc-devel
BuildRequires:  libgdata-devel
BuildRequires:  libunique-devel
BuildRequires:  nautilus-devel
BuildRequires:  python-gtk-devel
BuildRequires:  scrollkeeper
BuildRequires:  shared-mime-info-devel
BuildRequires:  totem-pl-parser-devel
BuildRequires:  update-desktop-files
BuildRequires:  vala-devel
# We need these to pickup the playbin plugin
BuildRequires:  gstreamer-0_10-plugins-base gstreamer-utils
%ifnarch ia64 ppc ppc64 s390 s390x
%endif
License:        GPL v2 or later ; LGPL v2.1 or later
Group:          Productivity/Multimedia/Video/Players
Version:        2.28.1
Release:        1
Source0:        %{name}-%{version}.tar.bz2
Url:            http://www.gnome.org/projects/totem/
Summary:        Movie Player for the GNOME Desktop
Requires:       gstreamer010 gstreamer010-plugins-base gstreamer010-plugins-good iso-codes
Requires:       %{name}-lang = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# Since totem-devel no longer exists, obsolete it.
Provides:       totem-devel = %{version}
Obsoletes:      totem-devel < %{version} 
Recommends:     totem-plugins
Recommends:     totem-browser-plugin
%gconf_schemas_prereq

%description
Totem is a movie player for the GNOME desktop based on GStreamer. It
features a playlist, a full-screen mode, seek and volume controls, and
complete keyboard navigation.

%package plugins
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        Plugins for Totem Movie Player
Group:          Productivity/Multimedia/Video/Players
Requires:       %{name} = %{version}
# BBC iPlayer plugin
Recommends:     python-beautifulsoup
Recommends:     python-httplib2
# Brasero plugin
Recommends:     brasero
# Coherence DLNA/UPnP Client plugin
Recommends:     python-coherence
# Gromit Annotation plugin
Suggests:       gromit

%description plugins
Totem is movie player for the GNOME desktop based on GStreamer.

This package includes plugins for Totem, to add advanced features.

%package -n nautilus-totem
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        Totem Plugin for Nautilus
Group:          Productivity/Multimedia/Video/Players
Requires:       %{name} = %{version}
Supplements:    packageand(totem:nautilus)

%description -n nautilus-totem
Totem is movie player for the GNOME desktop based on GStreamer.

This package contains a plugin to integrate Totem into Nautilus.

%package browser-plugin
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        Browser Plugin Based on Totem Movie Player for the GNOME Desktop
Group:          Productivity/Multimedia/Video/Players
Requires:       %{name} = %{version}
Supplements:    packageand(totem:MozillaFirefox)
Provides:       totem-plugin = 2.25.3
Obsoletes:      totem-plugin <= 2.25.3

%description browser-plugin
Totem is movie player for the GNOME desktop based on GStreamer.

Apart from a movie player, it also includes a Mozilla plugin.

%package devel
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        Developer Documentation for Totem Movie Player
Group:          Productivity/Multimedia/Video/Players
Requires:       %{name} = %{version}

%description devel
Totem is movie player for the GNOME desktop based on GStreamer

This package contains developer documentation.

%lang_package
%prep
%setup -q

%build
# FIXME: Build as root modifies system!
#   totem-2.20.0: --disable-scrollkeeper does not work properly.
export BROWSER_PLUGIN_DIR=%{_libdir}/browser-plugins
%configure\
	--libexecdir=%{_prefix}/lib/totem\
	--disable-static\
	--disable-scrollkeeper\
	--disable-complex-plugin
# --disable-complex-plugin disables RealPlayer emulation plugin
make %{?jobs:-j%jobs}

%install
%makeinstall
if grep -q DocPath \
  $RPM_BUILD_ROOT%{_datadir}/applications/totem.desktop; then
  sed -i 's/^DocPath.*/DocPath=totem/' \
    $RPM_BUILD_ROOT%{_datadir}/applications/totem.desktop
else
  echo DocPath=totem \
    >> $RPM_BUILD_ROOT%{_datadir}/applications/totem.desktop
fi
# Remove SWF (#72417) and any Real (#72985) MIME types.
sed -i ':1;s/^\(MimeType=.*\);[^;]*\(real\|shockwave-flash\)[^;]*/\1/;t1' \
    $RPM_BUILD_ROOT%{_datadir}/applications/totem.desktop
%suse_update_desktop_file -N "Totem" -G "Movie Player" %{name}
%find_lang %{name}
%find_gconf_schemas
find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} +
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%pre -f %{name}.schemas_pre

%post -p /sbin/ldconfig

%preun -f %{name}.schemas_preun

%postun -p /sbin/ldconfig

%posttrans -f %{name}.schemas_posttrans

%files -f %{name}.schemas_list
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/totem*.*
%{_datadir}/icons/hicolor/*/devices/totem*.*
%{_datadir}/totem
%doc %{_mandir}/man?/*.*
# Own directories for plugins
%dir %{_libdir}/totem
%dir %{_libdir}/totem/plugins
# this is needed for python plugins that are not in totem-plugins
%{_libdir}/totem/plugins/totem
# Be careful here: libdir contains plugins while libexecdir contains a
# browser-plugin helper and a small utility for the main package
%if "%{_libdir}" != "%{_prefix}/lib"
%dir %{_prefix}/lib/totem
%endif
%{_prefix}/lib/totem/totem

%files lang -f %{name}.lang

%files -n nautilus-totem
%defattr(-, root, root)
%{_libdir}/nautilus/extensions-2.0/*.so

%files plugins
%defattr(-, root, root)
%exclude %{_libdir}/totem/plugins/totem
%{_libdir}/totem/plugins/*

%files browser-plugin
%defattr(-, root, root)
%{_prefix}/lib/totem/totem-plugin-viewer
%{_libdir}/browser-plugins/*.so

%files devel
%defattr(-, root, root)
%{_datadir}/gtk-doc/html/totem
# Own these repositories to not depend on gtk-doc while building:
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html

%changelog
openSUSE Build Service is sponsored by