- up to 2.2.13 + latest fixes
[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_with     verbose         # verbose build (V=1)
5
6 # nothing to be placed to debuginfo package
7 %define         _enable_debug_packages  0
8
9 %define         rel     1
10 %define         pname   lttng-modules
11 Summary:        LTTng 2.x kernel modules
12 Summary(pl.UTF-8):      Moduły jądra LTTng 2.x
13 Name:           %{pname}%{_alt_kernel}
14 Version:        2.12.3
15 Release:        %{rel}@%{_kernel_ver_str}
16 License:        GPL v2
17 Group:          Base/Kernel
18 Source0:        https://lttng.org/files/lttng-modules/%{pname}-%{version}.tar.bz2
19 # Source0-md5:  0855c75f8ed1804bffca5e5fa5017993
20 Patch0:         build.patch
21 Patch1:         git.patch
22 URL:            https://lttng.org/
23 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:3.0}
24 %{?with_kernelsrc:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-source >= 3:3.0}}
25 BuildRequires:  rpmbuild(macros) >= 1.746
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 %{pname}-%{version}/{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 /lib/modules/%{_kernel_ver}/kernel/lttng/lttng-wrapper.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 /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} clean \\\
79         KERNELDIR=%{_kernelsrcdir}\
80 %{__make} \\\
81         KERNELDIR=%{_kernelsrcdir}\
82 p=`pwd`\
83 %{__make} modules_install \\\
84         INSTALL_MOD_PATH=$p/../installed \\\
85         INSTALL_MOD_DIR=kernel/lttng \\\
86         KERNELDIR=%{_kernelsrcdir}\
87 %{nil}
88
89 %{expand:%create_kernel_packages}
90
91 %prep
92 %setup -qc
93 cd  %{pname}-%{version}
94 %patch0 -p1
95 %patch1 -p1
96
97 %build
98 cd  %{pname}-%{version}
99 %{expand:%build_kernel_packages}
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103 install -d $RPM_BUILD_ROOT
104
105 cp -a installed/* $RPM_BUILD_ROOT
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
This page took 0.10106 seconds and 3 git commands to generate.