]>
Commit | Line | Data |
---|---|---|
436c5e6e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without xed # ptxed utility | |
4 | %bcond_without tests # unit tests | |
6e07a1f5 | 5 | %bcond_without ghc # man pages (requires ghc-dependent pandoc) |
436c5e6e | 6 | |
d6f91479 | 7 | Summary: Intel Processor Trace Decoder Library |
436c5e6e | 8 | Summary(pl.UTF-8): Biblioteka dekodera Intel PT (śladów procesora Intel) |
d6f91479 | 9 | Name: libipt |
afc97b0d JB |
10 | Version: 2.1 |
11 | Release: 1 | |
d6f91479 AM |
12 | License: BSD |
13 | Group: Libraries | |
b0abc648 | 14 | #Source0Download: https://github.com/intel/libipt/tags |
436c5e6e | 15 | Source0: https://github.com/intel/libipt/archive/v%{version}/%{name}-%{version}.tar.gz |
afc97b0d | 16 | # Source0-md5: 064e0d369bd30f78ec771a10c88a71ef |
134b3e1f | 17 | Patch0: %{name}-uninitialized.patch |
afc97b0d | 18 | Patch1: %{name}-intel-xed.patch |
436c5e6e | 19 | URL: https://github.com/intel/libipt |
afc97b0d | 20 | BuildRequires: cmake >= 3.1 |
436c5e6e JB |
21 | %{?with_xed:BuildRequires: intel-xed-devel} |
22 | # C++ is required only for -DPTUNIT test "ptunit-cpp". | |
23 | %{?with_tests:BuildRequires: libstdc++-devel} | |
6e07a1f5 | 24 | %{?with_ghc:BuildRequires: pandoc} |
436c5e6e JB |
25 | ExclusiveArch: %{ix86} %{x8664} x32 |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
d6f91479 AM |
27 | |
28 | %description | |
29 | The Intel Processor Trace (Intel PT) Decoder Library is Intel's | |
30 | reference implementation for decoding Intel PT. It can be used as a | |
31 | standalone library or it can be partially or fully integrated into | |
32 | your tool. | |
33 | ||
436c5e6e JB |
34 | %description -l pl.UTF-8 |
35 | Biblioteka Intel PT (Intel Processor Trace - śladów procesora Intel) | |
36 | to wzorcowa implementacja Intela do dekodowania Intel PT. Może służyć | |
37 | jako biblioteka samodzielna lub zintegrowana we własne narzędzia. | |
38 | ||
d6f91479 | 39 | %package devel |
436c5e6e JB |
40 | Summary: Header files for Intel Processor Trace Decoder Library |
41 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki dekodera Intel PT | |
b3aba5ad | 42 | Group: Development/Libraries |
d6f91479 | 43 | Requires: %{name} = %{version}-%{release} |
d6f91479 AM |
44 | |
45 | %description devel | |
436c5e6e JB |
46 | This package contains the header files needed to develop programs that |
47 | use the Intel Processor Trace (Intel PT) Decoder Library. | |
48 | ||
49 | %description devel -l pl.UTF-8 | |
50 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów | |
51 | wykorzystujących bibliotekę dekodera Intel PT (śladów procesora | |
52 | Intel). | |
53 | ||
54 | %package tools | |
55 | Summary: Intel Processor Trace tools | |
56 | Summary(pl.UTF-8): Narzędzia Intel PT | |
57 | Group: Development/Tools | |
58 | Requires: %{name} = %{version}-%{release} | |
59 | ||
60 | %description tools | |
61 | Intel Processor Trace tools. | |
62 | ||
63 | %description tools -l pl.UTF-8 | |
64 | Narzędzia Intel PT. | |
d6f91479 AM |
65 | |
66 | %prep | |
436c5e6e | 67 | %setup -q |
134b3e1f | 68 | %patch0 -p1 |
afc97b0d | 69 | %patch1 -p1 |
d6f91479 AM |
70 | |
71 | %build | |
72 | install -d build | |
73 | cd build | |
436c5e6e | 74 | %cmake .. \ |
d6f91479 | 75 | -DDEVBUILD:BOOL=ON \ |
436c5e6e | 76 | -DFEATURE_ELF:BOOL=ON \ |
6e07a1f5 | 77 | %{?with_ghc:-DMAN:BOOL=ON} \ |
436c5e6e JB |
78 | -DPEVENT:BOOL=ON \ |
79 | -DPTDUMP:BOOL=ON \ | |
80 | %{?with_tests:-DPTUNIT:BOOL=ON} \ | |
afc97b0d JB |
81 | %{?with_xed:-DPTXED:BOOL=ON -DXED_INCLUDE=%{_includedir}/xed} \ |
82 | -DSIDEBAND:BOOL=ON | |
d6f91479 AM |
83 | |
84 | %{__make} | |
85 | ||
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %{__make} -C build install \ | |
436c5e6e JB |
90 | DESTDIR=$RPM_BUILD_ROOT |
91 | ||
afc97b0d JB |
92 | # not installed by cmake |
93 | cp -a build/lib/libipt-sb.so* $RPM_BUILD_ROOT%{_libdir} | |
94 | ||
436c5e6e JB |
95 | install -d $RPM_BUILD_ROOT%{_bindir} |
96 | install build/bin/ptdump $RPM_BUILD_ROOT%{_bindir} | |
97 | %if %{with xed} | |
98 | install build/bin/ptxed $RPM_BUILD_ROOT%{_bindir} | |
99 | %endif | |
d6f91479 AM |
100 | |
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
436c5e6e JB |
104 | %post -p /sbin/ldconfig |
105 | %postun -p /sbin/ldconfig | |
d6f91479 AM |
106 | |
107 | %files | |
108 | %defattr(644,root,root,755) | |
436c5e6e JB |
109 | %doc LICENSE README |
110 | %attr(755,root,root) %{_libdir}/libipt.so.*.* | |
111 | %attr(755,root,root) %ghost %{_libdir}/libipt.so.2 | |
afc97b0d JB |
112 | %attr(755,root,root) %{_libdir}/libipt-sb.so.*.* |
113 | %attr(755,root,root) %ghost %{_libdir}/libipt-sb.so.2 | |
d6f91479 AM |
114 | |
115 | %files devel | |
116 | %defattr(644,root,root,755) | |
436c5e6e JB |
117 | %doc doc/{getting_started,howto_capture,howto_libipt}.md |
118 | %attr(755,root,root) %{_libdir}/libipt.so | |
afc97b0d | 119 | %attr(755,root,root) %{_libdir}/libipt-sb.so |
d6f91479 | 120 | %{_includedir}/intel-pt.h |
6e07a1f5 | 121 | %if %{with ghc} |
d6f91479 | 122 | %{_mandir}/man3/pt_*.3* |
6e07a1f5 | 123 | %endif |
436c5e6e JB |
124 | |
125 | %files tools | |
126 | %defattr(644,root,root,755) | |
127 | %attr(755,root,root) %{_bindir}/ptdump | |
128 | %if %{with xed} | |
129 | %attr(755,root,root) %{_bindir}/ptxed | |
130 | %endif |