File pothos.spec of Package pothos
# spec file for package pothos
#
# Copyright (c) 2017-2020, Martin Hauke <mardnh@gmx.de>
#
# 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 modules_version 0.7
%define use_system_poco 1
%if 0%{?suse_version} > 1500
%define use_system_qwt 1
%else
%define use_system_qwt 0
%endif
Name: pothos
Version: 0.7.0
Release: 0
Summary: Pothos dataflow software suite
License: BSL-1.0
Group: Productivity/Hamradio/Other
URL: https://github.com/pothosware/pothos/
#Git-Clone: https://github.com/pothosware/pothos.git
Source: %{name}-%{version}.tar.xz
Patch0: 0001-Fix-call-template-deduction-for-OSX.patch
Patch1: 0002-Fix-invalid-pointer-cast-by-adding-unused-args-argum.patch
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: gcc-c++
# for git-version-gen
BuildRequires: git-core
BuildRequires: graphviz
BuildRequires: hicolor-icon-theme
BuildRequires: nlohmann_json-devel
BuildRequires: pkgconfig
BuildRequires: python3-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(SoapySDR)
BuildRequires: pkgconfig(portaudio-2.0)
Requires: python3-numpy
%if 0%{?use_system_qwt}
BuildRequires: qwt6-devel
%endif
%if 0%{?use_system_poco}
BuildRequires: poco-devel
%endif
%ifarch x86_64
BuildRequires: libnuma-devel
%endif
%description
The Pothos project is a complete data-flow framework for creating topologies
of interconnected processing blocks. Topologies can be designed and tested
graphically, and deployed over a network. The Pothos framework API is sleek
and smart, enabling users to quickly create custom processing blocks with
minimal boiler-plate.
Processing blocks can support compuational offload and integration with SoC
and DMA devices.
The project also has a diverse set of processing and hardware support toolkits.
%package devel
Summary: Development Files for the Pothos dataflow software suite
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
This subpackage contains libraries and header files for developing
applications that want to make use of libraries from the Pothos dataflow
software suite.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%cmake \
%if 0%{?use_system_qwt}
-DQWT_INCLUDE_DIR=%{_includedir}/qt5/qwt6 \
%endif
-DPYTHON_EXECUTABLE=%{_bindir}/python3 \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_AUTOSET_INSTALL_RPATH=FALSE \
-DBUILD_TESTING=OFF
%make_build
%install
%cmake_install
DIR="comms audio blocks python widgets flow spuce plotters"
for d in $DIR; do
mv $d/README.md $d-README.md
mv $d/LICENSE_1_0.txt $d-LICENSE_1_0.txt
mv $d/Changelog.txt $d-Changelog.txt
done
# Desktop files
install -Dpm0644 flow/icons/PothosFlow.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/pothos-flow.png
install -Dpm0644 flow/Desktop/pothos-flow.desktop %{buildroot}%{_datadir}/applications/pothos-flow.desktop
%suse_update_desktop_file -G PothosFlow -r %{buildroot}%{_datadir}/applications/pothos-flow.desktop Network HamRadio
# remove unneeded files
rm -r %{buildroot}/%{_datadir}/Pothos/Desktop/
# remove spuce binaries
rm -f %{buildroot}/%{_bindir}/spuce_*
%fdupes %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc *-README.md *-Changelog.txt *-LICENSE_1_0.txt
%{_bindir}/PothosFlow
%{_bindir}/PothosUtil
%{_libdir}/libPothos.so.*
%{_libdir}/libPothosPlotterUtils.so.*
%{_libdir}/libPothosQtColorPicker.so.*
%dir %{_libdir}/Pothos
%dir %{_libdir}/Pothos/modules%{modules_version}
%dir %{_libdir}/Pothos/modules%{modules_version}/audio
%{_libdir}/Pothos/modules%{modules_version}/audio/*.so
%dir %{_libdir}/Pothos/modules%{modules_version}/blocks
%{_libdir}/Pothos/modules%{modules_version}/blocks/*.so
%dir %{_libdir}/Pothos/modules%{modules_version}/comms
%{_libdir}/Pothos/modules%{modules_version}/comms/*.so
%dir %{_libdir}/Pothos/modules%{modules_version}/flow
%{_libdir}/Pothos/modules%{modules_version}/flow/*.so
%dir %{_libdir}/Pothos/modules%{modules_version}/proxy
%dir %{_libdir}/Pothos/modules%{modules_version}/proxy/environment
%{_libdir}/Pothos/modules%{modules_version}/proxy/environment/*.so
%dir %{_libdir}/Pothos/modules%{modules_version}/plotters
%{_libdir}/Pothos/modules%{modules_version}/plotters/*.so
%dir %{_libdir}/Pothos/modules%{modules_version}/PothosTestBlocks
%{_libdir}/Pothos/modules%{modules_version}/PothosTestBlocks/libPythonTestBlocks.so
%dir %{_libdir}/Pothos/modules%{modules_version}/soapy
%{_libdir}/Pothos/modules%{modules_version}/soapy/*.so
%dir %{_libdir}/Pothos/modules%{modules_version}/widgets
%{_libdir}/Pothos/modules%{modules_version}/widgets/*.so
%{_datadir}/applications/pothos-flow.desktop
%{_datadir}/icons/hicolor/*/apps/pothos-flow.png
## python
%{python3_sitearch}/PothosTestBlocks
%{python3_sitearch}/Pothos
## bundled Poco
%if ! %{?use_system_poco}
%{_libdir}/libPocoFoundation.so.24
%{_libdir}/libPocoJSON.so.24
%{_libdir}/libPocoNet.so.24
%{_libdir}/libPocoUtil.so.24
%{_libdir}/libPocoXML.so.24
%endif
## bundled Qwt
%if ! %{?use_system_qwt}
%{_libdir}/libPothosQwt.so.6.1.3
%endif
## bundled muparserx
%{_libdir}/libmuparserx.so.4.0.8
## bundled spuce
%{_libdir}/libspuce.so.0.4.3
%files devel
%{_includedir}/Pothos/
%dir %{_datadir}/cmake/Pothos/
%{_datadir}/cmake/Pothos/*.cmake
%{_datadir}/cmake/Pothos/PothosPythonBlockFactory.in.cpp
%{_libdir}/pkgconfig/Pothos.pc
%{_libdir}/libPothos.so
%{_libdir}/libPothosQtColorPicker.so
%{_libdir}/libPothosPlotterUtils.so
### external stuff
## bundled Poco
%if ! %{?use_system_poco}
%{_includedir}/Poco/
%{_libdir}/libPocoJSON.so
%{_libdir}/libPocoNet.so
%{_libdir}/libPocoUtil.so
%{_libdir}/libPocoXML.so
%{_libdir}/libPocoFoundation.so
%endif
## bundled Qwt
%if ! %{?use_system_qwt}
%{_libdir}/libPothosQwt.so
%endif
## bundled muparserx
%{_includedir}/muparserx/
%{_libdir}/libmuparserx.so
%{_libdir}/pkgconfig/muparserx.pc
%dir %{_datadir}/cmake/muparserx/
%{_datadir}/cmake/muparserx/muparserxConfig.cmake
%{_datadir}/cmake/muparserx/muparserxConfigVersion.cmake
## bundled spuce
%{_includedir}/spuce/
%{_libdir}/libspuce.so
%dir %{_datadir}/cmake/spuce/
%{_datadir}/cmake/spuce/SpuceConfig.cmake
%{_datadir}/cmake/spuce/SpuceConfigVersion.cmake
%changelog