File gr-bluetooth.spec of Package gr-bluetooth
#
# spec file for package gr-bluetooth
#
# Copyright (c) 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 ver 0.0.0git20211020
%define libname libgnuradio-bluetooth
Name: gr-bluetooth
Version: %{ver}
Release: 0.0
Summary: Bluetooth receiver implementation for GNU Radio
License: GPL-2.0-or-later
Group: Productivity/Hamradio/Other
URL: https://github.com/greatscottgadgets/gr-bluetooth
#Git-Clone: https://github.com/greatscottgadgets/gr-bluetooth.git
Source: %{name}-%{version}.tar.gz
Patch0: %{name}-find-doxygen-2.patch
Patch1: %{name}-port-to-gr38.patch
BuildRequires: cmake
BuildRequires: cppunit-devel
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: fftw3-devel
BuildRequires: gcc-c++
BuildRequires: gnuradio-devel >= 3.7.9
BuildRequires: libboost_atomic-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: libbtbb-devel
BuildRequires: python3-devel
BuildRequires: python3-six
BuildRequires: swig
%description
gr-bluetooth is an implementation of the Bluetooth baseband layer for GNU Radio
for experimentation and teaching students about Software Defined Radio, it
should not be used for Bluetooth communications as it is not a complete
software stack.
%package -n %{libname}
Summary: Bluetooth receiver implementation processing library
Group: Hardware/Other
%description -n %{libname}
This is library for Bluetooth receiver implementationdor GNU Radio
%package devel
Summary: Headers for gr-bluetooth
Group: Development/Libraries/Other
Requires: %{name} = %{version}-%{release}
Requires: %{libname} = %{version}-%{release}
AutoReq: on
%description devel
Library headers for gr-bluetooth, the Bluetooth receiver implementationdor GNU Radio
%package doc
Summary: Documentation for gr-bluetooth
Group: Documentation/Other
BuildArch: noarch
%description doc
Documentation for gr-bluetooth for GNU Radio.
%package samples
Summary: Example files for gr-bluetooth
Group: Productivity/Hamradio/Other
BuildArch: noarch
Requires: %{name}
%description samples
Sample files for using with gr-bluetooth OOT module
%prep
%setup -q -n %{name}
rm MANIFEST.md
%patch1 -p 1
%patch0 -p 1
%build
%cmake \
-DENABLE_DOXYGEN=1
%cmake_build
%install
%cmake_install
find %{buildroot}%{_libdir}/python*/site-packages/ -name '*.pyo' -exec rm {} \;
mkdir -p %{buildroot}%{_docdir}/%{name}
mv %{buildroot}/%{_datadir}/doc/gnuradio*/* %{buildroot}%{_docdir}/%{name}
%fdupes -s %{buildroot}%{_docdir}/%{name}
# install sample files
install -dm 0755 %{buildroot}%{_datadir}/gr-bluetooth
install -pm 0644 samples/* %{buildroot}%{_datadir}/gr-bluetooth
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files
%doc README.md
%{_bindir}/btrx
%{python3_sitearch}/gr_bluetooth
%{_datadir}/gnuradio/grc/blocks/*.?ml
%exclude %{_docdir}/%{name}/html
%exclude %{_docdir}/%{name}/xml
%files -n %{libname}
%{_libdir}/libgnuradio-bluetooth*.so
%files devel
%{_includedir}/gr_bluetooth
%files doc
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/html
%{_docdir}/%{name}/xml
%files samples
%{_datadir}/gr-bluetooth
%changelog