1 |
slords |
1.1 |
## Build directory |
2 |
|
|
%_topdir %(echo $HOME)/rpms |
3 |
|
|
|
4 |
|
|
%_signature gpg |
5 |
|
|
%_gpg_name SME Server 7 signing key <bugteam@contribs.org> |
6 |
|
|
%_gpgbin /usr/bin/gpg |
7 |
|
|
|
8 |
|
|
%_packager SME Server, Inc. <http://smeserver.org> |
9 |
|
|
|
10 |
|
|
## Disable the -debug symbol packages |
11 |
|
|
%debug_package %{nil} |
12 |
|
|
|
13 |
|
|
# Compiler optimizations |
14 |
|
|
%_smp_mflags -j5 |
15 |
|
|
|
16 |
|
|
%distversion %(rpm -qf --qf='%{VERSION}' /etc/redhat-release) |
17 |
slords |
1.3 |
%dist .el%{distversion}.sme |
18 |
|
|
%smerelease() %(echo "%{?1}%{?dist}.%{?2}" | sed -e's|\\.$||') |
19 |
slords |
1.1 |
|
20 |
|
|
#--------------------------------------------------------------------- |
21 |
|
|
|
22 |
|
|
%evr %{?epoch:%{epoch}:}%{version}-%{release} |
23 |
|
|
|
24 |
|
|
%_kversion %(ls /usr/src/kernels/ | sed -n 's|^\\([^-]\\+-[^-]\\+\\)-.*|\\1|p' | tail -1) |
25 |
|
|
%_krelver %(echo "%{_kversion}" | sed -e 's|-|_|g') |
26 |
|
|
|
27 |
|
|
%kmod_kernelsrcdir() %(echo "/usr/src/kernels/%{_kversion}-%{?1}-%{_target_cpu}" | sed -e's|--|-|') |
28 |
|
|
%kmod_moduledir() /lib/modules/%{_kversion}%{?1}/updates |
29 |
|
|
|
30 |
|
|
%_with_smp %(test -d %{kmod_kernelsrcdir smp} && echo 1 || echo 0) |
31 |
|
|
%_with_hugemem %(test -d %{kmod_kernelsrcdir hugemem} && echo 1 || echo 0) |
32 |
|
|
|
33 |
|
|
%kmod() \ |
34 |
|
|
%{expand:%%global _kmodname %1} \ |
35 |
|
|
%{expand:%%global _kmodversion %2} \ |
36 |
|
|
%{expand:%%global _kmodrelease %3} \ |
37 |
|
|
Name: kmod-%{_kmodname} \ |
38 |
|
|
Version: %{_kmodversion} \ |
39 |
|
|
Release: %{_kmodrelease}.%{_krelver} \ |
40 |
|
|
Packager: %{_packager} \ |
41 |
|
|
License: GPL \ |
42 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(id -u -n)-root |
43 |
|
|
|
44 |
|
|
%kmod_dependencies() \ |
45 |
|
|
Summary: %{_kmodname} kernel module(s) \ |
46 |
|
|
Group: System Environment/Kernel \ |
47 |
|
|
BuildRequires: gcc \ |
48 |
|
|
BuildRequires: %(echo "kernel-%{?1}-devel" | sed -e's|--|-|') = %{_kversion} \ |
49 |
|
|
Requires: /sbin/depmod \ |
50 |
|
|
Requires: %(echo "kernel-%{?1}-%{_target_cpu}" | sed -e's|--|-|') = %{_kversion} \ |
51 |
|
|
Provides: %{_kmodname}-kmod = %{evr} \ |
52 |
|
|
Provides: kernel-modules = %{_kversion}%{?1} \ |
53 |
|
|
Provides: %(echo "kmod-%{_kmodname}-%{?1}" | sed -e's|-$||') = %{evr} |
54 |
|
|
|
55 |
|
|
%kmod_desc() \ |
56 |
|
|
%description %{?1}\ |
57 |
|
|
This package provides the %{_kmodname} kernel modules built for the Linux \ |
58 |
|
|
kernel %{_kversion}%{?1} for the %{_target_cpu} family of processors. |
59 |
|
|
|
60 |
|
|
%kmod_scripts() \ |
61 |
|
|
%post %{?1} \ |
62 |
|
|
depmod -aeF /boot/System.map-%{_kversion}%{?1} %{_kversion}%{?1} > /dev/null 2>&1 || : \ |
63 |
|
|
%postun %{?1} \ |
64 |
|
|
depmod -aeF /boot/System.map-%{_kversion}%{?1} %{_kversion}%{?1} > /dev/null 2>&1 || : |