File pulseview.spec of Package pulseview

# spec file for package pulseview
# Copyright (c) 2017 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

Name:           pulseview
Version:        0.4.0
Release:        0
Summary:        Qt-based GUI for sigrok
License:        GPL-3.0+
Group:          Productivity/Scientific/Electronics
BuildRequires:  cmake
BuildRequires:  glib2-devel
%if 0%{?suse_version} > 1325
BuildRequires:  libboost_filesystem-devel
BuildRequires:  libboost_serialization-devel
BuildRequires:  libboost_test-devel
BuildRequires:  libboost_thread-devel
BuildRequires:  boost-devel >= 1.55.0
BuildRequires:  libsigrok-devel >= 0.4.0
BuildRequires:  libsigrokdecode-devel >= 0.4.0
BuildRequires:  update-desktop-files
BuildRequires:  cmake(Qt5Gui)
BuildRequires:  cmake(Qt5Svg)
BuildRequires:  cmake(Qt5Widgets)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The sigrok project aims at creating a portable, cross-platform,
Free/Libre/Open-Source logic analyzer software that supports various
logic analyzer hardware products.

PulseView is a Qt-based GUI for sigrok.

%setup -q

# -fext-numeric-literal is a workaround for boo#1004168, remove when fixed
export CXXFLAGS="%{optflags} -fpermissive -fext-numeric-literals"
make %{?_smp_mflags}

find %{buildroot} -type f -name "*.la" -delete -print

install -m 644 -D icons/pulseview.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/pulseview.png
install -m 644 -D icons/pulseview.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/pulseview.svg

install -m 755 -d %{buildroot}%{_datadir}/applications/
install -m 644 contrib/org.sigrok.PulseView.desktop %{buildroot}%{_datadir}/applications/org.sigrok.PulseView.desktop
%suse_update_desktop_file -r org.sigrok.PulseView Education Engineering

install -m 755 -d %{buildroot}%{_datadir}/metainfo/
install -m 644 contrib/org.sigrok.PulseView.appdata.xml %{buildroot}%{_datadir}/metainfo/org.sigrok.PulseView.appdata.xml

%dir %{_datadir}/metainfo