%global pkgvers 1 %global scdate0 20211129 %global schash0 94445d48ab2827776ed51249e44db376bed82394 %global branch0 master %global source0 https://github.com/deepsig/libsigmf.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: libsigmf Version: 1.0.0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: C++ library for working with SigMF metadata License: Apache BuildArch: noarch URL: https://github.com/deepsig/libsigmf BuildRequires: cmake gcc-c++ git BuildRequires: flatbuffers-devel json-devel /usr/bin/flatc %define __cmake_in_source_build 1 %description A header-only C++ library for working with SigMF metadata. %package devel Summary: Development for %{name} BuildArch: noarch %description devel Development files for %{name} library. %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller # fix naming %if (0%{?fedora} == 37) || (0%{?rhel} == 9) sed -i 's|Flatbuffers|FlatBuffers|' CMakeLists.txt %endif %build mkdir -p build pushd build %cmake -Wno-dev .. \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DENABLE_EXAMPLES=OFF \ -DUSE_SYSTEM_JSON=ON \ -DUSE_SYSTEM_FLATBUFFERS=ON make %{?_smp_mflags} VERBOSE=1 popd %install rm -rf %{buildroot} pushd build make install DESTDIR=%{buildroot} popd # fix header sed -i 's|, nullptr, names|, nullptr, nullptr, names|g' \ %{buildroot}/%{_includedir}/sigmf/sigmf_core_generated.h %files devel %doc README.md %license LICENSE %{_includedir}/* %{_libdir}/* %changelog * Tue Aug 25 2020 Balint Cristian - github update releases