File wspr.spec of Package wspr

#
# spec file for package wspr
#
# Copyright (c) 2017 Walter Fey DL8FCL
#
# This file is under MIT license

Name:           wspr
Version:        4.0.r6053
Release:        0
License:        GPL-3.0
Summary:        Weak Signal Propagation Reporter
Url:            http://www.physics.princeton.edu/pulsar/K1JT/
Group:          Productivity/Hamradio/Other
Source:         %{name}-%{version}.tar.xz
Patch0:         wspr-fix-build.patch
Patch1:         wspr-fix-makefile.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  alsa-devel
BuildRequires:  asciidoc
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  dos2unix
BuildRequires:  f2c
BuildRequires:  fftw3-devel
BuildRequires:  gcc-c++
BuildRequires:  gcc-fortran
BuildRequires:  libpulse-devel
BuildRequires:  libsamplerate-devel
BuildRequires:  libxslt-tools
BuildRequires:  ncurses-utils
BuildRequires:  portaudio-devel
BuildRequires:  python-devel
BuildRequires:  python3-devel
BuildRequires:  python3-numpy-devel
BuildRequires:  update-desktop-files

Requires:       hamlib
Requires:       python3
Requires:       python3-tk
Requires:       python3-numpy

%if 0%{suse_version} != 1315
Requires:       python3-Pillow-tk
%endif

%if 0%{suse_version} == 1315
Requires:       python3-Pillow
%endif

%description
The Weak Signal Propagation Reporter Network is a group of amateur radio operators using
K1JT's MEPT_JT digital mode to probe radio frequency propagation conditions using
very low power (QRP/QRPp) transmissions.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
dos2unix wspr.py WsprMod/hopping.py 

%build
autoreconf -fiv
%configure
make

%install
strip --strip-unneeded WsprMod/w.so
%make_install
# these files must not be executable
chmod -x %{buildroot}%{_datadir}/%{name}/*.py
chmod -x %{buildroot}%{_datadir}/%{name}/wsprrc
chmod -x %{buildroot}/usr/lib/wspr/WsprMod/*.py
# we do not need alien libs
rm %{buildroot}/usr/lib/wspr/WsprMod/*.dll

%suse_update_desktop_file -c wspr "WSPR v4.0" "Weak Signal Propagation Reporter" wspr wspr "Network;HamRadio"

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_bindir}/*
/usr/lib/wspr
%{_datadir}/wspr/
%{_datadir}/pixmaps/wspr.xpm
%{_datadir}/applications/wspr.desktop
%{_datadir}/doc/%{name}
%{_mandir}/man1/*

%changelog
openSUSE Build Service is sponsored by