File gr-dsd.spec of Package gr-dsd

#
# spec file for package gr-dsd
#
# 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 libname libgnuradio-dsd

Name:           gr-dsd
Version:        1.0.0git20180918
Release:        0
Summary:        GNU Radio block for Digital Speech Decoder
License:        GPL-3-or-later
Group:          Productivity/Hamradio/Other
URL:            https://github.com/argilo/gr-dsd
#Git-Clone:     https://github.com/argilo/gr-dsd.git
Source:         %{name}-%{version}.tar.gz
Patch1:         gr-dsd-Remove-exitflag-and-some-other-header-cruft.patch
%if 0%{?suse_version} >= 1330
BuildRequires:  libboost_filesystem-devel
BuildRequires:  libboost_system-devel
%else
BuildRequires:  boost-devel
%endif
BuildRequires:  cmake
BuildRequires:  cppunit-devel
BuildRequires:  doxygen 
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gnuradio-devel >= 3.7.9
BuildRequires:  itpp-devel
BuildRequires:  libsndfile-devel
BuildRequires:  python2-devel
BuildRequires:  swig

%description
The goal of this project is to package Digital Speech Decoder (DSD) as a
GNU Radio block, so that it can be easily used with software radio peripherals
such as the Ettus Research USRP or RTL2832U-based USB TV tuners.


%package -n %{libname}
Summary:        Library for GNU Radio block for Digital Speech Decoder
Group:          Hardware/Other

%description -n %{libname}
This is library for GNU Radio block for Digital Speech Decoder


%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-dsd, the GNU Radio block for Digital Speech Decoder


%package doc
Summary:        Documentation for gr-dsd
Group:          Documentation/Other
BuildArch:      noarch

%description doc
Documentation for gr-dsd GNU Radio.


%prep
%setup -q -n %{name}
%patch1 -p1 


%build
%cmake \
    -DENABLE_DOXYGEN=1
make %{?_smp_mflags}


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

mkdir -p %{buildroot}%{_docdir}
mv %{buildroot}/%{_datadir}/doc/%{name} %{buildroot}%{_docdir}
%fdupes -s %{buildroot}%{_docdir}/%{name}


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


%files
%defattr(-, root, root)
%doc README MANIFEST.md
%{python_sitearch}/gr_dsd
%{_datadir}/gnuradio/grc/blocks/*.?ml
%exclude %{_docdir}/%{name}/html
%exclude %{_docdir}/%{name}/xml

%files -n %{libname}
%defattr(-, root, root)
%{_libdir}/%{libname}*.so

%files devel
%defattr(-, root, root)
%{_includedir}/gr_dsd

%files doc
%defattr(-, root, root)
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/html
%{_docdir}/%{name}/xml

%changelog
openSUSE Build Service is sponsored by