File metacity.spec of Package metacity

#
# spec file for package metacity
#
# Copyright (c) 2015 SUSE LINUX 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/
#


Name:           metacity
Version:        3.16.1
Release:        0
Summary:        A Window Manager for the GNOME Desktop
License:        GPL-2.0+
Group:          System/GUI/GNOME
Source:         http://download.gnome.org/sources/metacity/3.16/%{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE metacity-bnc385553-buggy-intel-xinerama.diff bnc#385553 federico@novell.com - Sanitize overlapping (cloned) monitors from Xinerama
Patch11:        metacity-bnc385553-buggy-intel-xinerama.diff
Url:            http://www.gnome.org
BuildRequires:  fdupes
BuildRequires:  intltool
BuildRequires:  libSM-devel
BuildRequires:  libX11-devel
BuildRequires:  libXext-devel
BuildRequires:  libXinerama-devel
BuildRequires:  libXrandr-devel
BuildRequires:  libgtop-devel
BuildRequires:  startup-notification-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  yelp-tools
BuildRequires:  zenity
BuildRequires:  pkgconfig(gio-2.0) >= 2.25.10
BuildRequires:  pkgconfig(gsettings-desktop-schemas) >= 3.3.0
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.15.2
BuildRequires:  pkgconfig(libcanberra-gtk3)
BuildRequires:  pkgconfig(xcomposite) >= 0.2
BuildRequires:  pkgconfig(xcursor)
BuildRequires:  pkgconfig(xdamage)
BuildRequires:  pkgconfig(xfixes)
BuildRequires:  pkgconfig(xrender) >= 0.0
Requires:       zenity
Recommends:     %{name}-lang
Provides:       windowmanager
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

%description
Metacity is a window manager for the GNOME Desktop.

%package -n libmetacity-private3
Summary:        A Window Manager for the GNOME Desktop -- Library to render themes
Group:          System/Libraries

%description -n libmetacity-private3
Metacity is a window manager for the GNOME Desktop.

%package tools
Summary:        A Window Manager for the GNOME Desktop -- Tools
Group:          System/GUI/GNOME
Requires:       %{name} = %{version}

%description tools
Metacity is a window manager for the GNOME Desktop.

This package contains tools related to metacity, including an utility to
test themes and a small application to test window managers.

%package devel
Summary:        Include Files and Libraries mandatory for Development
Group:          Development/Libraries/GNOME
Requires:       libmetacity-private3 = %{version}

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.

%lang_package
%prep
%setup -q
translation-update-upstream
%patch11 -p1

%build
%configure\
        --disable-static
make %{?jobs:-j%jobs}

%install
%makeinstall
%{__rm} %{buildroot}/%{_libdir}/*.la
%suse_update_desktop_file metacity
%find_lang %{name} %{?no_lang_C}
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post
%desktop_database_post
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%glib2_gsettings_schema_postun

%post -n libmetacity-private3
/sbin/ldconfig

%postun -n libmetacity-private3
/sbin/ldconfig

%files
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS rationales.txt README
%{_bindir}/metacity
%{_bindir}/metacity-message
%{_datadir}/GConf/gsettings/metacity-schemas.convert
%{_datadir}/applications/metacity.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.metacity.gschema.xml
# Do not depend on libgnome just for a directory
%dir %{_datadir}/gnome
%dir %{_datadir}/gnome/wm-properties
%{_datadir}/gnome/wm-properties/metacity-wm.desktop
%{_datadir}/themes/*
# Avoid cyclic dependency on control-center
%dir %{_datadir}/gnome-control-center
%dir %{_datadir}/gnome-control-center/keybindings
%{_datadir}/gnome-control-center/keybindings/50-metacity-*.xml
%doc %{_mandir}/man1/metacity.1%{?ext_man}
%doc %{_mandir}/man1/metacity-message.1%{?ext_man}

%files -n libmetacity-private3
%defattr (-, root, root)
%{_libdir}/libmetacity-private.so.*

%files tools
%defattr (-, root, root)
%doc %{_datadir}/help/C/creating-metacity-themes/
# Ship translations there too; arguably, they should live in a lang
# subpackage but we don't expect more translations to appear, and
# it'd be a shame to create a tools-lang subpackage just for one
# translation.
%doc %{_datadir}/help/de/creating-metacity-themes/
%{_bindir}/metacity-theme-viewer
%{_bindir}/metacity-window-demo
%dir %{_datadir}/metacity
%dir %{_datadir}/metacity/icons
%{_datadir}/metacity/icons/metacity-window-demo.png
%doc %{_mandir}/man1/metacity-theme-viewer.1%{?ext_man}
%doc %{_mandir}/man1/metacity-window-demo.1%{?ext_man}

%files lang -f %{name}.lang

%files devel
%defattr (-, root, root)
%{_includedir}/metacity/
%{_libdir}/libmetacity-private.so
%{_libdir}/pkgconfig/libmetacity-private.pc

%changelog