# # spec file # # Copyright (c) 2022 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/ # %global flavor %{nil} %if "%{flavor}" == "glib" %bcond_with docs %bcond_without glib %global psuffix -glib %endif %if "%{flavor}" == "docs" %bcond_without docs %bcond_with glib %global psuffix -api-docs %endif %if "%{flavor}" == "" %bcond_with docs %bcond_with glib %endif %define sname libdbus-c++ %define _rev e3455d20fc0b6e00bce7668fbd9b165fdc8a7040 %define sover 1 Name: libdbus-c++%{?psuffix} Version: 0.9.1+git20170322 Release: 5.4 Summary: C++ Interface for DBus License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ URL: http://dbus-cplusplus.sourceforge.net/index.html #Source0: http://sourceforge.net/projects/dbus-cplusplus/files/dbus-c%%2B%%2B/%%{version}/%%{name}-%%{version}.tar.gz Source0: https://github.com/andreas-volz/dbus-cplusplus/archive/%{_rev}.tar.gz#/%{sname}-%{version}.tar.gz Source1: baselibs.conf # PATCH-FIX-UPSTREAM libdbus-c++-noreturn.patch davejplater@gmail.com -- Fix no return from function Patch0: libdbus-c++-noreturn.patch # PATCH-FIX-UPSTREAM libdbus-c++-pthread.patch davejplater@gmail.com -- Get ffado to build with libdbus-c++ Patch1: libdbus-c++-pthread.patch # PATCH-FIX-UPSTREAM libdbus-c++-glibmm-2.43.patch dimstar@opensuse.org -- Fix build with glibmm2 2.43.x+ Patch4: libdbus-c++-glibmm-2.43.patch # PATCH-FIX-UPSTREAM libdbus-c++-gcc7.patch davejplater@gmail.com -- Fix gcc7 build errors Patch5: libdbus-c++-gcc7.patch # PATCH_FIX_OPENSUSE libdbus-c++-sover.patch davejplater@gmail.com -- Prevent errors due to symbol incompatability. Patch6: libdbus-c++-sover.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: dos2unix BuildRequires: gcc-c++ %if %{with docs} BuildRequires: doxygen BuildRequires: fdupes BuildRequires: graphviz-gnome %endif %if %{with glib} BuildRequires: gtkmm2-devel BuildRequires: pkgconfig(dbus-glib-1) %endif BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: pkgconfig(dbus-1) # ecore BuildRequires: libexpat-devel %if "%{flavor}" == "docs" BuildArch: noarch %endif %description DBus-c++ provides a C++ API for D-BUS. The library has a glib and an ecore mainloop integration. It also offers an optional own main loop. %package -n libdbus-c++%{?psuffix}-1-%{sover} Summary: C++ Interface for D-Bus Group: System/Libraries %description -n libdbus-c++%{?psuffix}-1-%{sover} DBus-c++ provides a C++ API for D-BUS. The library has a glib and an ecore mainloop integration. It also offers an optional own main loop. %package devel Summary: Development files for libdbus-c++ Group: Development/Libraries/C and C++ Requires: libdbus-c++%{?psuffix}-1-%{sover} = %{version} Recommends: libdbus-c++-api-docs Conflicts: libdbus-c++-devel < %{version} %if 0%{?suse_version} <= 1500 %if %{with glib} Requires: libdbus-c++-devel = %{version} %endif %endif %description devel DBus-c++ provides a C++ API for D-BUS. The library has a glib and an ecore mainloop integration. It also offers an optional own main loop. This subpackage contains the files needed for building against libdbus-c++. %prep %setup -q -n dbus-cplusplus-%{_rev} %patch -P 0 %patch -P 1 %patch -P 4 -p1 %patch -P 5 %patch -P 6 %build export SOVER="%{sover}:0:0" export LDFLAGS="$LDFLAGS -lexpat -lpthread -pie" export CFLAGS="%{optflags} -fPIC" export CXXFLAGS="%{optflags} --std=c++11 -fPIC" ./bootstrap %configure \ --disable-ecore \ --enable-static=no \ %if %{without glib} --disable-glib \ %endif %if %{with docs} --enable-doxygen-docs \ %else --disable-doxygen-docs \ --enable-tests \ --enable-examples %endif %if "%{flavor}" == "docs" make %{?_smp_mflags} -C doc %else make %{?_smp_mflags} %endif %install %if "%{flavor}" == "docs" %fdupes -s doc/ %else %make_install dos2unix -k AUTHORS rm -f %{buildroot}%{_libdir}/*.la # Remove files packaged in the base flavor %if "%{flavor}" == "glib" rm %{buildroot}%{_bindir}/* rm -Rf %{buildroot}%{_includedir} rm -Rf %{buildroot}%{_libdir}/libdbus-c++-1.so* rm -Rf %{buildroot}%{_libdir}/pkgconfig/dbus-c++-1.pc %endif %endif %post -n libdbus-c++%{?psuffix}-1-%{sover} -p /sbin/ldconfig %postun -n libdbus-c++%{?psuffix}-1-%{sover} -p /sbin/ldconfig %if "%{flavor}" == "docs" %files %doc doc/html doc/img %else %files -n libdbus-c++%{?psuffix}-1-%{sover} %{_libdir}/libdbus-c++%{?psuffix}-1.so.%{sover}* %files devel %if "%{flavor}" == "" %license COPYING %doc AUTHORS README TODO %{_bindir}/dbusxx-xml2cpp %{_bindir}/dbusxx-introspect %{_includedir}/dbus-c++-1 %endif %{_libdir}/libdbus-c++%{?psuffix}-1.so %{_libdir}/pkgconfig/*%{?psuffix}*.pc %endif %changelog * Thu Feb 29 2024 pgajdos@suse.com - Use %%patch -P N instead of deprecated %%patchN. * Wed Apr 13 2022 Dominique Leuenberger - Do not reference %%release in requires/conflicts: with builds going across _multibuild, the rebuild counter of the two flavors is not guaranteed to be in sync (i.e glib flavor could build more often). * Mon Nov 25 2019 Stefan Brüns - Fix self-conflict of devel package - Remove redundant .changes files for other flavors again (added without changelog entry) - Correct baselibs entry, add glib flavor again (removed to "fix" an erroneous factory-auto reject) * Mon Nov 25 2019 Dave Plater - Remove conflict between current libdbus-c++-devel and libdbus-c++-glib-devel. * Fri Nov 22 2019 Stefan Brüns - Drop -Werror=date-time, it is not supported by older GCCs, and newer ones support SOURCE_DATE_EPOCH - Conflict older devel packages, to avoid file conflicts. * Thu Nov 21 2019 Stefan Brüns - Split package into base, glib and docs package using _multibuild. The glib flavor depends on gtkmm, but the base package is sufficient for building most of the distribution, most notably ffado/jack and its dependees. - Drop libdbus-c++-nodocdatetime.patch, doxygen honors SOURCE_DATE_EPOCH * Mon Apr 10 2017 davejplater@gmail.com - Update libdbus-c++-nodocdatetime.patch * Mon Mar 27 2017 davejplater@gmail.com - Update to git snapshot 0.9.1+git20170322 to fix ffado gcc7 build. - Added libdbus-c++-gcc7.patch. - Added libdbus-c++-sover.patch. - Removed patch libdbus-c++-gcc47.patch. - Upstream changes: Fixed undefined ssize_t for clang-3.8.0 on FreeBSD Fix copying containers link to expat on linux configure.ac: declare this version 0.9.1pw * Sun Oct 16 2016 jengelh@inai.de - Update groups, summaries, descriptions * Wed Oct 12 2016 dimstar@opensuse.org - Use the standardized patch tag line as described at https://en.opensuse.org/openSUSE:Packaging_Patches_guidelines. * Tue Apr 19 2016 zaitor@opensuse.org - Stop exporting CFLAGS and CXXFLAGS, no longer needed due to changes in libsigc++. * Wed Feb 3 2016 mpluskal@suse.com - Use url for source - Remove conditions for unsupported releases * Thu Aug 20 2015 zaitor@opensuse.org - Export CFLAGS="%%{optflags} -std=gnu++11" and CXXFLAGS="%%{optflags} -std=gnu++11". Fix build with updated MM stack. * Mon Mar 23 2015 dimstar@opensuse.org - Add libdbus-c++-glibmm-2.43.patch: Fix build with glibmm 2.4, which has the bind_property macro defined already. * Mon Dec 23 2013 coolo@suse.com - pthread is needed for the test app - not just on i586 * Tue Mar 20 2012 davejplater@gmail.com - Created libdbus-c++-gcc47.patch to fix a gcc 47 build error * Mon Mar 12 2012 davejplater@gmail.com - Added baselibs.conf for 32 bit compat libs. * Sun Mar 11 2012 davejplater@gmail.com - Added libdbus-c++-noreturn.patch to fix rpmlint error, will be reported upstream as the comment in the source file suggests that the developer hasn't decided what to do about it yet. * Sat Feb 25 2012 davejplater@gmail.com - Created package dbus-c++ for ffado svn build. - See bnc#747391 & bnc#736115