- up to 2.11.0
[packages/lttng-modules.git] / lttng-modules.spec
CommitLineData
f899359a
JB
1#
2# Conditional build:
83cefbcd
JB
3%bcond_without kernelsrc # probes which require full kernel source (kvm, btrfs, ext4, regmap)
4%bcond_without ftrace # dynamic ftrace module
f899359a 5%bcond_with verbose # verbose build (V=1)
85b0efa4 6
85b0efa4
JR
7# nothing to be placed to debuginfo package
8%define _enable_debug_packages 0
9
882dfc88 10%define rel 1
2735f34a 11%define pname lttng-modules
f899359a
JB
12Summary: LTTng 2.x kernel modules
13Summary(pl.UTF-8): Moduły jądra LTTng 2.x
f9b1df23 14Name: %{pname}%{_alt_kernel}
04f5de01 15Version: 2.11.0
3aed5ada 16Release: %{rel}@%{_kernel_ver_str}
f899359a
JB
17License: GPL v2
18Group: Base/Kernel
c281bdfe 19Source0: https://lttng.org/files/lttng-modules/%{pname}-%{version}.tar.bz2
04f5de01 20# Source0-md5: 46ec6c566e65cf27b391a1bb643e11b4
7528c1a9 21Patch0: build.patch
c281bdfe 22URL: https://lttng.org/
81cb42d3 23%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.38}
83cefbcd 24%{?with_kernelsrc:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-source >= 3:2.6.38}}
81cb42d3 25BuildRequires: rpmbuild(macros) >= 1.701
f899359a
JB
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
f899359a
JB
28%description
29LTTng 2.x kernel modules.
30
31%description -l pl.UTF-8
32Moduły jądra LTTng 2.x.
33
85b0efa4
JR
34%define kernel_pkg()\
35%package -n kernel%{_alt_kernel}-lttng\
36Summary: LTTng 2.x modules for Linux kernel\
37Summary(pl.UTF-8): Moduły LTTng 2.x dla jądra Linuksa\
38Release: %{rel}@%{_kernel_ver_str}\
39Group: Base/Kernel\
40Requires(post,postun): /sbin/depmod\
85b0efa4
JR
41%requires_releq_kernel\
42Requires(postun): %releq_kernel\
85b0efa4
JR
43\
44%description -n kernel%{_alt_kernel}-lttng\
45LTTng 2.x modules for Linux kernel.\
46\
47%description -n kernel%{_alt_kernel}-lttng -l pl.UTF-8\
48Moduły LTTng 2.x dla jądra Linuksa.\
49\
50%files -n kernel%{_alt_kernel}-lttng\
51%defattr(644,root,root,755)\
185a1fe8 52%doc ChangeLog LICENSE README.md TODO\
85b0efa4 53%dir /lib/modules/%{_kernel_ver}/kernel/lttng\
72bf0b9d 54/lib/modules/%{_kernel_ver}/kernel/lttng/lttng-clock.ko*\
85b0efa4
JR
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\
83cefbcd 61%{?with_ftrace:/lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-ftrace.ko*}\
85b0efa4
JR
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*\
04f5de01 65/lib/modules/%{_kernel_ver}/kernel/lttng/probes/lttng-uprobes.ko*\
11a6b978 66%dir /lib/modules/%{_kernel_ver}/kernel/lttng/tests\
72bf0b9d
JR
67/lib/modules/%{_kernel_ver}/kernel/lttng/tests/lttng-clock-plugin-test.ko*\
68/lib/modules/%{_kernel_ver}/kernel/lttng/tests/lttng-test.ko*\
85b0efa4
JR
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}
f899359a 76
85b0efa4
JR
77%define build_kernel_pkg()\
78%{__make} \\\
11a6b978 79 KERNELDIR=%{_kernelsrcdir}\
85b0efa4
JR
80p=`pwd`\
81%{__make} modules_install \\\
82 INSTALL_MOD_PATH=$p/installed \\\
83 INSTALL_MOD_DIR=kernel/lttng \\\
84 KERNELDIR=%{_kernelsrcdir}\
85%{nil}
f899359a 86
81cb42d3 87%{expand:%create_kernel_packages}
f899359a
JB
88
89%prep
bb9b8f0c 90%setup -q -n %{pname}-%{version}
7528c1a9 91%patch0 -p1
f899359a
JB
92
93%build
81cb42d3 94%{expand:%build_kernel_packages}
f899359a
JB
95
96%install
97rm -rf $RPM_BUILD_ROOT
85b0efa4 98install -d $RPM_BUILD_ROOT
f899359a 99
85b0efa4 100cp -a installed/* $RPM_BUILD_ROOT
f899359a
JB
101
102%clean
103rm -rf $RPM_BUILD_ROOT
This page took 0.730232 seconds and 4 git commands to generate.