File libfobos.spec of Package libfobos
#
# spec file for package libcyberradio
#
# Copyright (c) 2025 SUSE LLC
#
# 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/
#
Name: libfobos
Version: 2.3.2
Release: 0
Summary: RigExpert Fobos SDR API
License: LGPL-2.1
Group: Productivity/Hamradio/Other
Url: https://github.com/rigexpert/libfobos
#Git-Clone: https://github.com/rigexpert/libfobos.git
Source: https://github.com/rigexpert/libfobos/archive/refs/tags/v.%{version}.tar.gz#/%{name}-v.%{version}.tar.gz
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: libusb-1_0-devel
Requires: fobos-udev
%description
This is the Fobos SDR receiver host software API shared library. Lightweight and
easy to start.
%package devel
Summary: Development files for libcyberradio
Group: Development/Libraries/Other
Requires: %{name} = %{version}
%description devel
The libcyberradio Shared Library is a C++ library that provides core utility
classes for many CyberRadio applications.
%package -n fobos-udev
Summary: Udev rules for Fobos SDR
Group: Hardware/Other
BuildArch: noarch
Requires(pre): shadow
%description -n fobos-udev
Udev rules for Fobos SDR driver
%prep
%setup -q -n %{name}-v.%{version}
%build
%cmake
%cmake_build
%install
%cmake_install
# move udev rule
mkdir -p %{buildroot}%{_udevrulesdir}
mv %{buildroot}/etc/udev/rules.d/fobos-sdr.rules %{buildroot}%{_udevrulesdir}/50-fobos-sdr.rules
%check
%post -n %{name} -p /sbin/ldconfig
%postun -n %{name} -p /sbin/ldconfig
%post -n fobos-udev
%udev_rules_update
%postun -n fobos-udev
%udev_rules_update
%files
%doc README.md
%{_libdir}/%{name}.so
%files devel
%{_includedir}/fobos.h
%{_libdir}/pkgconfig/%{name}.pc
%files -n fobos-udev
%{_udevrulesdir}/50-fobos-sdr.rules
%changelog