4f87815cd9e1a9f6b5559c4535f4c836d548c723
[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.10.12
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:  844b5a94cd6bf5c26c5980f99b96750c
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 %dir /lib/modules/%{_kernel_ver}/kernel/lttng/tests\
66 /lib/modules/%{_kernel_ver}/kernel/lttng/tests/lttng-clock-plugin-test.ko*\
67 /lib/modules/%{_kernel_ver}/kernel/lttng/tests/lttng-test.ko*\
68 \
69 %post   -n kernel%{_alt_kernel}-lttng\
70 %depmod %{_kernel_ver}\
71 \
72 %postun -n kernel%{_alt_kernel}-lttng\
73 %depmod %{_kernel_ver}\
74 %{nil}
75
76 %define build_kernel_pkg()\
77 %{__make} \\\
78         KERNELDIR=%{_kernelsrcdir}\
79 p=`pwd`\
80 %{__make} modules_install \\\
81         INSTALL_MOD_PATH=$p/installed \\\
82         INSTALL_MOD_DIR=kernel/lttng \\\
83         KERNELDIR=%{_kernelsrcdir}\
84 %{nil}
85
86 %{expand:%create_kernel_packages}
87
88 %prep
89 %setup -q -n %{pname}-%{version}
90 %patch0 -p1
91
92 %build
93 %{expand:%build_kernel_packages}
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT
98
99 cp -a installed/* $RPM_BUILD_ROOT
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
This page took 0.138799 seconds and 2 git commands to generate.