File gr-air-modes.spec of Package gr-air-modes

#
# spec file for package gr-air-modes
#
# Copyright (c) 2012-2021 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 libair_modes
%define sover 1_0_0git

Name:           gr-air-modes
Version:        1.0.0git20200506
Release:        10.1
Summary:        SDR receiver for Mode S transponder signals
License:        GPL-2.0
Group:          Productivity/Hamradio/Other
URL:            https://github.com/bistromath/gr-air-modes
Source:         %{name}-%{version}.tar.gz
Patch1:         %{name}-remove-html-timestamp.patch
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  fdupes
BuildRequires:  gmp-devel
BuildRequires:  gnuradio-devel >= 3.8.0
BuildRequires:  libboost_atomic-devel
BuildRequires:  libboost_chrono-devel
BuildRequires:  libboost_date_time-devel
BuildRequires:  libboost_filesystem-devel
BuildRequires:  libboost_program_options-devel
BuildRequires:  libboost_regex-devel
BuildRequires:  libboost_system-devel
BuildRequires:  libboost_test-devel
BuildRequires:  libboost_thread-devel
BuildRequires:  orc
BuildRequires:  pkg-config
BuildRequires:  python3-devel
BuildRequires:  python3-pyzmq-devel
BuildRequires:  python3-qt5-devel
BuildRequires:  qwt6-qt5-devel
BuildRequires:  swig
Requires:       python3-pyzmq

%description
gr-air-modes implements a software-defined radio receiver for Mode S
transponder signals, including ADS-B reports from equipped aircraft.



%package -n %{libname}%{sover}
Summary:        GNU Radio Mode S module for GNU Radio
Group:          Hardware/Other

%description -n %{libname}%{sover}
Library to implement a software-defined radio receiver for Mode S
transponder signals.


%package devel
Summary:        Development files for gnuradio-air-modes
Group:          Development/Libraries/Other
Requires:       %{libname}%{sover} = %{version}-%{release}

%description devel
Headers for gnuradio-air-modes module for GNU Radio.


%package doc
Summary:        Documentation for gnuradio-osmosdr
Group:          Documentation/Other
BuildArch:      noarch
Requires:       %{name} = %{version}-%{release}

%description doc
Documentation for gnuradio-air-modes module for GNU Radio.


%prep
%setup -q -n %{name}
%patch1 -p 1 -b .timestamp


%build
%cmake -DENABLE_DOXYGEN=1
%cmake_build
make -C docs


%install
%cmake_install

find %{buildroot}%{_libdir}/python*/site-packages/ -name '*.pyo' -exec rm {} \;

mkdir -p %{buildroot}%{_docdir}/%{name}
mv %{buildroot}/%{_datadir}/doc/*%{name}/html %{buildroot}%{_docdir}/%{name}
mv %{buildroot}/%{_datadir}/doc/*%{name}/xml %{buildroot}%{_docdir}/%{name}

%fdupes -s %{buildroot}%{_docdir}


%post -n %{libname}%{sover} -p /sbin/ldconfig
%postun  -n %{libname}%{sover} -p /sbin/ldconfig


%files
%{_bindir}/modes_*
%{_bindir}/uhd_modes.py
%dir %{_docdir}/%{name}
%{python3_sitearch}/air_modes
%doc AUTHORS README
%license COPYING 
%exclude %{_docdir}/%{name}/html
%exclude %{_docdir}/%{name}/xml

%files -n %{libname}%{sover}
%{_libdir}/%{libname}.so.*

%files devel
%{_libdir}/%{libname}.so
%{_includedir}/gr_air_modes
%{_libdir}/cmake/gr-air-modes

%files doc
%{_docdir}/%{name}/html
%{_docdir}/%{name}/xml


%changelog
openSUSE Build Service is sponsored by