2017-03-08 10:09:16 +01:00
|
|
|
#
|
|
|
|
# spec file for package rtl-sdr
|
|
|
|
#
|
2018-06-11 09:17:12 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-03-08 10:09:16 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-08-28 10:08:30 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-03-08 10:09:16 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define sover 0
|
|
|
|
%define libname librtlsdr%{sover}
|
2017-04-15 22:40:57 +02:00
|
|
|
%define rtlsdr_group rtlsdr
|
2017-03-08 10:09:16 +01:00
|
|
|
Name: rtl-sdr
|
2018-08-28 09:07:31 +02:00
|
|
|
Version: 0.6.0
|
2017-03-08 10:09:16 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Support programs for RTL2832
|
2018-08-28 09:07:31 +02:00
|
|
|
License: GPL-2.0-or-later
|
2017-03-08 10:09:16 +01:00
|
|
|
Group: Productivity/Hamradio/Other
|
2018-08-28 10:08:30 +02:00
|
|
|
URL: http://sdr.osmocom.org/trac/wiki/rtl-sdr
|
2017-04-15 22:40:57 +02:00
|
|
|
#Git-Clone: https://git.osmocom.org/rtl-sdr
|
2018-08-28 09:07:31 +02:00
|
|
|
Source: https://github.com/steve-m/librtlsdr/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2017-04-15 22:40:57 +02:00
|
|
|
Patch0: 0001-Better-udev-handling.patch
|
2017-03-08 10:09:16 +01:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: pkgconfig(libusb-1.0)
|
|
|
|
BuildRequires: pkgconfig(udev)
|
|
|
|
|
|
|
|
%description
|
|
|
|
Programs that controls Realtek RTL2832 based DVB dongle in raw mode, so
|
|
|
|
it can be used as a SDR receiver.
|
|
|
|
|
|
|
|
%package -n %{libname}
|
|
|
|
Summary: SDR driver for RTL2832
|
2017-03-23 17:47:57 +01:00
|
|
|
Group: System/Libraries
|
2017-03-08 10:09:16 +01:00
|
|
|
Requires: %{name}-udev
|
|
|
|
|
|
|
|
%description -n %{libname}
|
|
|
|
Library to run Realtek RTL2832 based DVB dongle as a SDR receiver.
|
|
|
|
|
|
|
|
%package udev
|
|
|
|
Summary: Udev rules for RTL2832
|
|
|
|
Group: Hardware/Other
|
2017-04-23 18:23:20 +02:00
|
|
|
Requires(pre): shadow
|
2017-03-08 10:09:16 +01:00
|
|
|
|
|
|
|
%description udev
|
|
|
|
Udev rules for rtl-sdr driver
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for rtl-sdr
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Library headers for rtl-sdr driver.
|
|
|
|
|
|
|
|
%prep
|
2018-08-28 09:07:31 +02:00
|
|
|
%setup -q -n librtlsdr-%{version}
|
2017-04-15 22:40:57 +02:00
|
|
|
%patch0 -p1
|
2017-03-08 10:09:16 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%cmake \
|
2017-04-15 22:40:57 +02:00
|
|
|
-DINSTALL_UDEV_RULES=ON \
|
|
|
|
-DUDEV_RULES_PATH=%{_udevrulesdir} \
|
|
|
|
-DUDEV_RULES_GROUP=%{rtlsdr_group} \
|
2018-08-28 10:08:30 +02:00
|
|
|
-DDETACH_KERNEL_DRIVER=ON \
|
|
|
|
-Wno-dev
|
|
|
|
%make_jobs
|
2017-03-08 10:09:16 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
rm %{buildroot}%{_libdir}/librtlsdr.a
|
|
|
|
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
2018-08-28 10:08:30 +02:00
|
|
|
|
2017-04-23 18:23:20 +02:00
|
|
|
%pre udev
|
|
|
|
getent group %{rtlsdr_group} >/dev/null || groupadd -r %{rtlsdr_group}
|
|
|
|
|
2017-03-08 10:09:16 +01:00
|
|
|
%post udev
|
|
|
|
%udev_rules_update
|
|
|
|
|
|
|
|
%postun udev
|
|
|
|
%udev_rules_update
|
|
|
|
|
|
|
|
%files
|
2018-08-28 10:08:30 +02:00
|
|
|
%license COPYING
|
|
|
|
%doc AUTHORS README
|
2017-03-08 10:09:16 +01:00
|
|
|
%{_bindir}/rtl_adsb
|
|
|
|
%{_bindir}/rtl_eeprom
|
|
|
|
%{_bindir}/rtl_fm
|
|
|
|
%{_bindir}/rtl_power
|
|
|
|
%{_bindir}/rtl_sdr
|
|
|
|
%{_bindir}/rtl_tcp
|
|
|
|
%{_bindir}/rtl_test
|
|
|
|
|
|
|
|
%files -n %{libname}
|
|
|
|
%{_libdir}/librtlsdr.so.%{sover}*
|
|
|
|
|
|
|
|
%files udev
|
2017-04-15 22:40:57 +02:00
|
|
|
%{_udevrulesdir}/rtl-sdr.rules
|
2017-03-08 10:09:16 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_libdir}/librtlsdr.so
|
|
|
|
%{_includedir}/rtl-sdr.h
|
|
|
|
%{_includedir}/rtl-sdr_export.h
|
|
|
|
%{_libdir}/pkgconfig/librtlsdr.pc
|
|
|
|
|
|
|
|
%changelog
|