Name: leandvb Version: 2.0.1 Release: 1%{?dist} Summary: Software-defined DVB-S2 demodulator License: GPLv3 URL: https://github.com/Blockstream/leansdr Source0: %{name}-%{version}.tar.gz BuildRequires: make BuildRequires: gcc-c++ BuildRequires: git BuildRequires: libX11-devel # On CentOS 7, the default gcc version is too old. Install a newer version: %if 0%{?rhel} == 7 BuildRequires: centos-release-scl BuildRequires: devtoolset-7 %endif Requires: libX11 %description Leandvb is a lightweight, portable software-defined DVB-S2 demodulator. %global debug_package %{nil} %prep %setup -q %build %if 0%{?rhel} == 7 # Compile using the gcc version from devtoolset-7 on CentOS 7 scl enable devtoolset-7 'make -C src/apps leandvb' scl enable devtoolset-7 'make -C LDPC CXX=g++ ldpc_tool' %else %make_build -C src/apps leandvb %make_build -C LDPC CXX=g++ ldpc_tool %endif %install mkdir -p $RPM_BUILD_ROOT%{_bindir} cd src/apps install leandvb $RPM_BUILD_ROOT%{_bindir} cd ../../LDPC/ install ldpc_tool $RPM_BUILD_ROOT%{_bindir} %files %defattr(-,root,root) %{_bindir}/leandvb %{_bindir}/ldpc_tool