2012-05-21 19:30:59 +02:00
|
|
|
#
|
|
|
|
# spec file for package vhba-kmp
|
|
|
|
#
|
2024-02-12 13:21:27 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2012-05-21 19:30:59 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-05-28 16:43:33 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-05-21 19:30:59 +02:00
|
|
|
#
|
2012-11-15 01:07:48 +01:00
|
|
|
|
|
|
|
|
2012-05-21 19:30:59 +02:00
|
|
|
Name: vhba-kmp
|
2024-02-12 13:33:57 +01:00
|
|
|
Version: 20240202
|
2012-11-15 01:07:48 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Virtual SCSI Host Bus Adapter
|
2019-05-28 16:43:33 +02:00
|
|
|
License: GPL-2.0-or-later
|
2019-10-24 12:55:10 +02:00
|
|
|
Group: System/Kernel
|
2021-04-20 15:46:40 +02:00
|
|
|
URL: https://cdemu.sourceforge.io/about/vhba/
|
2012-05-21 19:30:59 +02:00
|
|
|
|
2021-04-20 15:46:40 +02:00
|
|
|
#Git-Clone: https://github.com/cdemu/cdemu
|
|
|
|
Source: https://downloads.sf.net/cdemu/vhba-module-%version.tar.xz
|
2014-07-14 13:37:18 +02:00
|
|
|
Source2: %name-preamble
|
2014-07-14 13:33:34 +02:00
|
|
|
Patch1: vhba-no-werror.diff
|
2015-11-23 23:36:51 +01:00
|
|
|
Patch2: vhba-devname.diff
|
2023-04-20 10:58:34 +02:00
|
|
|
Patch3: vhba-sle-kernel.diff
|
2022-12-05 15:11:49 +01:00
|
|
|
BuildRequires: %kernel_module_package_buildreqs
|
2013-06-09 16:17:36 +02:00
|
|
|
BuildRequires: kernel-syms >= 2.6.20
|
2012-05-21 19:30:59 +02:00
|
|
|
|
2017-05-18 00:20:18 +02:00
|
|
|
%{?kernel_module_package:%kernel_module_package -n vhba -p %name-preamble}
|
2012-05-21 19:30:59 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
A Linux kernel module implementing a virtual SCSI Host Bus Adapter to
|
|
|
|
act as a low-level SCSI driver and which provides the SCSI layer with
|
|
|
|
a virtual SCSI adapter which can have multiple virtual devices. It is
|
|
|
|
part of the userspace cdemu suite, CD/DVD-ROM device emulator for
|
|
|
|
Linux.
|
|
|
|
|
2024-02-12 13:21:27 +01:00
|
|
|
%package -n vhba-udev-rules
|
|
|
|
Summary: udev rules for vhba-kmp
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description -n vhba-udev-rules
|
|
|
|
udev rule snippets to give VHBA devices to logged-in users as per the
|
|
|
|
uaccess scheme.
|
|
|
|
|
2012-05-21 19:30:59 +02:00
|
|
|
%package KMP
|
|
|
|
Summary: Virtual SCSI Host Bus adapter
|
|
|
|
|
|
|
|
%description KMP
|
|
|
|
A Linux kernel module implementing a virtual SCSI Host Bus Adapter to
|
|
|
|
act as a low-level SCSI driver and which provides the SCSI layer with
|
|
|
|
a virtual SCSI adapter which can have multiple virtual devices. It is
|
|
|
|
part of the userspace cdemu suite, CD/DVD-ROM device emulator for
|
|
|
|
Linux.
|
|
|
|
|
|
|
|
%prep
|
2014-07-14 13:37:18 +02:00
|
|
|
echo %flavors_to_build
|
2019-05-28 16:43:33 +02:00
|
|
|
%autosetup -n vhba-module-%version -p1
|
2012-05-21 19:30:59 +02:00
|
|
|
|
|
|
|
%build
|
2023-04-20 10:58:34 +02:00
|
|
|
%if 0%{?sle_version} >= 150500 && 0%{?sle_version} < 160000
|
|
|
|
export KCFLAGS="-DSLE"
|
|
|
|
%endif
|
2014-07-14 13:37:18 +02:00
|
|
|
for flavor in %flavors_to_build; do
|
|
|
|
cp -a . "../obj-$flavor/"
|
|
|
|
pushd "../obj-$flavor/"
|
|
|
|
make KDIR="/usr/src/linux-obj/%_target_cpu/$flavor" \
|
|
|
|
%{?_smp_mflags}
|
|
|
|
popd
|
2014-07-14 13:33:34 +02:00
|
|
|
done
|
2012-05-21 19:30:59 +02:00
|
|
|
|
|
|
|
%install
|
2014-07-14 13:37:18 +02:00
|
|
|
export INSTALL_MOD_PATH="%buildroot"
|
2012-05-21 19:30:59 +02:00
|
|
|
|
2014-07-14 13:37:18 +02:00
|
|
|
for flavor in %flavors_to_build; do
|
|
|
|
pushd "../obj-$flavor/"
|
|
|
|
make KDIR="/usr/src/linux-obj/%_target_cpu/$flavor" \
|
|
|
|
modules_install
|
|
|
|
popd
|
2014-07-14 13:33:34 +02:00
|
|
|
done
|
2024-02-12 13:21:27 +01:00
|
|
|
mkdir -p "%buildroot/%_udevrulesdir"
|
|
|
|
cp -a debian/*.udev "%buildroot/%_udevrulesdir/"
|
|
|
|
|
|
|
|
%files -n vhba-udev-rules
|
|
|
|
%_udevrulesdir/
|
2012-05-21 19:30:59 +02:00
|
|
|
|
|
|
|
%changelog
|