avatar
mikhailnov has added 1a31ee580f
update, use upstream version directly, probably no need to keep versi...

...on synced with cdemu

... ... --- a/.abf.yml
... ... +++ b/.abf.yml
... ... @@ -1,2 +1,2 @@
1 1
sources:
2
  vhba-module-20170610.tar.bz2: a0977815937cd64869140d2726e05ba23723ba05
2
  vhba-module-20200106.tar.bz2: 95df2482553d5e4d5cefa48d47580a6ff2ed4804
view file @ 1a31ee580f
... ... --- a/dkms-vhba.spec
... ... +++ b/dkms-vhba.spec
... ... @@ -1,17 +1,14 @@
1 1
%define module vhba
2 2
%define oname vhba-module
3
# upstream release tarball is a snapshot-style one
4
%define snapshot 20170610
5 3
6 4
Summary:	Virtual SCSI HBA kernel module
7 5
Name:		dkms-vhba
8
# Sync version with cdemu because there's no version for module
9
Version:	3.1.0
10
Release:	0.%{snapshot}.1
6
Version:	20200106
7
Release:	1
11 8
Group:		System/Kernel and hardware
12 9
License:	GPLv2+
13 10
Url:		http://cdemu.sourceforge.net/
14
Source0:	http://downloads.sourceforge.net/cdemu/%{oname}-%{snapshot}.tar.bz2
11
Source0:	http://downloads.sourceforge.net/cdemu/%{oname}-%{version}.tar.bz2
15 12
Source10:	%{name}.rpmlintrc
16 13
Requires:	dkms
17 14
Requires(post,preun):	dkms
... ... @@ -21,22 +18,38 @@ BuildArch: noarch
18 18
Virtual SCSI HBA kernel module. The vhba module is used by cdemu.
19 19
20 20
%files
21
%{_usrsrc}/%{module}-%{version}-%{release}
21
%{_usr}/src/%{module}-%{version}-%{release}
22 22
23 23
%post
24
dkms add	-m %{module} -v %{version}-%{release} --rpm_safe_upgrade &&
25
dkms build	-m %{module} -v %{version}-%{release} --rpm_safe_upgrade &&
26
dkms install	-m %{module} -v %{version}-%{release} --rpm_safe_upgrade
27
true
24
set -x
25
/usr/sbin/dkms --rpm_safe_upgrade add -m %{module} -v %{version}-%{release}
26
27
# Build and install the driver for all available kernels that have devel
28
# files, no matter how these kernels were installed (from RPMs or manually).
29
# Do not fail the installation of the package if the build fails for some
30
# kernels, this may happen during testing, etc.
31
for kk in /lib/modules/*; do
32
	kk=$(echo $kk | sed 's/^\/lib\/modules\///');
33
	if test -d "/lib/modules/$kk/build"; then
34
		/usr/sbin/dkms --rpm_safe_upgrade build -m %{module} -v %{version}-%{release} -k $kk &&
35
		/usr/sbin/dkms --rpm_safe_upgrade install -m %{module} -v %{version}-%{release} -k $kk || :
36
	else
37
		echo "WARNING: No development files for kernel \"$kk\"" > /dev/stderr;
38
	fi;
39
done
28 40
29 41
%preun
30
dkms remove  -m %{module} -v %{version}-%{release} --all --rpm_safe_upgrade
31
true
42
# rmmod can fail (e.g. if the module is not loaded), but it should not stop
43
# deinstallation.
44
/sbin/rmmod %{kname} >/dev/null 2>&1 || :
45
set -x
46
/usr/sbin/dkms --rpm_safe_upgrade remove -m %{module} -v %{version}-%{release} --all || :
47
32 48
33 49
#----------------------------------------------------------------------------
34 50
35 51
%prep
36
%setup -q -n %{oname}-%{snapshot}
52
%setup -q -n %{oname}-%{version}
37 53
rm -rf debian
38 54
39 55
%build
... ... @@ -50,7 +63,7 @@ PACKAGE_NAME="%{module}"
63 63
PACKAGE_VERSION="%{version}-%{release}"
64 64
DEST_MODULE_LOCATION[0]="/kernel/%{module}"
65 65
BUILT_MODULE_NAME[0]="%{module}"
66
MAKE[0]="make KDIR=\${kernel_source_dir}"
67 66
AUTOINSTALL="yes"
67
MAKE="'make' KVER=\${kernelver} KERNELRELEASE=\${kernelver}"
68 68
EOF
69 69
sed -i 's/-Werror//' %{buildroot}%{_usrsrc}/%{module}-%{version}-%{release}/Makefile

Comments