- up to 2.11.2
[packages/lttng-modules.git] / lttng-modules.spec
1 #
2 # Conditional build:
3 %bcond_without  kernelsrc       # probes which require full kernel source (kvm, btrfs, ext4, regmap)
4 %bcond_without  ftrace          # dynamic ftrace module
5 %bcond_with     verbose         # verbose build (V=1)
6
7 # nothing to be placed to debuginfo package
8 %define         _enable_debug_packages  0
9
10 %define         rel     1
11 %define         pname   lttng-modules
12 Summary:        LTTng 2.x kernel modules
13 Summary(pl.UTF-8):      Moduły jądra LTTng 2.x
14 Name:           %{pname}%{_alt_kernel}
15 Version:        2.11.2
16 Release:        %{rel}@%{_kernel_ver_str}
17 License:        GPL v2
18 Group:          Base/Kernel
19 Source0:        https://lttng.org/files/lttng-modules/%{pname}-%{version}.tar.bz2
20 # Source0-md5:  2e3bc8cfb264fa13f374618b46f170e7
21 Patch0:         build.patch
22 Patch1:         kernel-5.5.3.patch
23 URL:            https://lttng.org/
24 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.38}
25 %{?with_kernelsrc:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-source >= 3:2.6.38}}
26 BuildRequires:  rpmbuild(macros) >= 1.701
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 LTTng 2.x kernel modules.
31
32 %description -l pl.UTF-8
33 Moduły jądra LTTng 2.x.
34
35 %define kernel_pkg()\
36 %package -n kernel%{_alt_kernel}-lttng\
37 Summary:        LTTng 2.x modules for Linux kernel\
38 Summary(pl.UTF-8):      Moduły LTTng 2.x dla jądra Linuksa\
39 Release:        %{rel}@%{_kernel_ver_str}\
40 Group:          Base/Kernel\
41 Requires(post,postun):  /sbin/depmod\
42 %requires_releq_kernel\
43 Requires(postun):       %releq_kernel\
44 \
45 %description -n kernel%{_alt_kernel}-lttng\
46 LTTng 2.x modules for Linux kernel.\
47 \
48 %description -n kernel%{_alt_kernel}-lttng -l pl.UTF-8\
49 Moduły LTTng 2.x dla jądra Linuksa.\
50 \
51 %files -n kernel%{_alt_kernel}-lttng\
52 %defattr(644,root,root,755)\
53 %doc %{pname}-%{version}/{ChangeLog,LICENSE,README.md,TODO}\
54 %dir /lib/modules/%{_kernel_ver}/kernel/lttng\
55 /lib/modules/%{_kernel_ver}/kernel/lttng/lttng-clock.ko*\
56 /lib/modules/%{_kernel_ver}/kernel/lttng/lttng-ring-buffer-*.ko*\
57 /lib/modules/%{_kernel_ver}/kernel/lttng/lttng-statedump.ko*\
58 /lib/modules/%{_kernel_ver}/kernel/lttng/lttng-tracer.ko*\
59 %dir /lib/modules/%{_kernel_ver}/kernel/lttng/lib\
60 /lib/modules/%{_kernel_ver}/kernel/lttng/lib/lttng-lib-ring-buffer.ko*\
61 %dir /lib/modules/%{_kernel_ver}/kernel/lttng/probes\
62 %{?with_ftrace:/lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-ftrace.ko*}\
63 /lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-kprobes.ko*\
64 /lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-kretprobes.ko*\
65 /lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-probe-*.ko*\
66 /lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-uprobes.ko*\
67 %dir /lib/modules/%{_kernel_ver}/kernel/lttng/tests\
68 /lib/modules/%{_kernel_ver}/kernel/lttng/tests/lttng-clock-plugin-test.ko*\
69 /lib/modules/%{_kernel_ver}/kernel/lttng/tests/lttng-test.ko*\
70 \
71 %post   -n kernel%{_alt_kernel}-lttng\
72 %depmod %{_kernel_ver}\
73 \
74 %postun -n kernel%{_alt_kernel}-lttng\
75 %depmod %{_kernel_ver}\
76 %{nil}
77
78 %define build_kernel_pkg()\
79 %{__make} clean \\\
80         KERNELDIR=%{_kernelsrcdir}\
81 %{__make} \\\
82         KERNELDIR=%{_kernelsrcdir}\
83 p=`pwd`\
84 %{__make} modules_install \\\
85         INSTALL_MOD_PATH=$p/../installed \\\
86         INSTALL_MOD_DIR=kernel/lttng \\\
87         KERNELDIR=%{_kernelsrcdir}\
88 %{nil}
89
90 %{expand:%create_kernel_packages}
91
92 %prep
93 %setup -qc
94 cd  %{pname}-%{version}
95 %patch0 -p1
96 %patch1 -p1
97
98 %build
99 cd  %{pname}-%{version}
100 %{expand:%build_kernel_packages}
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT
105
106 cp -a installed/* $RPM_BUILD_ROOT
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
This page took 0.148731 seconds and 3 git commands to generate.