2014-04-15 23:01:15 +00:00
|
|
|
#
|
|
|
|
# spec file for package lttng-modules
|
|
|
|
#
|
2017-06-12 13:40:57 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-04-15 23:01:15 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
2014-04-30 16:01:24 +00:00
|
|
|
|
2017-08-20 15:50:26 +00:00
|
|
|
|
2017-11-04 21:53:27 +00:00
|
|
|
#%if (0%%{?suse_version} < 1320 || 0%%{?suse_version} > 1320) && !0%%{?is_opensuse}
|
2017-11-04 23:59:54 +00:00
|
|
|
%if 0
|
2017-11-05 00:00:05 +00:00
|
|
|
%ifarch x86_64
|
2017-11-04 21:53:27 +00:00
|
|
|
%define buildrt 1
|
2017-06-12 13:40:57 +00:00
|
|
|
%endif
|
2017-11-05 00:00:05 +00:00
|
|
|
%endif
|
2014-04-15 23:01:15 +00:00
|
|
|
Name: lttng-modules
|
2017-11-04 21:53:27 +00:00
|
|
|
Version: 2.10.3
|
2017-06-12 13:40:57 +00:00
|
|
|
Release: 0
|
2017-11-04 21:53:27 +00:00
|
|
|
Summary: Licensing information for package lttng-modules
|
|
|
|
License: GPL-2.0 AND LGPL-2.1 AND MIT
|
|
|
|
Group: System/Kernel
|
|
|
|
URL: https://lttng.org/
|
|
|
|
Source: https://lttng.org/files/lttng-modules/%{name}-%{version}.tar.bz2
|
2014-04-15 23:01:15 +00:00
|
|
|
Source1: %{name}-preamble
|
2017-06-12 13:40:57 +00:00
|
|
|
Source2: Module.supported
|
2017-11-04 21:53:27 +00:00
|
|
|
Patch0: btrfs-constify-tracepoint-arguments.patch
|
2014-04-15 23:01:15 +00:00
|
|
|
BuildRequires: kernel-devel
|
2014-08-27 22:40:33 +00:00
|
|
|
BuildRequires: kernel-source
|
2017-06-12 13:40:57 +00:00
|
|
|
BuildRequires: kernel-syms
|
2014-04-15 23:01:15 +00:00
|
|
|
BuildRequires: module-init-tools
|
2017-11-04 21:53:27 +00:00
|
|
|
ExclusiveArch: %ix86 x86_64 aarch64 ppc64 ppc64le
|
|
|
|
%if 0%{?buildrt}
|
2017-06-12 13:40:57 +00:00
|
|
|
BuildRequires: kernel-syms-rt
|
|
|
|
%endif
|
2012-02-29 18:21:53 +00:00
|
|
|
|
|
|
|
%description
|
2014-04-15 23:01:15 +00:00
|
|
|
This package provides licensing documentation for the lttng kmp packages.
|
|
|
|
|
2017-11-04 21:53:27 +00:00
|
|
|
%suse_kernel_module_package -p %{name}-preamble ec2 xen xenpae vmi um
|
2014-04-15 23:01:15 +00:00
|
|
|
|
2017-11-04 21:53:27 +00:00
|
|
|
%package KMP
|
|
|
|
Summary: LTTng Kernel Tracing Modules
|
2014-04-15 23:01:15 +00:00
|
|
|
Group: System/Kernel
|
2012-02-29 18:21:53 +00:00
|
|
|
|
2017-11-04 21:53:27 +00:00
|
|
|
%description KMP
|
2014-04-15 23:01:15 +00:00
|
|
|
This package contains the LTTng 2.0 Kernel Modules necessary for
|
|
|
|
instrumenting kernel subsystems.
|
|
|
|
|
2012-02-29 18:21:53 +00:00
|
|
|
%prep
|
2017-06-12 13:40:57 +00:00
|
|
|
%setup -q
|
2017-11-04 21:53:27 +00:00
|
|
|
%if (0%{?suse_version} < 1320 || 0%{?suse_version} > 1320) && !0%{?is_opensuse}
|
|
|
|
%patch0 -p1
|
|
|
|
%endif
|
2012-02-29 18:21:53 +00:00
|
|
|
|
2017-11-04 21:53:27 +00:00
|
|
|
set -- *
|
|
|
|
mkdir source
|
|
|
|
mkdir obj
|
2012-02-29 18:21:53 +00:00
|
|
|
|
2014-04-15 23:01:15 +00:00
|
|
|
for i in "$@"; do
|
|
|
|
case $i in
|
|
|
|
LICENSE|*.txt) ;;
|
|
|
|
*) mv $i source ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2012-02-29 18:21:53 +00:00
|
|
|
%build
|
2017-11-04 21:53:27 +00:00
|
|
|
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
|
|
|
|
for flavor in %{flavors_to_build}; do
|
|
|
|
rm -rf obj/$flavor
|
|
|
|
cp -r source obj/$flavor
|
|
|
|
cp %{SOURCE2} obj/$flavor
|
|
|
|
make %{?_smp_mflags} V=1 -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules M=$PWD/obj/$flavor CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m
|
|
|
|
done
|
2012-02-29 18:21:53 +00:00
|
|
|
|
|
|
|
%install
|
2017-11-04 21:53:27 +00:00
|
|
|
export INSTALL_MOD_PATH=%{buildroot}
|
|
|
|
export INSTALL_MOD_DIR=updates
|
2014-04-15 23:01:15 +00:00
|
|
|
export BRP_PESIGN_FILES="*.ko /lib/firmware"
|
2017-11-04 21:53:27 +00:00
|
|
|
for flavor in %{flavors_to_build}; do
|
|
|
|
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install M=$PWD/obj/$flavor CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m
|
2012-02-29 18:21:53 +00:00
|
|
|
done
|
|
|
|
|
2014-04-15 23:01:15 +00:00
|
|
|
%files
|
|
|
|
%doc LICENSE lgpl-2.1.txt gpl-2.0.txt mit-license.txt
|
2012-02-29 18:21:53 +00:00
|
|
|
|
|
|
|
%changelog
|