File looking-glass-kmp.spec of Package looking-glass
#
# spec file for package looking-glass-kmp
#
# Copyright (c) 2025 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: looking-glass-kmp
Version: B7
Release: 0
Summary: Kernel module for Looking Glass (IVSHMEM framebuffer sharing)
License: GPL-2.0-only
URL: https://looking-glass.io/
Source0: https://github.com/gnif/LookingGlass/archive/refs/tags/LookingGlass-B7.tar.gz
Source1: looking-glass-kmp-preamble
BuildRequires: %{kernel_module_package_buildreqs}
%kernel_module_package -n looking-glass -p %{SOURCE1} only_flavors default
%description
This package provides the kvmfr kernel module used by Looking Glass for IVSHMEM frame sharing.
%prep
%setup -q -n LookingGlass-B7
# Se estiver em "module/", mova para a raiz
mv module kvmfr
%build
for flavor in %{flavors_to_build}; do
mkdir -p obj/$flavor
cp -r kvmfr obj/$flavor/
%make_build -C %{kernel_source $flavor} %{?linux_make_arch} M=$PWD/obj/$flavor/kvmfr
done
%install
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=%{kernel_module_package_moddir}
for flavor in %{flavors_to_build}; do
make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor/kvmfr
done
%check
# No test suite provided
%files
%license LICENSE
%doc README.md