File: template-dkms-redhat-kmod.spec

package info (click to toggle)
dkms 2.8.4-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 940 kB
  • sloc: sh: 4,010; makefile: 272; perl: 80; python: 67; ansic: 18
file content (37 lines) | stat: -rw-r--r-- 903 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%{?!module_name: %{error: You did not specify a module name (%%module_name)}}
%{?!version: %{error: You did not specify a module version (%%version)}}
Name:		%{module_name}
Version:	%{version}
Release:	1%{?dist}
Summary:	%{module_name}-%{version} RHEL Driver Update Program package

License:	Unknown
Source0:	%{module_name}-%{version}.tar.bz2
BuildRequires:	%kernel_module_package_buildreqs

%kernel_module_package default

%description
%{module_name}-%{version} RHEL Driver Update package.

%prep
%setup
set -- *
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} M=$PWD/obj/$flavor
done

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