File xpadneo.spec of Package xpadneo

#
# spec file for package new-lg4ff
#
# Copyright (c) 2020 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 _name_archive xpadneo-queue-for-0.9
%define _version 0.9.7~beta

Name:           xpadneo
Version:        0.9.7~beta.20240810
Release:        beta
Summary:        Advanced Linux Driver for Xbox One Wireless Gamepad
License:        GPL-3.0
URL:            https://github.com/kakra/xpadneo.git
Source0:        %{_name_archive}-%{version}.tar.xz
BuildArch:      x86_64
BuildRequires:  %{kernel_module_package_buildreqs}

%kernel_module_package

%description

#make source folder,
#move * (everything) into source folder
#make obj folder
%prep
%setup -q -n %{_name_archive}-%{version}
set -- hid-xpadneo/*
mkdir source
mv "$@" source/
mkdir obj

%build
for flavor in %{flavors_to_build}; do
    rm -rf obj/$flavor
    cp -r source obj/$flavor
    make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor/src
done

%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %{flavors_to_build}; do
    make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor/src
done

%changelog
openSUSE Build Service is sponsored by