File gnome-desktop-sharp2.spec of Package gnome-desktop-sharp2

# spec file for package gnome-desktop-sharp2
# Copyright (c) 2018 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

%define __find_provides env sh -c 'filelist=($(cat)) && { printf "%{s}\\n" "${filelist[@]}" | %{_libexecdir}/rpm/find-provides && printf "%{s}\\n" "${filelist[@]}" | %{_bindir}/mono-find-provides ; } | sort | uniq'
%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%{s}\\n" "${filelist[@]}" | %{_libexecdir}/rpm/find-requires && printf "%{s}\\n" "${filelist[@]}" | %{_bindir}/mono-find-requires ; } | sort | uniq'
Name:           gnome-desktop-sharp2
Version:        2.26.0
Release:        0
Summary:        Mono bindings for libgnome-desktop
License:        LGPL-2.1-only
Group:          Development/Languages/Mono
Source:         gnome-desktop-sharp-%{version}.tar.bz2
Patch0:         gnome-desktop-version-11.3.patch
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gapi-2.0)
BuildRequires:  pkgconfig(gnome-desktop-2.0)
BuildRequires:  pkgconfig(gnome-sharp-2.0)
BuildRequires:  pkgconfig(gtksourceview-2.0)
BuildRequires:  pkgconfig(librsvg-2.0)
BuildRequires:  pkgconfig(libwnck-1.0)
BuildRequires:  pkgconfig(mono)
BuildRequires:  pkgconfig(monodoc)
Requires:       libgnome-desktop-2-17

Mono bindings for libgnome-desktop

%package devel
Summary:        Development files for %{name}
Group:          Development/Languages/Mono
Requires:       %{name} = %{version}
Requires:       gtksourceview2-sharp = %{version}
Requires:       rsvg2-sharp = %{version}
Requires:       wnck-sharp = %{version}
Provides:       gtksourceview2-sharp-devel = %{version}
Provides:       rsvg2-sharp-devel = %{version}
Provides:       wnck-sharp-devel = %{version}

%description devel
Development files (.pc) for %{name}.

%package -n gtksourceview2-sharp
Summary:        Mono bindings for gtksourceview2
Group:          Development/Languages/Mono
Requires: = %{version}
Provides:       gtksourceview-sharp2 = %{version}
Provides: = %{version}
Obsoletes:      gtksourceview-sharp2 < %{version}

%description -n gtksourceview2-sharp
Mono bindings for gtksourceview2

%package -n rsvg2-sharp
Summary:        Mono bindings for rsvg
Group:          Development/Languages/Mono

%description -n rsvg2-sharp
This package contains Mono bindings for librsvg.

%package -n wnck-sharp
Summary:        Mono bindings for wnck
Group:          Development/Languages/Mono
Requires:       libwnck-1-22
Requires: = %{version}
Provides: = %{version}

%description -n wnck-sharp
Mono bindings for wnck

%setup -q -n gnome-desktop-sharp-%{version}

# FIXME: windowmanager.c:*: warning: dereferencing type-punned pointer will break strict-aliasing rules
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure --libexecdir=%{_libexecdir} --enable-debug
make %{?_smp_mflags}

find %{buildroot} -name "*.*a" -delete

%post -n gtksourceview2-sharp -p /sbin/ldconfig
%postun -n gtksourceview2-sharp -p /sbin/ldconfig
%post -n wnck-sharp -p /sbin/ldconfig
%postun -n wnck-sharp -p /sbin/ldconfig

%dir %{_datadir}/gnomedesktop-sharp

%files devel

%files -n gtksourceview2-sharp
%dir %{_datadir}/gtksourceview2-sharp

%files -n rsvg2-sharp
%dir %{_datadir}/rsvg2-sharp

%files -n wnck-sharp
%dir %{_datadir}/wnck-sharp