%global ver 0.9 %global revision 8046 %global date 20170831 %global snapshot %{date}svn%{revision} # make tarball: # VER=%{version} # REV=%{revision} # svn export -r $REV svn://svn.code.sf.net/p/wsjt/wsjt/branches/wsprx ./wsprx # tar -cJf wsprx-$VER-`date +%Y%m%d`svn${REV}.tar.xz wspr Name: wsprx Version: %{ver} Release: 1.%{snapshot}%{?dist} Summary: Weak Signal Propagation Reporter License: BSD Group: Applications/Engineering URL: https://physics.princeton.edu/pulsar/k1jt/wspr.html Source0: %{name}-%{ver}-%{snapshot}.tar.xz Source1: wsprx.desktop Patch0: wsprx-0.9-compile-fix.patch BuildRequires: dos2unix, cmake, gcc-c++, gcc-gfortran, qt5-devel BuildRequires: desktop-file-utils, hamlib-devel, fftw-devel, libusbx-devel BuildRequires: portaudio-devel, ImageMagick, libreoffice-writer %description WSPR implements a protocol designed for probing potential radio signal propagation paths with low-power transmissions. Normal transmissions carry a station's callsign, Maidenhead grid locator, and transmitter power in dBm. This program can decode signals with S/N as low as -28 dB in a 2500 Hz bandwidth. Stations with internet access can automatically upload their reception reports to a central database called WSPRnet, which includes a mapping facility. %package doc Summary: Documentation for wsprx BuildArch: noarch Requires: wsprx = %{version}-%{release} %description doc Documentation for wsprx. %prep %setup -q -n %{name} %patch0 -p1 -b .compile-fix # convert CR + LF to LF dos2unix LICENSE_WHEATLEY.TXT *.ui *.iss *.rc # remove Windows bits and binaries find . -name '*.dll' -o -name '*.a' | xargs rm -f # fix permissions on source code chmod a-x *.cpp *.h # remove bundled portaudio header rm -f portaudio.h %build export CFLAGS="%{optflags}" export LDFLAGS="%{?__global_ldflags}" mkdir build cd build %cmake ../ make %{?_smp_mflags} %install cd build make %{?_smp_mflags} install DESTDIR=%{buildroot} # icon convert ../wsjt.ico wsprx.png install -Dpm 0644 wsprx-0.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/wsprx.png # desktop file mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --add-category="Utility" \ --dir=%{buildroot}%{_datadir}/applications \ %{SOURCE1} # doc libreoffice --headless --convert-to pdf ../WSPR-X_Users_Guide.docx # drop kvasd, zero length [ -s "%{buildroot}%{_bindir}/kvasd" ] || rm -f "%{buildroot}%{_bindir}/kvasd" %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun 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 || : fi %posttrans /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : %files %license LICENSE_WHEATLEY.TXT %{_bindir}/wsprx %{_bindir}/wsprd %{_datadir}/icons/hicolor/32x32/apps/wsprx.png %{_datadir}/applications/wsprx.desktop %files doc %doc build/WSPR-X_Users_Guide.pdf %changelog * Tue Aug 29 2017 Jaroslav Škarvada - 0.9-1.20170831svn8046 - Initial version