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