File deskflow.spec of Package deskflow

#
# spec file for package deskflow
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 Boian Berberov
#
# 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/
#

%bcond_without  doc
%bcond_with     test



%define         qt6_min_ver  6.7
%define         appid        org.%{name}.%{name}



Name:           deskflow
Version:        1.23.0
Release:        0%{?dist}
Summary:        Deskflow lets you share one mouse and keyboard between multiple computers
License:        GPL-2.0-only
URL:            https://github.com/deskflow/deskflow

Source0:        %{url}/archive/refs/tags/v%{version}.tar.gz

BuildRequires:  cmake   >= 3.24
# C++20 required
BuildRequires:  gcc-c++ >= 10
BuildRequires:  help2man
BuildRequires:  pkgconfig

# Wayland
BuildRequires:  pkgconfig(libei-1.0) >= 1.3

# Xorg
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xi)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  pkgconfig(xkbfile)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(xtst)

# GUI
BuildRequires:  cmake(Qt6Core)    >= %{qt6_min_ver}
BuildRequires:  cmake(Qt6DBus)    >= %{qt6_min_ver}
BuildRequires:  cmake(Qt6Network) >= %{qt6_min_ver}
BuildRequires:  cmake(Qt6Widgets) >= %{qt6_min_ver}
BuildRequires:  cmake(Qt6Xml)     >= %{qt6_min_ver}

# Other
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig(CLI11)        >= 2.4.2
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(ice)
BuildRequires:  pkgconfig(libportal)    >= 0.8
BuildRequires:  pkgconfig(openssl)      >= 3.0
BuildRequires:  pkgconfig(sm)
BuildRequires:  pkgconfig(tomlplusplus) >= 3.4.0

%if 0%{with doc}
BuildRequires:  doxygen
%endif

%if 0%{with test}
BuildRequires:  cmake(Qt6Test)    >= %{qt6_min_ver}
%endif

# For /etc/os-release, used with BUILD_INSTALLER=ON
%if 0%{?is_opensuse}
BuildRequires:  openSUSE-release
%endif

%if 9 < 0%{?mageia}
	%ifarch x86_64
# "have choice for" linux-userspace-headers needed by glibc-devel
Requires:       kernel-mainline-userspace-headers
	%endif
%endif

%description
Deskflow lets you share one mouse and keyboard between multiple computers

%if 0%{with doc}
%package doc
Summary:        HTML documentation for %{name}
BuildArch:      noarch

%description doc
%{summary}.
%endif



%prep
%setup -q -n %{name}-%{version}



%build
%cmake \
	-DBUILD_GUI=ON \
	-DBUILD_INSTALLER=ON \
%if 0%{with doc}
	-DBUILD_DOCS=ON \
%else
	-DBUILD_DOCS=OFF \
%endif
%if 0%{with test}
	-DBUILD_TESTS=ON \
%else
	-DBUILD_TESTS=OFF \
%endif
	-DBUILD_UNIFIED=OFF \
	-DENABLE_COVERAGE=OFF

%cmake_build



%install
%cmake_install



%files
%{_bindir}/%{name}
%{_bindir}/%{name}-client
%{_bindir}/%{name}-server
%{_defaultlicensedir}/%{name}/
%{_datadir}/applications/org.%{name}.%{name}.desktop
%{_datadir}/icons/hicolor/512x512/apps/org.%{name}.%{name}.png
%{_datadir}/metainfo/org.%{name}.%{name}.metainfo.xml
%{_mandir}/man1/%{name}-client.1*
%{_mandir}/man1/%{name}-server.1*
%{_mandir}/man1/%{name}.1*

%files doc
%{_defaultdocdir}/%{name}/



%changelog

* Tue Jul 15 2025 Boian Berberov
- Added changelog for openSUSE Leap 16
openSUSE Build Service is sponsored by