%global toolchain clang Summary: Cryptographic library Name: libbee2 Version: 2.1.0 Release: 1%{?dist} License: GPLv3 Url: http://apmi.bsu.by/resources/tools.html Source0: https://github.com/agievich/bee2/archive/refs/tags/v%{version}.tar.gz BuildRequires: cmake BuildRequires: clang BuildRequires: doxygen BuildRequires: gzip %description Bee2 is a cryptographic library which implements cryptographic algorithms and protocols standardized in Belarus. Additionally, Bee2 implements digital signature algorithms standardized in Russia and Ukraine. %package devel Summary: Files for development of applications which will use bee2 Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Bee2 is a cryptographic library which implements cryptographic algorithms and protocols standardized in Belarus. The bee2-devel package contains files needed to develop applications which support these cryptographic algorithms and protocols. %package -n bsum Summary: Calculation and verification of hash values Requires: %{name}%{?_isa} = %{version}-%{release} %description -n bsum Bsum implements calculation and verification of hash values using the algorithms STB 34.101.31 (belt-hash) and STB 34.101.77 (bash32, bash64, ..., bash512). The command-line interface of the utility is as close as possible to the interfaces of similar sha1sum and sha256sum utilities. %prep %autosetup -n bee2-%{version} # Generate MAN pages sed -i 's/GENERATE_MAN = NO/GENERATE_MAN = YES/g' doc/bee2.doxy # Link to shared library sed -i 's/bee2_static/bee2/g' apps/bsum/CMakeLists.txt sed -i 's/bee2_static/bee2/g' test/CMakeLists.txt %build CLFAGS="${CFLAGS} -fPIE" LDFLAGS="${LDFLAGS} -pie" %cmake -DBUILD_DOC=ON\ -DCMAKE_C_COMPILER=clang\ -DBUILD_TESTS=ON\ -DBUILD_PIC=ON\ -DCMAKE_BUILD_TYPE=RELEASE %cmake_build %install %cmake_install # Compress and install man pages for file in doc/man/man3/*.3; do gzip $file done mkdir -p %{buildroot}%{_mandir}/man3 install -m 644 doc/man/man3/*.3.gz %{buildroot}%{_mandir}/man3/ %check %ctest %files %{_libdir}/libbee2.so.2.* %license LICENSE %doc AUTHORS.md README.md # Do not ship static library %exclude %{_libdir}/libbee2_static.a # Do not ship HTML documentation %exclude %{_datadir}/bee2 %{_mandir}/man3/*.3.gz %files devel %{_includedir}/bee2/core/*.h %{_includedir}/bee2/crypto/*.h %{_includedir}/bee2/*.h %{_includedir}/bee2/math/*.h %{_libdir}/libbee2.so %files -n bsum %{_bindir}/bsum %changelog * Mon Jan 30 2023 Benson Muite - 2.1.0-1 - Package for inclusion in Fedora - Based on https://bugzilla.redhat.com/show_bug.cgi?id=1851405 * Sun Jul 12 2020 Yury Kashcheyeu - 2.0.5-9 - Initial RPM release