#
# spec file for package qsstv
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#

Name: 			qsstv
Summary: 		Qt-based slow-scan TV and fax
Version: 		8.1.12
Release: 		0
License: 		GPL-3.0
Group: 			Productivity/Hamradio/Other
Url: 			http://users.telenet.be/on4qz/qsstv/
Source: 		http://users.telenet.be/on4qz/qsstv/downloads/%{name}_%{version}.tar.gz
Source1:        qsstv.desktop
Source2:        qsstv.1 
BuildRequires:  fftw3-devel
BuildRequires:  libjasper-devel
BuildRequires:  libqt4-devel
BuildRequires:  update-desktop-files
BuildRequires:  alsa-devel
BuildRequires:  hamlib-devel
BuildRequires:  libqwt5-devel
BuildRequires:  gcc-c++
BuildRequires:	fdupes
BuildRoot: 		%{_tmppath}/build-root-%{name}

%description
Qsstv is a program for receiving slow-scan television and fax. These are
modes used by hamradio operators. Qsstv uses a soundcard to send and
receive images.

%prep
%setup -q -n %{name}_%{version}

# Correct documentation directory
#sed -i 's|/usr/share/doc/$$TARGET|/usr/share/doc/packages/$$TARGET|g' %{name}_8.pro

%build
qmake -makefile %{name}_8.pro PREFIX=%{_prefix} QMAKE_CFLAGS="%optflags" QMAKE_CXXFLAGS="%optflags"
%__make %{?_smp_mflags}

%install
mkdir -p %{buildroot}%{_bindir}
cp -f %{name} %{buildroot}%{_bindir}/%{name}
# Remove redundant documentation files
#%fdupes -s src/documentation/html/*

# Make suse_update_desktop_file be able to find the qsstv icon
cp src/icons/%{name}.png %_sourcedir

# Install man page borrowed from Debian
mkdir -p %{buildroot}%{_mandir}/man1
install -pm 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/

%suse_update_desktop_file -i %{name}

%files
%defattr(-,root,root,-)
%doc COPYING
%{_bindir}/* 
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/%{name}.1*

%changelog