2012-05-21 19:30:59 +02:00
|
|
|
#
|
|
|
|
# spec file for package vhba-kmp
|
|
|
|
#
|
2017-02-06 18:59:17 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
2012-11-15 01:07:48 +01:00
|
|
|
|
|
|
|
|
2012-05-21 19:30:59 +02:00
|
|
|
Name: vhba-kmp
|
2017-02-06 18:59:17 +01:00
|
|
|
Version: 20161009
|
2012-11-15 01:07:48 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Virtual SCSI Host Bus Adapter
|
|
|
|
License: GPL-2.0+
|
2012-05-21 19:30:59 +02:00
|
|
|
Group: System/Kernel
|
2014-07-14 13:37:18 +02:00
|
|
|
Url: http://cdemu.sf.net/about/vhba/
|
2012-05-21 19:30:59 +02:00
|
|
|
|
2014-07-14 13:37:18 +02:00
|
|
|
#Git-Clone: git://git.code.sf.net/p/cdemu/code
|
|
|
|
Source: http://downloads.sf.net/cdemu/vhba-module-%version.tar.bz2
|
|
|
|
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
|
2013-06-09 16:17:36 +02:00
|
|
|
BuildRequires: kernel-syms >= 2.6.20
|
2013-03-30 03:58:19 +01:00
|
|
|
BuildRequires: modutils
|
2014-07-14 13:37:18 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-05-21 19:30:59 +02:00
|
|
|
|
2014-07-14 13:37:18 +02:00
|
|
|
%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.
|
|
|
|
|
2017-02-06 18:59:17 +01:00
|
|
|
%package -n vhba-rules
|
|
|
|
Summary: System configuration for the vhba module
|
|
|
|
Group: System/Kernel
|
|
|
|
|
|
|
|
%description -n vhba-rules
|
|
|
|
This subpackage contains udev rules for use with vhba_ctl
|
|
|
|
to unlock the device node for local users.
|
|
|
|
|
2012-05-21 19:30:59 +02:00
|
|
|
%package KMP
|
|
|
|
Summary: Virtual SCSI Host Bus adapter
|
|
|
|
Group: System/Kernel
|
|
|
|
|
|
|
|
%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
|
|
|
|
%setup -qn vhba-module-%version
|
2015-11-23 23:36:51 +01:00
|
|
|
%patch -P 1 -P 2 -p1
|
2012-05-21 19:30:59 +02:00
|
|
|
|
|
|
|
%build
|
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
|
2012-05-21 19:30:59 +02:00
|
|
|
|
2017-02-06 18:59:17 +01:00
|
|
|
b="%buildroot//usr/lib/udev/rules.d"
|
|
|
|
mkdir -p "$b"
|
|
|
|
echo 'KERNEL=="vhba_ctl", SUBSYSTEM=="misc", TAG+="uaccess"' >"$b/70-vhba.rules"
|
|
|
|
|
|
|
|
%files -n vhba-rules
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/lib/udev/rules.d/*.rules
|
|
|
|
|
2012-05-21 19:30:59 +02:00
|
|
|
%changelog
|