File limesuite.spec of Package limesuite

# spec file for package limesuite
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017, Martin Hauke <>
# 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

%define sover 20_01-1
%define libname libLimeSuite%{sover}
%define soapy_modver 0.7
Name:           limesuite
Version:        20.01.0
Release:        0
Summary:        Collection of software supporting LMS7-based hardware
License:        Apache-2.0
Group:          Productivity/Hamradio/Other
Patch0:         0001-Remove-some-warnings-LimeRFE-related.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  gnuplot
BuildRequires:  i2c-tools
BuildRequires:  pkgconfig
BuildRequires:  wxWidgets-3_0-nostl-devel
BuildRequires:  pkgconfig(SoapySDR) >= %{soapy_modver}
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(udev)

Lime Suite is a collection of software supporting several hardware
platforms including the LimeSDR, drivers for the LMS7002M transceiver
RFIC, and other tools for developing with LMS7-based hardware. Lime
Suite enables many SDR applications, such as GQRX for example, to
work with supported hardware through the bundled SoapySDR support

%package -n %{libname}
Summary:        Library for Lime Suite
Group:          System/Libraries
Requires:       %{name}-udev

%description -n %{libname}
Lime Suite is a collection of software supporting several hardware
platforms and other tools for developing with LMS7-based hardware.

%package udev
Summary:        Udev rules for LimeSDR
Group:          Hardware/Other

%description udev
Udev rules for Lime Suite

%package devel
Summary:        Development files for libLimeSuite
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}

%description devel
Libraries and header files for developing applications that want to make
use of libLimeSuite.

%package -n soapysdr%{soapy_modver}-module-lms7
Summary:        SoapySDR LMS7 support module
Group:          System/Libraries

%description -n soapysdr%{soapy_modver}-module-lms7
Soapy LMS7 - LimeSDR device support for Soapy SDR.
A Soapy module that supports LimeSDR devices within the Soapy API.

%setup -q -n LimeSuite-%{version}
%patch0 -p1

# HACK: set udev permissions to 666
sed -i 's|MODE="660"|MODE="666"|g' udev-rules/64-limesuite.rules

%cmake \
  -DUDEV_RULES_PATH=%{_udevrulesdir} \
%ifarch x86_64


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

%postun udev

%license COPYING
%doc Changelog.txt
%dir %{_datadir}/Lime

%files udev

%files -n %{libname}

%files devel

%files -n soapysdr%{soapy_modver}-module-lms7
%dir %{_libdir}/SoapySDR
%dir %{_libdir}/SoapySDR/modules%{soapy_modver}