- up to 2.11.0
[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.0
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:  46ec6c566e65cf27b391a1bb643e11b4
21 Patch0:         build.patch
22 URL:            https://lttng.org/
23 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.38}
24 %{?with_kernelsrc:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-source >= 3:2.6.38}}
25 BuildRequires:  rpmbuild(macros) >= 1.701
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 LTTng 2.x kernel modules.
30
31 %description -l pl.UTF-8
32 Moduły jądra LTTng 2.x.
33
34 %define kernel_pkg()\
35 %package -n kernel%{_alt_kernel}-lttng\
36 Summary:        LTTng 2.x modules for Linux kernel\
37 Summary(pl.UTF-8):      Moduły LTTng 2.x dla jądra Linuksa\
38 Release:        %{rel}@%{_kernel_ver_str}\
39 Group:          Base/Kernel\
40 Requires(post,postun):  /sbin/depmod\
41 %requires_releq_kernel\
42 Requires(postun):       %releq_kernel\
43 \
44 %description -n kernel%{_alt_kernel}-lttng\
45 LTTng 2.x modules for Linux kernel.\
46 \
47 %description -n kernel%{_alt_kernel}-lttng -l pl.UTF-8\
48 Moduły LTTng 2.x dla jądra Linuksa.\
49 \
50 %files -n kernel%{_alt_kernel}-lttng\
51 %defattr(644,root,root,755)\
52 %doc ChangeLog LICENSE README.md TODO\
53 %dir /lib/modules/%{_kernel_ver}/kernel/lttng\
54 /lib/modules/%{_kernel_ver}/kernel/lttng/lttng-clock.ko*\
55 /lib/modules/%{_kernel_ver}/kernel/lttng/lttng-ring-buffer-*.ko*\
56 /lib/modules/%{_kernel_ver}/kernel/lttng/lttng-statedump.ko*\
57 /lib/modules/%{_kernel_ver}/kernel/lttng/lttng-tracer.ko*\
58 %dir /lib/modules/%{_kernel_ver}/kernel/lttng/lib\
59 /lib/modules/%{_kernel_ver}/kernel/lttng/lib/lttng-lib-ring-buffer.ko*\
60 %dir /lib/modules/%{_kernel_ver}/kernel/lttng/probes\
61 %{?with_ftrace:/lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-ftrace.ko*}\
62 /lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-kprobes.ko*\
63 /lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-kretprobes.ko*\
64 /lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-probe-*.ko*\
65 /lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-uprobes.ko*\
66 %dir /lib/modules/%{_kernel_ver}/kernel/lttng/tests\
67 /lib/modules/%{_kernel_ver}/kernel/lttng/tests/lttng-clock-plugin-test.ko*\
68 /lib/modules/%{_kernel_ver}/kernel/lttng/tests/lttng-test.ko*\
69 \
70 %post   -n kernel%{_alt_kernel}-lttng\
71 %depmod %{_kernel_ver}\
72 \
73 %postun -n kernel%{_alt_kernel}-lttng\
74 %depmod %{_kernel_ver}\
75 %{nil}
76
77 %define build_kernel_pkg()\
78 %{__make} \\\
79         KERNELDIR=%{_kernelsrcdir}\
80 p=`pwd`\
81 %{__make} modules_install \\\
82         INSTALL_MOD_PATH=$p/installed \\\
83         INSTALL_MOD_DIR=kernel/lttng \\\
84         KERNELDIR=%{_kernelsrcdir}\
85 %{nil}
86
87 %{expand:%create_kernel_packages}
88
89 %prep
90 %setup -q -n %{pname}-%{version}
91 %patch0 -p1
92
93 %build
94 %{expand:%build_kernel_packages}
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT
99
100 cp -a installed/* $RPM_BUILD_ROOT
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
This page took 0.206367 seconds and 3 git commands to generate.