File gnome-shell.spec of Package gnome-shell

#
# spec file for package gnome-shell (Version 2.28.0)
#
# 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:           gnome-shell
BuildRequires:  clutter-devel
BuildRequires:  dbus-1-glib-devel
BuildRequires:  gconf2-devel
BuildRequires:  gir-repository
BuildRequires:  gnome-desktop-devel
BuildRequires:  gnome-menus-devel
BuildRequires:  gstreamer-0_10-devel
BuildRequires:  gstreamer-0_10-plugins-base-devel
BuildRequires:  gtk2-devel
BuildRequires:  intltool
BuildRequires:  libgjs-devel
BuildRequires:  librsvg-devel
BuildRequires:  mutter-devel
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11-devel
License:        GPL v2 or later
Group:          System/GUI/GNOME
Version:        2.28.0
Release:        2
Summary:        GNOME Shell
Source:         %{name}-%{version}.tar.bz2
# To integrate a preview mode in GDM.
# Note: this also explains the Requires on gnome-session below.
Source1:        gnome-shell-session
Source2:        gnome3.desktop
# PATCH-FIX-UPSTREAM gnome-shell-leak.patch vuntz@opensuse.org -- Fix from upstream
Patch0:         gnome-shell-leak.patch
# PATCH-FIX-OPENSUSE gnome-shell-libmozjs.patch vuntz@novell.com -- LD_LIBRARY_PATH neeeds to be set on 11.1
Patch99:        gnome-shell-libmozjs.patch
Requires:       %{name}-lang = %{version}
Requires:       gnome-session
# mutter-devel doesn't automatically bring mutter
Requires:       mutter
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq

%description
The GNOME Shell redefines user interactions with the GNOME desktop. In
particular, it offers new paradigms for launching applications, accessing
documents, and organizing open windows in GNOME.

%lang_package
%prep
%setup -q
%patch0 -p1
%if %suse_version <= 1110
%patch99 -p1
%endif

%build
%if %suse_version <= 1110
# ugly workaround for a build failure on 11.1. The same workaround seems to be needed on Ubuntu.
export LD_LIBRARY_PATH=%{_libdir}/xulrunner-1.9
%endif
%configure \
	--libexecdir=%{_libexecdir}/%{name} \
	--disable-static
%__make %{?jobs:-j%jobs}

%install
%makeinstall
find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} +
%find_lang %{name}
%suse_update_desktop_file %{name}
%find_gconf_schemas
# Preview mode for GNOME 3
install -m755  %{S:1} %{buildroot}%{_libexecdir}/%{name}/
install -d -m755 %{buildroot}%{_datadir}/xsessions
install -m644 %{S:2} %{buildroot}%{_datadir}/xsessions/
%suse_update_desktop_file %{buildroot}%{_datadir}/xsessions/gnome3.desktop
install -d -m755 %{buildroot}%{_datadir}/gnome-shell/xdg-override/autostart
cp %{buildroot}%{_datadir}/applications/gnome-shell.desktop %{buildroot}%{_datadir}/gnome-shell/xdg-override/autostart/

%clean
rm -rf $RPM_BUILD_ROOT

%pre -f %{name}.schemas_pre

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%files -f %{name}.schemas_list
%defattr(-,root,root)
%doc COPYING
%{_bindir}/*
%{_libexecdir}/gnome-shell
%if "%{_libdir}" != "%{_libexecdir}"
%{_libdir}/gnome-shell
%endif
%{_libdir}/mutter/plugins/*.so
%{_datadir}/applications/*.desktop
%{_datadir}/gnome-shell/
%{_datadir}/xsessions/*.desktop

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by