File muffin.spec of Package muffin

#
# spec file for package muffin
#
# 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/
#


%define soname  libmuffin
%define sover   0
%define typelib typelib-1_0-MetaMuffin-0_0
Name:           muffin
Version:        2.8.4
Release:        0
Summary:        Cinnamon Desktop default window manager
License:        GPL-2.0+ and MIT
Group:          System/GUI/Other
Url:            https://github.com/linuxmint/muffin/tags
Source:         https://github.com/linuxmint/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE muffin-2.4.0-SVID_SOURCE.patch marguerite@opensuse.org -- Change _SVID_SOURCE to _DEFAULT_SOURCE.
Patch0:         %{name}-2.4.0-SVID_SOURCE.patch
BuildRequires:  fdupes
BuildRequires:  gnome-common
BuildRequires:  gtk-doc
BuildRequires:  update-desktop-files
BuildRequires:  zenity
BuildRequires:  pkgconfig(cairo) >= 1.10.0
BuildRequires:  pkgconfig(cinnamon-desktop) >= 2.4.0
BuildRequires:  pkgconfig(clutter-1.0) >= 1.14.3
BuildRequires:  pkgconfig(cogl-1.0) >= 1.13.3
BuildRequires:  pkgconfig(gio-2.0) >= 2.25.10
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(gnome-doc-utils)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.9.12
BuildRequires:  pkgconfig(libcanberra-gtk3) >= 0.26
BuildRequires:  pkgconfig(libstartup-notification-1.0) >= 0.7
BuildRequires:  pkgconfig(pango) >= 1.14.0
BuildRequires:  pkgconfig(sm)
BuildRequires:  pkgconfig(xcomposite) >= 0.3
BuildRequires:  pkgconfig(xdamage)
BuildRequires:  pkgconfig(xfixes)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(xrender)
Requires:       cinnamon-gschemas
Requires:       zenity
Recommends:     %{name}-lang
Provides:       windowmanager
%glib2_gsettings_schema_requires

%description
Cinnamon Desktop default window manager.
Muffin uses GTK+ and Clutter to do everything.

%lang_package

%package -n %{soname}%{sover}
Summary:        Muffin shared libraries
Group:          System/Libraries

%description -n %{soname}%{sover}
Cinnamon Desktop default window manager.
Muffin uses GTK+ and Clutter to do everything.

This package provides Muffin's shared libraries.

%package -n %{typelib}
Summary:        Muffin Introspection bindings
Group:          System/Libraries

%description -n %{typelib}
Cinnamon Desktop default window manager.
Muffin uses GTK+ and Clutter to do everything.

This package provides the GObject Introspection bindings for muffin.

%package devel
Summary:        Muffin development files
Group:          Development/Libraries/Other
Requires:       %{soname}%{sover} = %{version}
Requires:       %{typelib} = %{version}

%description devel
Cinnamon Desktop default window manager.
Muffin uses GTK+ and Clutter to do everything.

This package provides the development files.

%prep
%setup -q
%patch0 -p1

%build
NOCONFIGURE=1 gnome-autogen.sh
%configure \
  --disable-static          \
  --disable-schemas-install \
  --enable-gtk-doc
make %{?_smp_mflags}

%install
%make_install
%find_lang %{name}
%suse_update_desktop_file %{name}
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes %{buildroot}

%post
%glib2_gsettings_schema_post

%postun
%glib2_gsettings_schema_postun

%post -n %{soname}%{sover} -p /sbin/ldconfig

%postun -n %{soname}%{sover} -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README README* rationales.txt debian/changelog
%{_bindir}/%{name}*
%{_libdir}/%{name}/
%exclude %{_libdir}/%{name}/Meta-Muffin.0.typelib
%exclude %{_libdir}/%{name}/Meta-Muffin.0.gir
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man?/*.?%{?ext_man}
%{_datadir}/glib-2.0/schemas/*.gschema.xml

%files lang -f %{name}.lang
%defattr(-,root,root)

%files -n %{soname}%{sover}
%defattr(-,root,root)
%{_libdir}/%{soname}.so.%{sover}*

%files -n typelib-1_0-MetaMuffin-0_0
%defattr(-,root,root)
%{_libdir}/%{name}/Meta-Muffin.0.typelib

%files devel
%defattr(-,root,root)
%{_includedir}/%{name}/
%{_libdir}/%{soname}.so
%{_libdir}/pkgconfig/%{soname}.pc
%{_libdir}/pkgconfig/%{name}-plugins.pc
%{_libdir}/%{name}/Meta-Muffin.0.gir
%{_datadir}/gtk-doc/html/%{name}/

%changelog
openSUSE Build Service is sponsored by