packaging: better conditional build of trace/event
authorJosé Bollo <jose.bollo@open.eurogiciel.org>
Wed, 11 Mar 2015 15:39:04 +0000 (16:39 +0100)
committerJosé Bollo <jose.bollo@open.eurogiciel.org>
Fri, 13 Mar 2015 14:42:33 +0000 (15:42 +0100)
There was when building linux v4.0-rc3 before that patch.
The libraries /lib/traceevent/plugins/*.so were not found.

This is fixed now.

When tuning the build flag 'trace_supported' it also appeared
that this flag is broken and produce a packaging error if set to 0.
The solution used here after some experiment is to remove the
files built during installation. That isn't the best but it does the job.

Change-Id: Ib18f60da890c946c852b5eb4947d64362868de85
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
packaging/linux-stable.spec

index 1149051..25e5c95 100644 (file)
@@ -287,7 +287,11 @@ rm %{buildroot}/etc/bash_completion.d/perf
 
 # Dont package debug files
 rm -rf %{buildroot}/usr/lib/debug/.build-id
-rm -rf %{buildroot}/usr/lib/debug/lib/traceevent/plugins/*.debug
+%if ! %{trace_supported}
+rm %{buildroot}%{_bindir}/trace
+rm -rf %{buildroot}/usr/lib/debug/lib/traceevent
+rm -rf %{buildroot}/lib/traceevent
+%endif
 
 
 
@@ -389,5 +393,5 @@ fi
 %{_libexecdir}/perf-core
 %if %trace_supported
 %{_bindir}/trace
-/%{_lib}/traceevent/plugins/*.so
+/lib/traceevent/plugins/*.so
 %endif