Files
bitsery/bitsery.spec

109 lines
3.6 KiB
RPMSpec

#
# spec file for package bitsery
#
# 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: bitsery
Version: 5.2.1
Release: 0
Summary: Header only C++ binary serialization library
License: MIT
URL: https://github.com/fraillt/bitsery
Source: https://github.com/fraillt/bitsery/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: gmock
BuildRequires: gtest
%description
Header only C++ binary serialization library. It is designed around the
networking requirements for real-time data delivery, especially for games.
Features:
* Cross-platform compatible.
* Optimized for speed and space.
* No code generation required: no IDL or metadata, just use your types
directly.
* Configurable runtime error checking on deserialization.
* Can read/write from any source: stream (file, network stream. etc... ),
or buffer (vector, c-array, etc...).
* Don't pay for what you don't use! - customize your serialization via
extensions. Some notable extensions allow:
* fine-grained bit-level serialization control.
* forward/backward compatibility for your types.
* smart and raw pointers with allocators support and customizable
runtime polymorphism.
* Easily extendable for any type.
* Allows brief (similar to cereal) or/and verbose syntax for better
serialization control.
* Configurable endianness support.
* No macros.
%package devel
Summary: Header only C++ binary serialization library
%description devel
Header only C++ binary serialization library. It is designed around the
networking requirements for real-time data delivery, especially for games.
Features:
* Cross-platform compatible.
* Optimized for speed and space.
* No code generation required: no IDL or metadata, just use your types
directly.
* Configurable runtime error checking on deserialization.
* Can read/write from any source: stream (file, network stream. etc... ),
or buffer (vector, c-array, etc...).
* Don't pay for what you don't use! - customize your serialization via
extensions. Some notable extensions allow:
* fine-grained bit-level serialization control.
* forward/backward compatibility for your types.
* smart and raw pointers with allocators support and customizable
runtime polymorphism.
* Easily extendable for any type.
* Allows brief (similar to cereal) or/and verbose syntax for better
serialization control.
* Configurable endianness support.
* No macros.
%prep
%autosetup
# Remove zero-length file
rm doc/design/function_overload.md
%build
%cmake -DBITSERY_BUILD_EXAMPLES:BOOL=ON \
-DBITSERY_BUILD_TESTS:BOOL=ON
%cmake_build
%install
%cmake_install
%check
# Tests are inside build/tests folder, cannot use %%ctest macros.
cd build/tests
%{_bindir}/ctest --output-on-failure --force-new-ctest-process -j%{getncpus}
%files devel
%license LICENSE
%doc README.md
%doc doc
%{_includedir}/%{name}
%{_libdir}/cmake/%{name}
%changelog