File openterface.spec of Package openterface

#
# spec file for package openterface
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           openterface
Version:        0.0.6
Release:        0
Summary:        QT GUI for the open source KVM (keyboard, video, mouse) Openterface.
License:        AGPL-3.0-only
Group:          Hardware/Other
URL:            https://github.com/TechxArtisanStudio/Openterface_QT
Source0:        %{name}-%{version}.tar.gz
Source1:        99-hidraw-permissions.rules
Patch0:		fix-return-warning.patch
Packager:       Holden R. Fried
%if 0%{?suse_version}
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  qt6-concurrent-devel
BuildRequires:  qt6-core-devel
BuildRequires:  qt6-dbus-devel
BuildRequires:  qt6-gui-devel
BuildRequires:  qt6-multimedia-devel
BuildRequires:  qt6-multimediawidgets-devel
BuildRequires:  qt6-network-devel
BuildRequires:  qt6-serialport-devel
BuildRequires:  qt6-svg-devel
BuildRequires:  libusb-1_0-devel
#Requires:       libQt6MultimediaWidgets6
%endif
%if 0%{?fedora}
BuildRequires:  cmake-fedora
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  glibc-all-langpacks
BuildRequires:  glibc-langpack-en
BuildRequires:  libusb1-devel
BuildRequires:  oneVPL-devel
BuildRequires:  qt6-qtbase-devel
BuildRequires:  qt6-qtmultimedia-devel
BuildRequires:  qt6-qtserialport-devel
BuildRequires:  qt6-qtsvg-devel
BuildRequires:  qt6-qttools-devel
#Requires:       qt6-qtmultimedia
%endif
%if 0%{?debian} || 0%{?ubuntu}
BuildRequires:  build-essential
BuildRequires:  qmake6
BuildRequires:  qt6-base-dev
BuildRequires:  qt6-multimedia-dev
BuildRequires:  qt6-serialport-dev
BuildRequires:  qt6-svg-dev
BuildRequires:  libavcodec-extra
#BuildRequires:  libavcodec59
BuildRequires:  libavformat-extra
BuildRequires:  libusb-1.0-0-dev
#BuildRequires:  libavformat59 
#BuildRequires:  obs-service-tar 
#BuildRequires:  obs-service-recompress
#BuildRequires:   osc 
%endif

%description
This is the front-end Qt6 graphical interface for the Openterface 
mini-KVM device. It allows you to use your own laptop to display 
and control headless devices directly through a USB and HDMI 
connection. This KVM-over-USB solution captures video via 
HDMI and simulates keyboard and mouse inputs.

%prep
%autosetup -p1

%build
#mkdir build
#cd build
%if 0%{?fedora}
%{_qt6_qmake} %{?_qt6_qmake_flags}
%make_build
%else
%{qmake6}
#qmake6 ..
# % make_build -j$(nproc)
%{qmake6_build} %{?_smp_mflags}
%endif

%install
#%%qmake6_install
#mv %%{buildroot}%%{_bindir}/openterfaceQT %%{buildroot}%%{_bindir}/openterface
#cd build
install -Dm755 openterfaceQT %{buildroot}%{_bindir}/openterface
install -Dm644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/99-hidraw-permissions.rules

%post
%postun

%files
%license LICENSE
%doc README.md
%{_bindir}/openterface
%{_udevrulesdir}/99-hidraw-permissions.rules

%changelog
openSUSE Build Service is sponsored by