File dsremote.spec of Package DSRemote

#
# spec file for package soundkonverter
#
# 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 http://bugs.opensuse.org/
#


Name:           dsremote
Summary:        Program to control and visualize your oscilloscope
Version:        0.42
Release:        0
License:        GPL-2.0+
Group:          Hardware/Other
Source0:        https://gitlab.com/Teuniz/DSRemote/-/archive/master/dsremote-%{version}.tar.bz2
URL:            https://www.teuniz.net/DSRemote/index.html
Source1:        dsremote.appdata.xml
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libusb-1_0-devel
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  libqt5-qtbase-common-devel
BuildRequires:  libQt5Multimedia-devel
BuildRequires:  libQt5PrintSupport-devel
BuildRequires:  libQt5Multimedia5
BuildRequires:  libftdi1-devel
BuildRequires:  boost-devel
BuildRequires:  update-desktop-files
Patch0:         font_qt.patch
Patch1:         add_DS1000Z-E.patch
BuildRoot:      %{_tmppath}/%{name}-build

%description
DSRemote is a program to control and visualize your RigolĀ® DS6000 or DS1000Z, DS1000Z-E series oscilloscope from
your Linux desktop via USB or LAN. It will probably work as well with the other series like DS2000A and DS4000 series but
I have no access to all those oscilloscopes so I can not test it.

%prep
%setup -q
%patch -P0 -p1
%patch -P1 -p1

%build
qmake-qt5
make -j8

cp %{_sourcedir}/dsremote.appdata.xml %{_builddir}/%{name}-%{version}/dsremote.appdata.xml

%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_udevrulesdir}
mkdir -p %{buildroot}%{_datadir}/pixmaps/
install dsremote %{buildroot}%{_bindir}
install images/r_%{name}.png %{buildroot}%{_datadir}/pixmaps/
install -m 0664 install/30-usbtmc.rules %{buildroot}%{_udevrulesdir}

install -D -m 0644 dsremote.appdata.xml %{buildroot}%{_datadir}/metainfo/dsremote.appdata.xml

%suse_update_desktop_file -i -r %{name} System HardwareSettings

%post
%{?udev_rules_update:%udev_rules_update}

%files
%defattr(-, root, root)
%doc README LICENSE readme_usbtmc_driver.txt
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/r_%{name}.png
%{_datadir}/metainfo/dsremote.appdata.xml
%{_udevrulesdir}/30-usbtmc.rules

%changelog
openSUSE Build Service is sponsored by