SHA256
8
0
forked from pool/sdbus-cpp
Files
sdbus-cpp/sdbus-cpp.spec

131 lines
3.6 KiB
RPMSpec
Raw Permalink Normal View History

- Update to version 2.1.0: * Add SDBUSCPP_REGISTER_STRUCT macro to conveniently teach sdbus-c++ about user-defined structs * Extend the SDBUSCPP_REGISTER_STRUCT macro with serialization of user-defined structs as dicts, and deserialization of dicts into user-defined structs * Make createPlainMessage() function public * Solve the problem of sending large D-Bus messages properly (through the event loop thread) * Fix partially renamed BUILD_DOXYGEN_DOC CMake option * Change googletest to default version 1.14.0 * Add version parameter to the xml2cpp codegen tool * A few other internal refactorings and improvements - Changes since version 2.0.0: * A new major version with revamped API, bringing numerous new features, simplifications, fixes and breaking changes improving not only API consistency, safety and expressiveness, but also performance * Add section 'Migrating to sdbus-c++ v2' to the 'Using sdbus-c++' document providing the complete list of breaking API/ABI/behavior changes and migration notes * Switch to C++20 standard (but the API is backwards-compatible with C++17, skipping C++20 features in such a case) * Add strong types to public API * Add support for string_view as a D-Bus type representation * Enable compile-time D-Bus signature generation * Redesign Object vtable registration API * Improve Proxy signal subscription API * Refactor object manager API for consistency * Introduce native sd-event integration * Let callbacks take message objects by value * Simplify async D-Bus connection handling * Simplify async call state flag * Make Variant constructor explicit * Use optional for passing potential call errors * Rename and re-organize CMake options * Rename connection creation methods * Have all async function names finish with *Async for consistency * Implement more flexible searching for sd-bus libs * Add new `SDBUSCPP_SDBUS_LIB` CMake configuration variable determining which sd-bus library shall be picked * Make Variant conversion operator explicit * Use sd-bus API to get the current message * Use sd_bus_match_signal() for signal registration * Provide also const char* overloads for convenience functions * Disable move in generated adaptor and proxy classes * Improve and make more efficient some Message API * Add Slot-returning overloads of async method calls * Remove floating_slot_t tag and use return_slot_t instead * Add [[nodiscard]] to many relevant API functions * Add proper fix for timeout handling * Fix for external event loops in which the event loop thread ID was not correctly initialized (now fixed and simplified by not needing the thread ID anymore) * Remove deprecated stuff * Add `SDBUSCPP_` prefix to CMake configuration variables to avoid conflicts with downstream projects * Require systemd of at least v238 * Many other fixes and updates in code, tests, build system, CI, and documentation * - Update to new version 1.6.0: - Add support for enums in D-Bus serialization and signatures - Add support for std::variant as an alternative C++ type for D-Bus Variant - Add support for implicit conversions between std::variant and sdbus::Variant - Fix missing includes * - Update to new version 1.5.0: - Improve handling of exceptions from callback handlers - Add support for async registration of matches - Correctly add libsystemd dependency to pkgconfi - Fix request name signal handling issue - Add INSTALL_TESTS CMake option - Minor UnixFd cleanups - Additional little fixes and updates in code, build system, CI, and documentation * - Update to new version 1.4.0: - Implement API for convenient asynchronous property get/set on the client-side - Add support for FreeBSD systems (including support for basu implementation of sd-bus on non-systemd machines) - Add support for direct, peer-to-peer connections - Add option to create IConnection directly from an underlying sd_bus instance - Some additional CMake-related and code bug fixes * - Update to new version 1.3.0: - Add support for light-weight proxies (proxies without own event loop threads) - Extend documentation with explicit mapping between D-Bus and corresponding C++ types - Support move semantics in generated adaptor and proxy classes - Adaptations for libsystemd v251 - Fix for proper complete sending of long D-Bus messages by explicitly flushing them - Add support for std::future-based async calls - Fix race condition in async Proxy::callMethod - Fix pseudo-connection static lifetime issue with Phoenix pattern - Speed up performance of of serialization of arrays of trivial D-Bus types - Make sdbus::Struct a tuple-like class, so it's usable wherever std::tuple is - Add support for std::array, std::span and std::unordered_map as additional C++ types for D-Bus array types - Add support for libelogind as an addition to libsystemd - Add support for std::future-based async methods in codegen tool - Additional little fixes and improvements in code, build system, CI, and documentation * - Update to new version 1.2.0: - Add support for match rules - Add support for session bus connection at custom address - Add CMake variable for extra libsystemd config options - Use pseudo D-Bus connection for plain messages - Rename dont_request_slot tag to floating_slot - Add validity checks for names and paths - Remove executable flag from source files - Detect missing type after array declaration - Fix invalid assert on event fd - Enable move for ObjectPath and Signature - Add printer for std::chrono in googletest v1.11.0 - Fix potential undefined behavior in creation of sdbus::Error - Additional little fixes and improvements in code, build system, and documentation * - Update to new version 1.1.0: - Fix timeout handling for asynchronous method calls - Add support for unregistering signal handler - Add support for chrono literals in sdbus-c++-xml2cpp generator - Additional little fixes and improvements in code, build system, and documentation * - Update to new version 1.0.0 - Bump package name for new SOVERSION * - Update to new version 0.9.0 - Drop patch merged upstream: 0001-Find-and-link-against-pthread.patch - Use more wildcards to pick files to package * - Initial packaging of version 0.8.3 - Imported from Fedora https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/systemd.spec - Change source tarball name to sdbus-cpp-<version>.tar.gz - Add 0001-Find-and-link-against-pthread.patch to fix build failure - Use cmake_build doc, without --target, unsupported on SUSE - Set CMAKE_INSTALL_DOCDIR to /usr/share/doc/packages/sdbus-c++ to match _docdir - Explicitly list files in document page, wildcard not supported - Use SPDX license identifier - Set Group - Add ldconfig post/postun - Change main package name to libsdbus-c++0 - Move cmake files to -devel package - Move changelog to sdbus-cpp.changes file - Move AUTHORS/ChangeLog/NEWS/README to -devel package - Apply changes from 'osc service localrun format_spec_file' - Remove 'undefine __cmake_in_source_build', not needed - Fix dependency from -devel/-bin packages to lib package OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/sdbus-cpp?expand=0&rev=23
2024-12-05 14:04:59 +00:00
#
# spec file for package sdbus-cpp
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2021-2024 Luca Boccassi <bluca@debian.org>
# Copyright (c) 2020-2021 RedHat Inc.
#
# 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 version_major 2
%global version_minor 1
%global version_micro 0
Name: sdbus-cpp
Version: %{version_major}.%{version_minor}.%{version_micro}
Release: 0
Summary: High-level C++ D-Bus library
License: LGPL-2.1-only
Group: Development/Libraries/C and C++
URL: https://github.com/Kistler-Group/sdbus-cpp
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake >= 3.12
BuildRequires: gcc-c++
BuildRequires: pkgconfig(libsystemd) >= 236
%description
High-level C++ D-Bus library for Linux designed to provide easy-to-use
yet powerful API in modern C++
%package -n libsdbus-c++2
Summary: Shared library for %{name}
Group: Development/Libraries/C and C++
%description -n libsdbus-c++2
Shared library files for %{name}.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: libsdbus-c++2 = %{version}
%description devel
CMake, pkg-config, headers and other development files for %{name}.
%package devel-doc
Summary: Developer documentation for %{name}
Group: Development/Libraries/C and C++
BuildArch: noarch
BuildRequires: doxygen
%description devel-doc
READMEs and generated doxygen documentation for %{name}
%package xml2cpp
Summary: Stub code generator for sdbus-c++
Group: Development/Libraries/C and C++
Requires: libsdbus-c++2 = %{version}
- Update to version 2.1.0: * Add SDBUSCPP_REGISTER_STRUCT macro to conveniently teach sdbus-c++ about user-defined structs * Extend the SDBUSCPP_REGISTER_STRUCT macro with serialization of user-defined structs as dicts, and deserialization of dicts into user-defined structs * Make createPlainMessage() function public * Solve the problem of sending large D-Bus messages properly (through the event loop thread) * Fix partially renamed BUILD_DOXYGEN_DOC CMake option * Change googletest to default version 1.14.0 * Add version parameter to the xml2cpp codegen tool * A few other internal refactorings and improvements - Changes since version 2.0.0: * A new major version with revamped API, bringing numerous new features, simplifications, fixes and breaking changes improving not only API consistency, safety and expressiveness, but also performance * Add section 'Migrating to sdbus-c++ v2' to the 'Using sdbus-c++' document providing the complete list of breaking API/ABI/behavior changes and migration notes * Switch to C++20 standard (but the API is backwards-compatible with C++17, skipping C++20 features in such a case) * Add strong types to public API * Add support for string_view as a D-Bus type representation * Enable compile-time D-Bus signature generation * Redesign Object vtable registration API * Improve Proxy signal subscription API * Refactor object manager API for consistency * Introduce native sd-event integration * Let callbacks take message objects by value * Simplify async D-Bus connection handling * Simplify async call state flag * Make Variant constructor explicit * Use optional for passing potential call errors * Rename and re-organize CMake options * Rename connection creation methods * Have all async function names finish with *Async for consistency * Implement more flexible searching for sd-bus libs * Add new `SDBUSCPP_SDBUS_LIB` CMake configuration variable determining which sd-bus library shall be picked * Make Variant conversion operator explicit * Use sd-bus API to get the current message * Use sd_bus_match_signal() for signal registration * Provide also const char* overloads for convenience functions * Disable move in generated adaptor and proxy classes * Improve and make more efficient some Message API * Add Slot-returning overloads of async method calls * Remove floating_slot_t tag and use return_slot_t instead * Add [[nodiscard]] to many relevant API functions * Add proper fix for timeout handling * Fix for external event loops in which the event loop thread ID was not correctly initialized (now fixed and simplified by not needing the thread ID anymore) * Remove deprecated stuff * Add `SDBUSCPP_` prefix to CMake configuration variables to avoid conflicts with downstream projects * Require systemd of at least v238 * Many other fixes and updates in code, tests, build system, CI, and documentation * - Update to new version 1.6.0: - Add support for enums in D-Bus serialization and signatures - Add support for std::variant as an alternative C++ type for D-Bus Variant - Add support for implicit conversions between std::variant and sdbus::Variant - Fix missing includes * - Update to new version 1.5.0: - Improve handling of exceptions from callback handlers - Add support for async registration of matches - Correctly add libsystemd dependency to pkgconfi - Fix request name signal handling issue - Add INSTALL_TESTS CMake option - Minor UnixFd cleanups - Additional little fixes and updates in code, build system, CI, and documentation * - Update to new version 1.4.0: - Implement API for convenient asynchronous property get/set on the client-side - Add support for FreeBSD systems (including support for basu implementation of sd-bus on non-systemd machines) - Add support for direct, peer-to-peer connections - Add option to create IConnection directly from an underlying sd_bus instance - Some additional CMake-related and code bug fixes * - Update to new version 1.3.0: - Add support for light-weight proxies (proxies without own event loop threads) - Extend documentation with explicit mapping between D-Bus and corresponding C++ types - Support move semantics in generated adaptor and proxy classes - Adaptations for libsystemd v251 - Fix for proper complete sending of long D-Bus messages by explicitly flushing them - Add support for std::future-based async calls - Fix race condition in async Proxy::callMethod - Fix pseudo-connection static lifetime issue with Phoenix pattern - Speed up performance of of serialization of arrays of trivial D-Bus types - Make sdbus::Struct a tuple-like class, so it's usable wherever std::tuple is - Add support for std::array, std::span and std::unordered_map as additional C++ types for D-Bus array types - Add support for libelogind as an addition to libsystemd - Add support for std::future-based async methods in codegen tool - Additional little fixes and improvements in code, build system, CI, and documentation * - Update to new version 1.2.0: - Add support for match rules - Add support for session bus connection at custom address - Add CMake variable for extra libsystemd config options - Use pseudo D-Bus connection for plain messages - Rename dont_request_slot tag to floating_slot - Add validity checks for names and paths - Remove executable flag from source files - Detect missing type after array declaration - Fix invalid assert on event fd - Enable move for ObjectPath and Signature - Add printer for std::chrono in googletest v1.11.0 - Fix potential undefined behavior in creation of sdbus::Error - Additional little fixes and improvements in code, build system, and documentation * - Update to new version 1.1.0: - Fix timeout handling for asynchronous method calls - Add support for unregistering signal handler - Add support for chrono literals in sdbus-c++-xml2cpp generator - Additional little fixes and improvements in code, build system, and documentation * - Update to new version 1.0.0 - Bump package name for new SOVERSION * - Update to new version 0.9.0 - Drop patch merged upstream: 0001-Find-and-link-against-pthread.patch - Use more wildcards to pick files to package * - Initial packaging of version 0.8.3 - Imported from Fedora https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/systemd.spec - Change source tarball name to sdbus-cpp-<version>.tar.gz - Add 0001-Find-and-link-against-pthread.patch to fix build failure - Use cmake_build doc, without --target, unsupported on SUSE - Set CMAKE_INSTALL_DOCDIR to /usr/share/doc/packages/sdbus-c++ to match _docdir - Explicitly list files in document page, wildcard not supported - Use SPDX license identifier - Set Group - Add ldconfig post/postun - Change main package name to libsdbus-c++0 - Move cmake files to -devel package - Move changelog to sdbus-cpp.changes file - Move AUTHORS/ChangeLog/NEWS/README to -devel package - Apply changes from 'osc service localrun format_spec_file' - Remove 'undefine __cmake_in_source_build', not needed - Fix dependency from -devel/-bin packages to lib package OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/sdbus-cpp?expand=0&rev=23
2024-12-05 14:04:59 +00:00
BuildRequires: pkgconfig(expat)
%description xml2cpp
The stub code generator for generating the adapter and proxy interfaces
out of the D-Bus IDL XML description.
%prep
%autosetup -n %{name}-%{version}
%build
%cmake . \
-DCMAKE_INSTALL_DOCDIR=/usr/share/doc/packages/sdbus-c++ \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_CODE_GEN=ON \
-DSDBUSCPP_BUILD_CODEGEN=ON \
-DSDBUSCPP_BUILD_DOCS=ON \
-DSDBUSCPP_BUILD_DOXYGEN_DOCS=ON
%cmake_build
%cmake_build docs
%install
%cmake_install
%post -n libsdbus-c++2 -p /sbin/ldconfig
%postun -n libsdbus-c++2 -p /sbin/ldconfig
%files -n libsdbus-c++2
%license COPYING
%{_libdir}/libsdbus-c++.so.*
%files devel
%dir %{_libdir}/cmake/sdbus-c++
%dir %{_libdir}/cmake/sdbus-c++-tools
%dir %{_docdir}/sdbus-c++
%doc %{_docdir}/sdbus-c++/AUTHORS
%doc %{_docdir}/sdbus-c++/ChangeLog
%doc %{_docdir}/sdbus-c++/NEWS
%doc %{_docdir}/sdbus-c++/README
%doc %{_docdir}/sdbus-c++/COPYING
%{_libdir}/cmake/sdbus-c++/*
%{_libdir}/cmake/sdbus-c++-tools/*
%{_libdir}/pkgconfig/sdbus-c++*
%{_libdir}/libsdbus-c++.so
%{_includedir}/*
%files devel-doc
%dir %{_docdir}/sdbus-c++
%doc %{_docdir}/sdbus-c++/README.md
%doc %{_docdir}/sdbus-c++/sdbus-c++-class-diagram.png
%doc %{_docdir}/sdbus-c++/sdbus-c++-class-diagram.uml
%doc %{_docdir}/sdbus-c++/systemd-dbus-config.md
%doc %{_docdir}/sdbus-c++/using-sdbus-c++.md
%license COPYING
%files xml2cpp
%{_bindir}/sdbus-c++-xml2cpp
%license COPYING
%changelog