File gr-fosphor.spec of Package gr-fosphor
#
# spec file for package gr-fosphor
#
# Copyright (c) 2013-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-fosphor
%define sover 3_8_0git
Name:           gr-fosphor
Version:        3.8.0git20191208
Release:        9.1
Summary:        GNURadio block for spectrum visualization
License:        GPL-3.0
Group:          Productivity/Hamradio/Other
URL:            https://cgit.osmocom.org/gr-fosphor/
#Git-Clone:     https://git.osmocom.org/gr-fosphor/
Source:         %{name}-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  cppunit-devel
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  fftw3-devel
BuildRequires:  freetype2-devel
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
BuildRequires:  gnuradio-devel >= 3.8.0.0
BuildRequires:  libboost_atomic-devel
BuildRequires:  libboost_chrono-devel
BuildRequires:  libboost_date_time-devel
BuildRequires:  libboost_filesystem-devel
BuildRequires:  libboost_system-devel
BuildRequires:  libboost_program_options-devel
BuildRequires:  libboost_regex-devel
BuildRequires:  libboost_test-devel
BuildRequires:  libboost_thread-devel
BuildRequires:  libglfw-devel > 3.0
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  ocl-icd-devel
BuildRequires:  opencl-headers
BuildRequires:  orc
BuildRequires:  python3-devel
BuildRequires:  python3-six
BuildRequires:  swig
%description
GNURadio block for spectrum visualization using GPU
%package -n %{libname}%{sover}
Summary:        Library for gr-fosphor
Group:          Hardware/Other
%description -n %{libname}%{sover}
Library for gr-fosphor, spectrum visualization using GPU for GNU Radio.
%package devel
Summary:        Development files for gr-fosphor
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
%description devel
Headers for gr-fosphor module for GNU Radio.
%package doc
Summary:        Documentation for gr-fosphor
Group:          Documentation/Other
BuildArch:      noarch
Requires:       %{name} = %{version}-%{release}
%description doc
Documentation for gr-fosphor module for GNU Radio.
%prep
%setup -q -n %{name}
%build
%cmake \
    -DENABLE_DOXYGEN=1
%cmake_build
make -C docs
%install
%cmake_install
find %{buildroot}%{_libdir}/python*/site-packages/ -name '*.pyo' -exec rm {} \;
#move docs to proper location
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
%{_datadir}/gnuradio/grc/blocks/fosphor*.?ml
%{python3_sitearch}/gnuradio/fosphor
%dir %{_docdir}/%{name}
%doc docs/README.fosphor AUTHORS
%license COPYING
%exclude %{_docdir}/%{name}/html
%exclude %{_docdir}/%{name}/xml
%files -n %{libname}%{sover}
%{_libdir}/%{libname}*.so.*
%files devel
%{_libdir}/%{libname}*.so
%{_includedir}/gnuradio/fosphor
%{_includedir}/gnuradio/swig/fosphor_swig*.i
%{_libdir}/cmake/gnuradio/gnuradio-fosphor*.cmake
%files doc
%{_docdir}/%{name}/html
%{_docdir}/%{name}/xml
%changelog