File mingw32-rtl-sdr.spec of Package mingw32-rtl-sdr

# spec file for package mingw32-rtl-sdr
# Copyright (c) 2016, 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 0
%define realname rtl-sdr
%define libname mingw32-librtlsdr%{sover}
Name:           mingw32-%{realname}
Version:        0.5.4+git.20180603
Release:        0
Summary:        Support programs for RTL2832
License:        GPL-2.0-only
Group:          Productivity/Hamradio/Other
Source:         %{realname}-%{version}.tar.xz
### FIXME: disable postbuild-checks ugly workaround for
# E: mingw32-rtl-sdr no-return-in-nonvoid-function /home/abuild/rpmbuild/BUILD/rtl-sdr-0.5.3.git1409081186.d447a2e/src/rtl_tcp.c:246
# -> should be ok since it's a "static void" function
BuildRequires:  -post-build-checks
BuildRequires:  cmake
# for git-version-gen
BuildRequires:  git-core
BuildRequires:  mingw32-cross-binutils
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-pkg-config
BuildRequires:  mingw32-filesystem >= 35
BuildRequires:  mingw32-libusb-1_0-devel
BuildRequires:  mingw32-winpthreads-devel
BuildArch:      noarch

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

%description -n %{libname}
Library to run Realtek RTL2832 based DVB dongle as a SDR receiver.

%package devel
Summary:        Development files for rtl-sdr
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
Library headers for rtl-sdr driver.

%setup -q -n %{realname}-%{version}

%{_mingw32_make} VERBOSE=1 %{?_smp_mflags}

%{_mingw32_make} DESTDIR=%{buildroot} install
# remove unneeded static version of the lib
rm %{buildroot}/%{_mingw32_libdir}/librtlsdr_static.a


%files -n %{libname}

%files devel