File cutecom-qt4.spec of Package cutecom-qt4

#
# spec file for package cutecom-qt4
#
# Copyright (c) 2016 SUSE LINUX 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/
#

%define basicname cutecom
Name:           %{basicname}-qt4
Version:        0.22.0
Release:        0
Url:            http://cutecom.sourceforge.net/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libqt4-devel
Summary:        Serial terminal
License:        GPL-2.0+
Group:          Applications/Communications
Source:         %{basicname}-%{version}.tar.gz
Source3:        %{name}.desktop
Source4:        %{name}.png
Patch:          cutecom-0.22.0-nolinebreak.diff
Patch1:         cutecom-0.22.0-license.diff

%description
Qt 4 based serial terminal

%prep
%setup -n %{basicname}-%{version}
%patch -p1
%patch1 -p1

%build
cmake .
make

%install
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
install -s -m 755 %{basicname} $RPM_BUILD_ROOT/%{_bindir}/%{name}
gzip %{basicname}.1
install -m 644 %{basicname}.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/%{name}.1.gz

install -d 755 $RPM_BUILD_ROOT%{_datadir}/applications
install -m 644 %SOURCE3 $RPM_BUILD_ROOT%{_datadir}/applications/
install -d 755 $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m 644 %SOURCE4 $RPM_BUILD_ROOT%{_datadir}/pixmaps/

%clean
rm -rf "$RPM_BUILD_ROOT"

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

%changelog
openSUSE Build Service is sponsored by