File proatm-kmp.spec of Package proatm-kmp
#
# spec file for package protatm-kmp
#
# Copyright (c) 2022, Martin Hauke <mardnh@gmx.de>
#
# 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: proatm-kmp
Version: 3.50
Release: 0
Summary: Out-of-tree Driver for Prosum ATM adapters
License: GPL-2.0-only
Group: Hardware/Other
URL: https://www.prosum.net/en/products/atm-adapters
Source: https://www.prosum.net/download/proatm-linux.tgz
Source1: proatm-kmp-preamble
Patch0: 0001-Fix-build-against-linux-5.18.0.patch
Patch1: 0002-more-fixes-for-recent-kernes.patch
Patch2: x.patch
BuildRequires: %{kernel_module_package_buildreqs}
%kernel_module_package -n proatm -p proatm-kmp
%description
Out-of-tree Driver for Prosum ATM adapters.
%prep
%setup -q -n proatm-linux
%patch0 -p1
%patch1 -p1
%patch2 -p1
# fix spurious permissions
chmod -x changelog README README.pdf
sed -i 's/\r$//' README
set -- *
mkdir source
mv "$@" source/
mkdir obj
%build
for flavor in %{flavors_to_build}; do
cp -r source obj/$flavor
make V=1 -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor %{?_smp_mflags}
done
%install
export INSTALL_MOD_PATH=%{buildroot}
for flavor in %{flavors_to_build}; do
make V=1 -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor
done
%files
%doc source/changelog source/README source/README.pdf
%changelog