]> git.pld-linux.org Git - packages/libipt.git/blob - libipt.spec
8938d3d323aa052e604363b978c5c985f23e0bba
[packages/libipt.git] / libipt.spec
1 #
2 # Conditional build:
3 %bcond_without  xed     # ptxed utility
4 %bcond_without  tests   # unit tests
5 %bcond_without  ghc     # man pages (requires ghc-dependent pandoc)
6
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
11 Summary:        Intel Processor Trace Decoder Library
12 Summary(pl.UTF-8):      Biblioteka dekodera Intel PT (śladów procesora Intel)
13 Name:           libipt
14 Version:        2.0.1
15 Release:        1
16 License:        BSD
17 Group:          Libraries
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}
26 %{?with_ghc:BuildRequires:      pandoc}
27 ExclusiveArch:  %{ix86} %{x8664} x32
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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
41 %package devel
42 Summary:        Header files for Intel Processor Trace Decoder Library
43 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki dekodera Intel PT
44 Group:          Development/Libraries
45 Requires:       %{name} = %{version}-%{release}
46
47 %description devel
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.
67
68 %prep
69 %setup -q
70
71 %build
72 install -d build
73 cd build
74 %cmake .. \
75         -DDEVBUILD:BOOL=ON \
76         -DFEATURE_ELF:BOOL=ON \
77         %{?with_ghc:-DMAN:BOOL=ON} \
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
83
84 %{__make}
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88
89 %{__make} -C build install \
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
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %post   -p /sbin/ldconfig
102 %postun -p /sbin/ldconfig
103
104 %files
105 %defattr(644,root,root,755)
106 %doc LICENSE README
107 %attr(755,root,root) %{_libdir}/libipt.so.*.*
108 %attr(755,root,root) %ghost %{_libdir}/libipt.so.2
109
110 %files devel
111 %defattr(644,root,root,755)
112 %doc doc/{getting_started,howto_capture,howto_libipt}.md
113 %attr(755,root,root) %{_libdir}/libipt.so
114 %{_includedir}/intel-pt.h
115 %if %{with ghc}
116 %{_mandir}/man3/pt_*.3*
117 %endif
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
This page took 0.047847 seconds and 2 git commands to generate.