File input-leap.spec of Package input-leap
#
# spec file for package input-leap
#
# 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/
#
%define cmake_install_strip DESTDIR=%{buildroot} %__builder install/strip -C %__builddir
Name: input-leap
Version: 3.0.2+git85.7c84407
Release: 0%{?dist}
Summary: Keyboard and mouse sharing solution
License: GPL-2.0-only
Group: Productivity/Networking/Other
URL: https://github.com/input-leap/input-leap
Source0: input-leap-%{version}.tar.zst
BuildRequires: pkgconfig(avahi-compat-libdns_sd)
BuildRequires: cmake >= 3
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: pkgconfig(gmock)
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xtst)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libei-1.0) >= 1.4.0
BuildRequires: pkgconfig(libssl)
BuildRequires: pkgconfig(libportal)
BuildRequires: pkgconfig(libportal-qt6)
BuildRequires: pkgconfig(Qt6Network)
BuildRequires: pkgconfig(Qt6Linguist)
BuildRequires: pkgconfig(Qt6Core5Compat)
%description
InputLeap allows you to share one mouse and keyboard between multiple computers.
Work seamlessly across Windows, macOS and Linux.
%prep
%setup -q -T -b 0
%build
%cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DQT_DEFAULT_MAJOR_VERSION=6 \
-DINPUTLEAP_BUILD_LIBEI=ON \
-DINPUTLEAP_USE_EXTERNAL_GTEST=True \
-DINPUTLEAP_REVISION:STRING=%{version}
%cmake_build
%install
# rpmlint recommends stripping debug but there doesn't seem to be an existing macro for that
%cmake_install_strip
desktop-file-install --delete-original \
--dir %{buildroot}%{_datadir}/applications \
--set-icon=%{_datadir}/icons/hicolor/scalable/apps/io.github.input_leap.input-leap.svg \
%{buildroot}%{_datadir}/applications/io.github.input_leap.input-leap.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/io.github.input_leap.input-leap.desktop
%files
# None of the documentation files are actually useful here, they all point to
# the online website, so include just one, the README
%license LICENSE
%doc ChangeLog res/Readme.txt doc/input-leap.conf.example*
%{_bindir}/input-leap
%{_bindir}/input-leapc
%{_bindir}/input-leaps
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/io.github.input_leap.input-leap.svg
%{_datadir}/applications/io.github.input_leap.input-leap.desktop
%{_datadir}/metainfo/io.github.input_leap.input-leap.appdata.xml
%{_mandir}/man1/input-leapc.1%{?ext_man}
%{_mandir}/man1/input-leaps.1%{?ext_man}
%changelog