BuildRequires: bison
BuildRequires: flex
BuildRequires: libopenssl1.1-devel
+BuildRequires: libunwind-devel
+BuildRequires: libdw-devel
+BuildRequires: libelf-devel
+BuildRequires: elfutils
+BuildRequires: xz-devel
+BuildRequires: binutils-devel
%description
The Linux Kernel, the operating system core itself
%description -n linux-kernel-devel-amlogic-kvim
This package provides kernel map and etc information.
%endif
+
+%package -n linux-kernel-perf
+Summary: The perf performance counter tool
+Group: System/Kernel
+Provides: perf = %{fullVersion}
+
+%description -n linux-kernel-perf
+This package provides the "perf" tool that can be used to monitor performance
+counter events as well as various kernel internal events.
## 0. End of Packages lists
%prep
mv %{_builddir}/boot/* %{buildroot}/boot
mv %{_builddir}/lib %{buildroot}
%endif
+
+# 2-3. Install perf
+install -d %{buildroot}/usr
+make -s -C tools/perf EXTRA_CFLAGS="-fPIE -rdynamic" DESTDIR=%{buildroot}/usr install NO_LIBPERL=1
+rm -rf %{buildroot}/usr/etc
+rm -rf %{buildroot}/usr/lib/debug
+rm -rf %{buildroot}/usr/lib/perf
+rm -rf %{buildroot}/usr/share
## 2. End of install steps
%clean
%files -n linux-kernel-devel-amlogic-kvim
/boot/%{TARGET_VIMS}/kernel/*
%endif
+
+%files -n linux-kernel-perf
+%license COPYING
+/usr/bin/*
+/usr/libexec/*
+/usr/lib/traceevent/*
## 3. End of rpm pack