# # spec file for package libcbor-doc # # 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/ # %define socurrent 0 %define sorevision 9 %define soage 0 %define lname libcbor%{socurrent}_%{sorevision} %global flavor %{nil} %if "%{flavor}" == "doc" Name: libcbor-doc %else Name: libcbor %endif Version: 0.9.0 Release: 1.2 Summary: Library for parsing Concise Binary Object Representation (CBOR) License: MIT Group: Development/Libraries/C and C++ URL: https://github.com/PJK/libcbor Source0: https://github.com/PJK/libcbor/archive/v%{version}.tar.gz %if "%{flavor}" == "doc" BuildRequires: doxygen BuildRequires: python3-Sphinx BuildRequires: python3-breathe %else BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: libcmocka-devel BuildRequires: ninja %endif %description libcbor is a C99 library for parsing and generating CBOR (RFC 7049), a general-purpose schema-less binary data format. It supports flexible memory management, UTF-8, streams & incremental processing, and has a layered architecture. %package -n %{lname} Summary: Library for parsing Concise Binary Object Representation (CBOR) Group: System/Libraries %description -n %{lname} libcbor is a C99 library for parsing and generating CBOR (RFC 7049), a general-purpose schema-less binary data format. It supports flexible memory management, UTF-8, streams & incremental processing, and has a layered architecture. %package devel Summary: Development files for libcbor Group: Development/Libraries/C and C++ Requires: %{lname} = %{version} %description devel libcbor is a C library for parsing and generating CBOR. The libcbor-devel contains libraries and header files for libcbor. %prep %autosetup -n libcbor-%{version} sed -i 's|${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig|${CMAKE_INSTALL_LIBDIR}/pkgconfig|' src/CMakeLists.txt %build %if "%{flavor}" == "doc" %make_build -C doc man %else %define __builder ninja %cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=ON %cmake_build %endif %install %if "%{flavor}" == "doc" mkdir -p %{buildroot}%{_mandir}/man1 cp doc/build/man/* %{buildroot}%{_mandir}/man1 %else %cmake_install %endif %post -n %{lname} -p /sbin/ldconfig %postun -n %{lname} -p /sbin/ldconfig %if "%{flavor}" == "doc" %files %doc CHANGELOG.md README.md %{_mandir}/*/* %else %files -n %{lname} %license LICENSE.md %{_libdir}/libcbor.so.%{socurrent}.%{sorevision} %{_libdir}/libcbor.so.%{socurrent}.%{sorevision}.%{soage} %files devel %{_includedir}/cbor.h %dir %{_includedir}/cbor %{_includedir}/cbor/*.h %dir %{_includedir}/cbor/internal %{_includedir}/cbor/internal/*.h %{_libdir}/libcbor.so %{_libdir}/pkgconfig/libcbor.pc %endif %changelog * Tue Dec 7 2021 Dirk Müller - fix duplicate src package name issue on multibuild * Sun Dec 5 2021 Dirk Müller - update to 0.9.0: * Improved pkg-config paths handling * Use explicit math.h linkage * BREAKING: Fixed handling of items that exceed the host size_t range * cbor_decode explicitly checks size to avoid overflows (previously broken, potentially resulting in erroneous decoding on affected systems) - split docs into multibuild flavor to avoid build cycle via openssh<-> python-pyOpenSSL <-> python-cryptography * Tue Sep 22 2020 Ismail Dönmez - Update to version 0.8.0 * BREAKING: Fix cbor_tag_item not increasing the reference count on the tagged item reference it returns * BREAKING: CBOR_DECODER_EBUFFER removed from cbor_decoder_status + cbor_stream_decode will set CBOR_DECODER_NEDATA instead if the input buffer is empty * Fix cbor_stream_decode to set cbor_decoder_result.required to the minimum number of input bytes necessary to receive the next callback (as long as at least one byte was passed) * Fixed several minor manpage issue * Mon May 25 2020 Ismail Dönmez - Update to version 0.7.0 * Too many changes to list, see included CHANGELOG.md file * Thu Jan 2 2020 Torsten Gruner - remove documentation build with doxygen * Fri Sep 28 2018 Jan Engelhardt - Rename %%SONAME to %%sover to better reflect its use. - Expand summary, compact and trim bias from description. * Thu Apr 26 2018 t.gruner@katodev.de - Initial release 0.5.0