File cutecom-ng.spec of Package cutecom-ng

#
# spec file for package cutecom-ng
#
# Copyright (c) 2015 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/
#


Name:           cutecom-ng
Version:        0.2
Release:        0
Summary:        Serial terminal
License:        GPL-2.0+
Group:          Applications/Communications
Url:            https://github.com/develersrl/cutecom-ng
Source0:        https://github.com/develersrl/%{name}/%{version}.tar.gz
Source1:        %{name}.desktop
Source2:        %{name}.png
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5SerialPort)
BuildRequires:  pkgconfig(Qt5UiTools)
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Cutecom-ng is a graphical serial port terminal, available for all major
platforms (Linux, Mac OSX and Windows), written in Qt5.

%prep
%setup -q

%build
qmake-qt5 \
  QMAKE_CXXFLAGS_RELEASE="%{optflags}" \
  QMAKE_LFLAGS_RELEASE="%{optflags}"
make %{?_smp_mflags}

%install
install -D -m 0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/%{name}.png

%suse_update_desktop_file -r "%{name}" System TerminalEmulator

%post
%desktop_database_post

%postun
%desktop_database_postun

%files
%defattr(-,root,root)
%doc CREDITS LICENSE README.md
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by