# Upstream version is 2.0.0 but has no release %global snapdate 20230730 %global commit 8ab957a127df73c21583e4609523b8f228a4367c %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: libxeddsa Version: 2.0.0 Release: 3^%{snapdate}git%{shortcommit}%{?dist} Summary: Toolkit around Curve25519 and Ed25519 key pairs License: MIT URL: https://github.com/Syndace/%{name} Source0: https://github.com/Syndace/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildRequires: make BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libsodium-devel BuildRequires: libsodium-static # For docs: BuildRequires: doxygen BuildRequires: python3-sphinx BuildRequires: python3-sphinx_rtd_theme BuildRequires: python3-breathe ##Requires: %description A toolkit around Curve25519 and Ed25519 key pairs, with a focus on conversion between the two. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package doc Summary: Documentation for %{name} BuildArch: noarch Requires: %{name} = %{version}-%{release} %description doc The %{name}-doc package contains HTML documentation for developing applications that use %{name}. %prep %autosetup -n %{name}-%{commit} %build %cmake # results are in redhat-linux-build/ %cmake_build # Build HTML documentation pushd docs/ make html # results are in docs/_build/html/ popd %install # cmake reported a warning in the first step of %%build: # # LIB_INSTALL_DIR=/usr/lib64 is not used by the project, we need to move file # location of the library in the right directory. # # CMAKE_INSTALL_DO_STRIP is not supported but the binary is stripped later. # # Library file properties: # ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, # BuildID[sha1]=f7c376e16241a294a7264cec64c17bab8d2276b2, with debug_info, not # stripped # # We need to specify the version of the library in the filename. Library does # not have a main function (int main(void)), so we cannot link with ld, and we # cannot set the SONAME manually with gcc. install -D -p -m 0755 bin/dynamic/%{name}.so %{buildroot}%{_libdir}/%{name}.so.0.0.0 # INCLUDE_INSTALL_DIR=/usr/include is not used by the project install -D -p -m 0644 include/xeddsa.h %{buildroot}%{_includedir}/xeddsa.h # Install html docs mkdir -p %{buildroot}%{_pkgdocdir}/ cp -pr docs/_build/html %{buildroot}%{_pkgdocdir}/ # Remove buildinfo sphinx documentation rm -rf %{buildroot}%{_pkgdocdir}/html/.buildinfo %check %ctest -C Debug %files %license LICENSE %doc CHANGELOG.md README.md %{_libdir}/%{name}.so.0.0.0 %files devel %{_libdir}/%{name}.so %{_includedir}/xeddsa.h %files doc %{_pkgdocdir}/html/ %changelog * Wed Aug 2 2023 Matthieu Saulnier - 2.0.0-3^20230730git8ab957a - Package Review RHBZ#2227804: - Improve file ownership in doc subpackage - Add more comments about soname of the library * Tue Aug 1 2023 Matthieu Saulnier - 2.0.0-2^20230730git8ab957a - Package Review RHBZ#2227804: - Remove %%cmake_install then manually install library file in %%install section * Mon Jul 31 2023 Matthieu Saulnier - 2.0.0-1^20230730git8ab957a - Package Review RHBZ#2227804: - Initial packaging