]>
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 | |
6e07a1f5 JB |
7 | # even though we can install i686 or x86_64 pandoc on x32, it fails with "out of memory" |
8 | %ifnarch %{ix86} %{x8664} | |
9 | %undefine with_ghc | |
10 | %endif | |
d6f91479 | 11 | Summary: Intel Processor Trace Decoder Library |
436c5e6e | 12 | Summary(pl.UTF-8): Biblioteka dekodera Intel PT (śladów procesora Intel) |
d6f91479 | 13 | Name: libipt |
436c5e6e | 14 | Version: 2.0.1 |
d6f91479 AM |
15 | Release: 1 |
16 | License: BSD | |
17 | Group: Libraries | |
436c5e6e JB |
18 | #Source0Download: https://github.com/intel/libipt/releases |
19 | Source0: https://github.com/intel/libipt/archive/v%{version}/%{name}-%{version}.tar.gz | |
20 | # Source0-md5: bae11676b72d341ecb9b33b9add84be8 | |
21 | URL: https://github.com/intel/libipt | |
22 | BuildRequires: cmake >= 2.8.6 | |
23 | %{?with_xed:BuildRequires: intel-xed-devel} | |
24 | # C++ is required only for -DPTUNIT test "ptunit-cpp". | |
25 | %{?with_tests:BuildRequires: libstdc++-devel} | |
6e07a1f5 | 26 | %{?with_ghc:BuildRequires: pandoc} |
436c5e6e JB |
27 | ExclusiveArch: %{ix86} %{x8664} x32 |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
d6f91479 AM |
29 | |
30 | %description | |
31 | The Intel Processor Trace (Intel PT) Decoder Library is Intel's | |
32 | reference implementation for decoding Intel PT. It can be used as a | |
33 | standalone library or it can be partially or fully integrated into | |
34 | your tool. | |
35 | ||
436c5e6e JB |
36 | %description -l pl.UTF-8 |
37 | Biblioteka Intel PT (Intel Processor Trace - śladów procesora Intel) | |
38 | to wzorcowa implementacja Intela do dekodowania Intel PT. Może służyć | |
39 | jako biblioteka samodzielna lub zintegrowana we własne narzędzia. | |
40 | ||
d6f91479 | 41 | %package devel |
436c5e6e JB |
42 | Summary: Header files for Intel Processor Trace Decoder Library |
43 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki dekodera Intel PT | |
b3aba5ad | 44 | Group: Development/Libraries |
d6f91479 | 45 | Requires: %{name} = %{version}-%{release} |
d6f91479 AM |
46 | |
47 | %description devel | |
436c5e6e JB |
48 | This package contains the header files needed to develop programs that |
49 | use the Intel Processor Trace (Intel PT) Decoder Library. | |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów | |
53 | wykorzystujących bibliotekę dekodera Intel PT (śladów procesora | |
54 | Intel). | |
55 | ||
56 | %package tools | |
57 | Summary: Intel Processor Trace tools | |
58 | Summary(pl.UTF-8): Narzędzia Intel PT | |
59 | Group: Development/Tools | |
60 | Requires: %{name} = %{version}-%{release} | |
61 | ||
62 | %description tools | |
63 | Intel Processor Trace tools. | |
64 | ||
65 | %description tools -l pl.UTF-8 | |
66 | Narzędzia Intel PT. | |
d6f91479 AM |
67 | |
68 | %prep | |
436c5e6e | 69 | %setup -q |
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} \ | |
81 | %{?with_xed:-DPTXED:BOOL=ON -DXED_INCLUDE=%{_includedir}/xed} | |
82 | # -DSIDEBAND:BOOL=ON not yet: not installed, binaries depend on it | |
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 | ||
92 | install -d $RPM_BUILD_ROOT%{_bindir} | |
93 | install build/bin/ptdump $RPM_BUILD_ROOT%{_bindir} | |
94 | %if %{with xed} | |
95 | install build/bin/ptxed $RPM_BUILD_ROOT%{_bindir} | |
96 | %endif | |
d6f91479 AM |
97 | |
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
436c5e6e JB |
101 | %post -p /sbin/ldconfig |
102 | %postun -p /sbin/ldconfig | |
d6f91479 AM |
103 | |
104 | %files | |
105 | %defattr(644,root,root,755) | |
436c5e6e JB |
106 | %doc LICENSE README |
107 | %attr(755,root,root) %{_libdir}/libipt.so.*.* | |
108 | %attr(755,root,root) %ghost %{_libdir}/libipt.so.2 | |
d6f91479 AM |
109 | |
110 | %files devel | |
111 | %defattr(644,root,root,755) | |
436c5e6e JB |
112 | %doc doc/{getting_started,howto_capture,howto_libipt}.md |
113 | %attr(755,root,root) %{_libdir}/libipt.so | |
d6f91479 | 114 | %{_includedir}/intel-pt.h |
6e07a1f5 | 115 | %if %{with ghc} |
d6f91479 | 116 | %{_mandir}/man3/pt_*.3* |
6e07a1f5 | 117 | %endif |
436c5e6e JB |
118 | |
119 | %files tools | |
120 | %defattr(644,root,root,755) | |
121 | %attr(755,root,root) %{_bindir}/ptdump | |
122 | %if %{with xed} | |
123 | %attr(755,root,root) %{_bindir}/ptxed | |
124 | %endif |