Blob Blame Raw
# Only python2 is supported
Name:		rtlsdr-scanner
Version:	1.0.22497.10311
Release:	1%{?dist}
Summary:	Frequency scanning GUI for RTL2832 based DVB-T dongles
License:	GPLv3
Group:		Applications/Engineering
Source1:	rtlsdr-scanner.desktop
#BuildRequires:	python2-setuptools
BuildRequires:	python2-devel, ImageMagick, desktop-file-utils
Requires:	wxPython, python2-matplotlib, python2-matplotlib-wx, numpy
Requires:	python-pillow, pyserial, python2-pyrtlsdr, hicolor-icon-theme
BuildArch:	noarch
# distribution specific patch changing paths and modularizing the code
Patch0:		rtlsdr-scanner-1.0.22497.10311-fedora.patch
Patch1:		rtlsdr-scanner-1.0.22497.10311-relative-imports.patch

Frequency scanning GUI for RTL2832 based DVB-T dongles. In other
words a cheap, simple Spectrum Analyser.

%package doc
Summary:	Documentation files for rtlsdr-scanner
Requires:	%{name} = %{version}-%{release}
BuildArch:	noarch

%description doc

%setup -qn RTLSDR-Scanner-%{version}
%patch0 -p1
%patch1 -p1

find src -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python2}|'

# is not needed in distribution
rm -f src/

mv src/ ./rtlsdr_scan

# icon
convert rtlsdr_scan.ico rtlsdr_scan.png



install -Dpm 0755 rtlsdr_scan %{buildroot}%{_bindir}/rtlsdr_scan
install -Dpm 0644 -t %{buildroot}%{python2_sitelib}/rtlsdr_scanner src/*
install -Dpm 0644 -t %{buildroot}%{_datadir}/%{name}/res res/*

# icon
install -Dpm 0644 rtlsdr_scan-8.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/rtlsdr_scan.png

# desktop file
mkdir -p  %{buildroot}%{_datadir}/applications
desktop-file-install --add-category="Utility" \
  --dir=%{buildroot}%{_datadir}/applications \

/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :

/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :

%license COPYING

%files doc
%doc doc/Manual.pdf

* Thu Oct 13 2016 Jaroslav Škarvada <> - 1.0.22497.10311-1
- New version
- Fixed imports to be relative
  Resolves: rhbz#1383513

* Tue Sep 20 2016 Jaroslav Škarvada <> - 1.0.22298.18049-3
- Rebuilt for python2-matplotlib

* Fri Jul 15 2016 Jaroslav Škarvada <> - 1.0.22298.18049-2
- Fixed icon packaging according to review

* Tue Apr 12 2016 Jaroslav Škarvada <> - 1.0.22298.18049-1
- Initial release