]> git.pld-linux.org Git - packages/libipt.git/blob - libipt.spec
- updated to 2.1
[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 Summary:        Intel Processor Trace Decoder Library
8 Summary(pl.UTF-8):      Biblioteka dekodera Intel PT (śladów procesora Intel)
9 Name:           libipt
10 Version:        2.1
11 Release:        1
12 License:        BSD
13 Group:          Libraries
14 #Source0Download: https://github.com/intel/libipt/tags
15 Source0:        https://github.com/intel/libipt/archive/v%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5:  064e0d369bd30f78ec771a10c88a71ef
17 Patch0:         %{name}-uninitialized.patch
18 Patch1:         %{name}-intel-xed.patch
19 URL:            https://github.com/intel/libipt
20 BuildRequires:  cmake >= 3.1
21 %{?with_xed:BuildRequires:      intel-xed-devel}
22 # C++ is required only for -DPTUNIT test "ptunit-cpp".
23 %{?with_tests:BuildRequires:    libstdc++-devel}
24 %{?with_ghc:BuildRequires:      pandoc}
25 ExclusiveArch:  %{ix86} %{x8664} x32
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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
39 %package devel
40 Summary:        Header files for Intel Processor Trace Decoder Library
41 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki dekodera Intel PT
42 Group:          Development/Libraries
43 Requires:       %{name} = %{version}-%{release}
44
45 %description devel
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.
65
66 %prep
67 %setup -q
68 %patch0 -p1
69 %patch1 -p1
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
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 # not installed by cmake
93 cp -a build/lib/libipt-sb.so* $RPM_BUILD_ROOT%{_libdir}
94
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
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %post   -p /sbin/ldconfig
105 %postun -p /sbin/ldconfig
106
107 %files
108 %defattr(644,root,root,755)
109 %doc LICENSE README
110 %attr(755,root,root) %{_libdir}/libipt.so.*.*
111 %attr(755,root,root) %ghost %{_libdir}/libipt.so.2
112 %attr(755,root,root) %{_libdir}/libipt-sb.so.*.*
113 %attr(755,root,root) %ghost %{_libdir}/libipt-sb.so.2
114
115 %files devel
116 %defattr(644,root,root,755)
117 %doc doc/{getting_started,howto_capture,howto_libipt}.md
118 %attr(755,root,root) %{_libdir}/libipt.so
119 %attr(755,root,root) %{_libdir}/libipt-sb.so
120 %{_includedir}/intel-pt.h
121 %if %{with ghc}
122 %{_mandir}/man3/pt_*.3*
123 %endif
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
This page took 0.057215 seconds and 4 git commands to generate.