File dbus-1-mono.spec of Package dbus-1-mono

#
# spec file for package dbus-1-mono
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           dbus-1-mono
BuildRequires:  dbus-1-devel
BuildRequires:  dbus-1-glib
BuildRequires:  libtool
BuildRequires:  mono-devel
BuildRequires:  pkgconfig
URL:            http://dbus.freedesktop.org/
License:        AFL-2.1 OR GPL-2.0-or-later
Group:          Development/Libraries/Other
Version:        0.63
Release:        0
Summary:        Mono Bindings for D-Bus
Source0:        dbus-sharp-%{version}.tar.gz
Patch0:         dbus-mono-dont-build-examples-thoenig-01.patch
Patch1:         dbus-mono-libdir-thoenig-01.patch
Patch2:         dbus-mono-exit-on-disconnect-thoenig-01.patch
Patch3:         dbus-mono-api-fix-thoenig-01.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       dbus-1 >= %( echo `rpm -q --queryformat '%%{VERSION}-%%{RELEASE}' dbus-1`)

%description
Mono bindings for D-Bus.

%prep
%setup -n dbus-sharp-%{version} -q
%patch0
%patch1
%patch2
%patch3
autoreconf -fi

%build
export CFLAGS="${RPM_OPT_FLAGS} -fstack-protector -fno-strict-aliasing -fPIC"
%configure
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install
# all the files live in /usr/lib, just this file has a wrong path
perl -pi -e "s|/usr/lib64|/usr/lib|" $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/dbus-sharp.pc

%post
%{run_ldconfig}

%postun
%{run_ldconfig}

%files
%defattr(-, root, root)
%dir %{_prefix}/lib/mono/gac/dbus-sharp
%{_libdir}/pkgconfig/dbus-sharp.pc
%{_prefix}/lib/mono/gac/dbus-sharp/*
%dir %{_prefix}/lib/mono/dbus-sharp
%{_prefix}/lib/mono/dbus-sharp/*

%changelog
openSUSE Build Service is sponsored by