File gr-mesa.spec of Package gr-mesa
#
# spec file for package gr-mesa
#
# Copyright (c) 2018-2022 Wojciech Kazubski, wk@ire.pw.edu.pl
#
# 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 http://bugs.opensuse.org/
#
%define libname libgnuradio-mesa
%define sover 1_0_0git
%define examplesdir %{_libdir}/gnuradio/examples
Name: gr-mesa
Version: 1.0.0git20201107
Release: 1.0.0
Summary: Advanced GNURadio Processing Blocks
License: GPL-3.0
Group: Productivity/Hamradio/Other
URL: https://github.com/ghostop14/gr-mesa
#Git-Clone: https://github.com/ghostop14/gr-mesa.git
Source: %{name}-%{version}.tar.gz
Patch1: %{name}-fix-build-with-boost173.patch
BuildRequires: cmake
BuildRequires: cppunit-devel
BuildRequires: dos2unix
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: fftw3-threads-devel
BuildRequires: gcc-c++
BuildRequires: gnuradio-devel >= 3.8.0.0
BuildRequires: gnuradio-examples
BuildRequires: gr-lfast-devel
BuildRequires: libboost_atomic-devel
BuildRequires: libboost_date_time-devel
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_system-devel
BuildRequires: libboost_thread-devel
BuildRequires: libboost_program_options-devel
BuildRequires: libboost_regex-devel
BuildRequires: libboost_test-devel
BuildRequires: orc
BuildRequires: python3-devel
BuildRequires: python3-six
BuildRequires: swig
%description
Collection of Advanced GNURadio Processing Blocks - Autodoppler,
input selection, and signal detection
%package -n %{libname}%{sover}
Summary: GNU Radio mesa module library
Group: Hardware/Other
%description -n %{libname}%{sover}
GNU Radio module library fo frequency divider
%package devel
Summary: Headers for gr-mesa
Group: Development/Libraries/Other
Requires: %{name} = %{version}-%{release}
Requires: %{libname}%{sover} = %{version}-%{release}
AutoReq: on
%description devel
Library headers for gr-mesa.
%package doc
Summary: Documentation for gr-mesa
Group: Documentation/Other
BuildArch: noarch
Requires: %{libname}%{sover} = %{version}-%{release}
%description doc
Documentation for gr-mesa module for GNU Radio.
%package examples
Summary: Examples for gr-lfast
Group: Productivity/Hamradio/Other
Requires: %{name} = %{version}
Requires: gnuradio-examples
%description examples
Examples for gr-lfast module for GNU Radio.
%prep
%setup -q -n %{name}
%patch1 -p 1
dos2unix README.md
%build
%cmake -DENABLE_DOXYGEN=1
%cmake_build
%install
%cmake_install
find %{buildroot}%{_libdir}/python*/site-packages/ -name '*.pyo' -exec rm {} \;
#move docs
mkdir -p %{buildroot}%{_docdir}
mv %{buildroot}/%{_datadir}/doc/%{name} %{buildroot}%{_docdir}
%fdupes -s %{buildroot}%{_docdir}
#install examples
install -dm 0755 %{buildroot}%{examplesdir}/mesa
install -pm 0644 examples/*.grc %{buildroot}%{examplesdir}/mesa
%post -n %{libname}%{sover} -p /sbin/ldconfig
%postun -n %{libname}%{sover} -p /sbin/ldconfig
%files
%doc MANIFEST.md README.md
%{python3_sitearch}/mesa
%{_datadir}/gnuradio/grc/blocks/*.?ml
%exclude %{_docdir}/%{name}/html
%exclude %{_docdir}/%{name}/xml
%files -n %{libname}%{sover}
%{_libdir}/%{libname}*.so.*
%files devel
%{_libdir}/%{libname}*.so
%{_includedir}/mesa
%{_libdir}/cmake/mesa
%files doc
%{_docdir}/%{name}/html
%{_docdir}/%{name}/xml
%files examples
%{examplesdir}/mesa
%changelog