-
Notifications
You must be signed in to change notification settings - Fork 6
/
xpmem-kmod.spec.in
52 lines (42 loc) · 1.33 KB
/
xpmem-kmod.spec.in
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#define buildforkernels newest
#define buildforkernels current
#define buildforkernels akmod
%define module xpmem
%define version @PACKAGE_VERSION@
%global debug_package %{nil}
%define _unpackaged_files_terminate_build 0
%if "%{?kernel_release}" == ""
%define kernel_release %(uname -r)
%endif
Summary: XPMEM: Cross-partition memory kernel module package
Name: %{module}-kmod-%{kernel_release}
Version: %{version}
Release: 0
License: GPLv2
Packager: Nathan Hjelm
Source: %{module}-%{version}.tar.gz
Group: System Environment/Kernel
BuildRequires: kernel-devel
Provides: xpmem-kmod
%description
XPMEM is a Linux kernel module that enables a process to map the
memory of another process into its virtual address space. Source code
can be obtained by cloning the Git repository, original Mercurial
repository or by downloading a tarball from the link above.
%prep
%setup -n %{module}-%{version}
%build
./configure --with-kernelvers=%{kernel_release}
make
%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=extra/%{module}
make -C kernel modules_install
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d
cp 56-xpmem.rules $RPM_BUILD_ROOT/etc/udev/rules.d
find $RPM_BUILD_ROOT -name 'xpmem.*' | sed -e s@^$RPM_BUILD_ROOT@@ >filelist
%files -f filelist
/etc/udev/rules.d/56-xpmem.rules
%post
touch /etc/udev/rules.d/56-xpmem.rules
depmod -a