rtl-sdr/rtl-sdr.spec

112 lines
2.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package rtl-sdr
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 sover 0
%define libname librtlsdr%{sover}
Name: rtl-sdr
Version: 0.5.3+git.20161127
Release: 0
Summary: Support programs for RTL2832
License: GPL-2.0
Group: Productivity/Hamradio/Other
Url: http://sdr.osmocom.org/trac/wiki/rtl-sdr
Source: %{name}-%{version}.tar.xz
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
Group: Hardware/Other
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
%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
%setup -q
%build
%cmake \
-DDETACH_KERNEL_DRIVER=ON
make %{?_smp_mflags}
%install
%cmake_install
rm %{buildroot}%{_libdir}/librtlsdr.a
install -D -p -m 0644 ./rtl-sdr.rules \
%{buildroot}%{_udevrulesdir}/10-rtl-sdr.rules
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%post udev
%udev_rules_update
%postun udev
%udev_rules_update
%files
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_bindir}/rtl_adsb
%{_bindir}/rtl_eeprom
%{_bindir}/rtl_fm
%{_bindir}/rtl_power
%{_bindir}/rtl_sdr
%{_bindir}/rtl_tcp
%{_bindir}/rtl_test
%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/librtlsdr.so.%{sover}*
%files udev
%defattr(-,root,root)
%{_udevrulesdir}/10-rtl-sdr.rules
%files devel
%defattr(-,root,root)
%{_libdir}/librtlsdr.so
%{_includedir}/rtl-sdr.h
%{_includedir}/rtl-sdr_export.h
%{_libdir}/pkgconfig/librtlsdr.pc
%changelog