]>
Commit | Line | Data |
---|---|---|
b209f2a8 JB |
1 | # |
2 | # Conditional build: | |
03d26140 | 3 | %bcond_without java # JNI interface [builds with java-sun 1.6, but not gcj 4.9] |
619f5062 | 4 | %bcond_without python # Python agent |
cf788ba2 | 5 | %bcond_without systemtap # SystemTap integration |
140582fd | 6 | %bcond_without static_libs # static libraries |
b209f2a8 JB |
7 | # |
8 | Summary: LTTng Userspace Tracer | |
9 | Summary(pl.UTF-8): LTTng Userspace Tracer - narzędzia LTTng do śledzenia przestrzeni użytkownika | |
10 | Name: lttng-ust | |
365a07b1 | 11 | Version: 2.13.2 |
ec86b2a8 | 12 | Release: 1 |
b209f2a8 JB |
13 | License: LGPL v2.1 (library), MIT (headers), GPL v2 (programs) |
14 | Group: Libraries | |
aa4fbb6f | 15 | Source0: https://lttng.org/files/lttng-ust/%{name}-%{version}.tar.bz2 |
365a07b1 | 16 | # Source0-md5: 6bc28a19f0d4a16ac28e0dbf91d7cc8b |
b209f2a8 | 17 | Patch0: %{name}-link.patch |
5afbdfe9 | 18 | Patch1: %{name}-java.patch |
619f5062 | 19 | Patch2: %{name}-python.patch |
aa4fbb6f | 20 | URL: https://lttng.org/ |
ec86b2a8 | 21 | BuildRequires: autoconf >= 2.69 |
41f57d1a | 22 | BuildRequires: automake >= 1:1.12 |
50148dfb JB |
23 | # for examples build |
24 | BuildRequires: cmake >= 2.8.11 | |
ec86b2a8 | 25 | BuildRequires: libstdc++-devel >= 6:4.7 |
b209f2a8 | 26 | BuildRequires: libtool >= 2:2 |
41f57d1a | 27 | BuildRequires: numactl-devel |
ec86b2a8 | 28 | BuildRequires: pkgconfig |
619f5062 | 29 | %{?with_python:BuildRequires: python >= 1:2.7} |
50148dfb | 30 | BuildRequires: rpmbuild(macros) >= 1.294 |
41f57d1a | 31 | BuildRequires: sed >= 4.0 |
cf788ba2 | 32 | %{?with_systemtap:BuildRequires: systemtap-sdt-devel} |
ec86b2a8 | 33 | BuildRequires: userspace-rcu-devel >= 0.13 |
5afbdfe9 JB |
34 | %if %{with java} |
35 | BuildRequires: java-log4j | |
36 | BuildRequires: jdk | |
37 | BuildRequires: jpackage-utils | |
38 | %endif | |
ec86b2a8 | 39 | Requires: userspace-rcu >= 0.13 |
aa4fbb6f | 40 | ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 mips ppc ppc64 s390 s390x tile |
b209f2a8 JB |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
42 | ||
7f99f27e | 43 | # non-function rcu_reader_bp symbol |
50148dfb | 44 | %define skip_post_check_so_1 liblttng-ust\.so.* liblttng-ust-cyg-profile\.so.* liblttng-ust-cyg-profile-fast\.so.* liblttng-ust-dl\.so.* liblttng-ust-java\.so.* liblttng-ust-python-agent\.so.* liblttng-ust-tracepoint\.so.* |
7f99f27e JB |
45 | # non-function lttng_ust_context_info_tls symbol |
46 | %define skip_post_check_so_2 liblttng-ust-jul-jni\.so.* liblttng-ust-log4j-jni\.so.* | |
ec86b2a8 JB |
47 | # lttng_ust_sigbus_state symbol must be defined in executable |
48 | %define skip_post_check_so_3 liblttng-ust-ctl\.so.* | |
7f99f27e | 49 | |
ec86b2a8 | 50 | %define skip_post_check_so %{skip_post_check_so_1} %{skip_post_check_so_2} %{skip_post_check_so_3} |
b209f2a8 JB |
51 | |
52 | %description | |
53 | The LTTng Userspace Tracer (UST) is a library accompanied by a set of | |
54 | tools to trace userspace code. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | LTTng Userspace Tracer (UST) to biblioteka, której towarzyszą | |
58 | narzędzia do śledzenia kodu w przestrzeni użytkownika. | |
59 | ||
60 | %package devel | |
61 | Summary: Header files for LTTNG-UST libraries | |
62 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek LTTNG-UST | |
63 | Group: Development/Libraries | |
64 | Requires: %{name} = %{version}-%{release} | |
ec86b2a8 | 65 | Requires: userspace-rcu-devel >= 0.13 |
28705e5d | 66 | %{?with_systemtap:Requires: systemtap-sdt-devel} |
b209f2a8 JB |
67 | |
68 | %description devel | |
69 | Header files for LTTNG-UST libraries. | |
70 | ||
71 | %description devel -l pl.UTF-8 | |
72 | Pliki nagłówkowe bibliotek LTTNG-UST. | |
73 | ||
74 | %package static | |
75 | Summary: Static LTTNG-UST libraries | |
76 | Summary(pl.UTF-8): Statyczne biblioteki LTTNG-UST | |
77 | Group: Development/Libraries | |
78 | Requires: %{name}-devel = %{version}-%{release} | |
79 | ||
80 | %description static | |
81 | Static LTTNG-UST libraries. | |
82 | ||
83 | %description static -l pl.UTF-8 | |
84 | Statyczne biblioteki LTTNG-UST. | |
85 | ||
86 | %package -n java-lttng-ust | |
87 | Summary: JNI interface for LTTng Userspace Tracer library | |
88 | Summary(pl.UTF-8): Interfejs JNI do biblioteki LTTng Userspace Tracer | |
89 | Group: Libraries/Java | |
90 | Requires: %{name} = %{version}-%{release} | |
91 | ||
92 | %description -n java-lttng-ust | |
93 | JNI interface for LTTng Userspace Tracer library. | |
94 | ||
95 | %description -n java-lttng-ust -l pl.UTF-8 | |
96 | Interfejs JNI do biblioteki LTTng Userspace Tracer. | |
97 | ||
619f5062 JB |
98 | %package -n python-lttng-ust |
99 | Summary: Python agent for LTTng Userspace Tracer library | |
100 | Summary(pl.UTF-8): Agent Pythona do biblioteki LTTng Userspace Tracer | |
101 | Group: Libraries/Python | |
102 | Requires: %{name} = %{version}-%{release} | |
103 | ||
104 | %description -n python-lttng-ust | |
105 | Python agent for LTTng Userspace Tracer library. | |
106 | ||
107 | %description -n python-lttng-ust -l pl.UTF-8 | |
108 | Agent Pythona do biblioteki LTTng Userspace Tracer. | |
109 | ||
b209f2a8 JB |
110 | %prep |
111 | %setup -q | |
112 | %patch0 -p1 | |
5afbdfe9 | 113 | %patch1 -p1 |
619f5062 | 114 | %patch2 -p1 |
b209f2a8 | 115 | |
41f57d1a JB |
116 | %{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' tools/lttng-gen-tp |
117 | ||
b209f2a8 JB |
118 | %build |
119 | %{__libtoolize} | |
120 | %{__aclocal} -I config | |
121 | %{__autoconf} | |
122 | %{__autoheader} | |
123 | %{__automake} | |
5afbdfe9 | 124 | export CLASSPATH=.:%{_javadir}/log4j.jar |
b209f2a8 | 125 | %configure \ |
03d26140 | 126 | %{?with_java:JAVA_HOME="%{java_home}" JAVAC=javac} \ |
b209f2a8 | 127 | --disable-silent-rules \ |
5afbdfe9 | 128 | %{?with_java:--enable-jni-interface --enable-java-agent-all} \ |
619f5062 | 129 | %{?with_python:--enable-python-agent} \ |
140582fd JB |
130 | %{?with_systemtap:--with-sdt} \ |
131 | %{?with_static_libs:--enable-static} | |
b209f2a8 | 132 | |
7f99f27e | 133 | %{__make} -j1 |
b209f2a8 JB |
134 | |
135 | %install | |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
138 | %{__make} install \ | |
567ef3fb JB |
139 | DESTDIR=$RPM_BUILD_ROOT \ |
140 | lttnglibjavadir=%{_javadir} | |
b209f2a8 JB |
141 | |
142 | # *.la kept - no .pc files for individual libraries | |
143 | ||
144 | install -d $RPM_BUILD_ROOT%{_examplesdir} | |
145 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/lttng-ust/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
146 | # packaged as %doc | |
5afbdfe9 | 147 | %{__rm} $RPM_BUILD_ROOT%{_docdir}/lttng-ust/{ChangeLog,README.md,java-agent.txt} |
b209f2a8 JB |
148 | |
149 | %if %{with java} | |
140582fd JB |
150 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/liblttng-ust-{context-jni,java,jul-jni,log4j-jni}.la \ |
151 | %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/liblttng-ust-{context-jni,java,jul-jni,log4j-jni}.a} | |
b209f2a8 | 152 | %endif |
619f5062 | 153 | %if %{with python} |
140582fd JB |
154 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/liblttng-ust-python-agent.la \ |
155 | %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/liblttng-ust-python-agent.a} | |
619f5062 JB |
156 | %py_postclean |
157 | %endif | |
b209f2a8 JB |
158 | |
159 | %clean | |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | ||
162 | %post -p /sbin/ldconfig | |
163 | %postun -p /sbin/ldconfig | |
164 | ||
165 | %post -n java-lttng-ust -p /sbin/ldconfig | |
166 | %postun -n java-lttng-ust -p /sbin/ldconfig | |
167 | ||
619f5062 JB |
168 | %post -n python-lttng-ust -p /sbin/ldconfig |
169 | %postun -n python-lttng-ust -p /sbin/ldconfig | |
170 | ||
b209f2a8 JB |
171 | %files |
172 | %defattr(644,root,root,755) | |
ec86b2a8 | 173 | %doc ChangeLog LICENSE README.md |
b209f2a8 | 174 | %attr(755,root,root) %{_libdir}/liblttng-ust.so.*.*.* |
ec86b2a8 JB |
175 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust.so.1 |
176 | %attr(755,root,root) %{_libdir}/liblttng-ust-common.so.*.*.* | |
177 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-common.so.1 | |
b209f2a8 | 178 | %attr(755,root,root) %{_libdir}/liblttng-ust-ctl.so.*.*.* |
ec86b2a8 | 179 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-ctl.so.5 |
b209f2a8 | 180 | %attr(755,root,root) %{_libdir}/liblttng-ust-cyg-profile.so.*.*.* |
ec86b2a8 | 181 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-cyg-profile.so.1 |
b209f2a8 | 182 | %attr(755,root,root) %{_libdir}/liblttng-ust-cyg-profile-fast.so.*.*.* |
ec86b2a8 | 183 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-cyg-profile-fast.so.1 |
567ef3fb | 184 | %attr(755,root,root) %{_libdir}/liblttng-ust-dl.so.*.*.* |
ec86b2a8 | 185 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-dl.so.1 |
50148dfb | 186 | %attr(755,root,root) %{_libdir}/liblttng-ust-fd.so.*.*.* |
ec86b2a8 | 187 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-fd.so.1 |
b209f2a8 | 188 | %attr(755,root,root) %{_libdir}/liblttng-ust-fork.so.*.*.* |
ec86b2a8 | 189 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-fork.so.1 |
b209f2a8 | 190 | %attr(755,root,root) %{_libdir}/liblttng-ust-libc-wrapper.so.*.*.* |
ec86b2a8 | 191 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-libc-wrapper.so.1 |
567ef3fb | 192 | %attr(755,root,root) %{_libdir}/liblttng-ust-pthread-wrapper.so.*.*.* |
ec86b2a8 | 193 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-pthread-wrapper.so.1 |
b209f2a8 | 194 | %attr(755,root,root) %{_libdir}/liblttng-ust-tracepoint.so.*.*.* |
ec86b2a8 | 195 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-tracepoint.so.1 |
b209f2a8 JB |
196 | |
197 | %files devel | |
198 | %defattr(644,root,root,755) | |
199 | %attr(755,root,root) %{_bindir}/lttng-gen-tp | |
200 | %attr(755,root,root) %{_libdir}/liblttng-ust.so | |
ec86b2a8 | 201 | %attr(755,root,root) %{_libdir}/liblttng-ust-common.so |
b209f2a8 JB |
202 | %attr(755,root,root) %{_libdir}/liblttng-ust-ctl.so |
203 | %attr(755,root,root) %{_libdir}/liblttng-ust-cyg-profile.so | |
204 | %attr(755,root,root) %{_libdir}/liblttng-ust-cyg-profile-fast.so | |
567ef3fb | 205 | %attr(755,root,root) %{_libdir}/liblttng-ust-dl.so |
50148dfb | 206 | %attr(755,root,root) %{_libdir}/liblttng-ust-fd.so |
b209f2a8 JB |
207 | %attr(755,root,root) %{_libdir}/liblttng-ust-fork.so |
208 | %attr(755,root,root) %{_libdir}/liblttng-ust-libc-wrapper.so | |
567ef3fb | 209 | %attr(755,root,root) %{_libdir}/liblttng-ust-pthread-wrapper.so |
b209f2a8 JB |
210 | %attr(755,root,root) %{_libdir}/liblttng-ust-tracepoint.so |
211 | %{_libdir}/liblttng-ust.la | |
ec86b2a8 | 212 | %{_libdir}/liblttng-ust-common.la |
b209f2a8 JB |
213 | %{_libdir}/liblttng-ust-ctl.la |
214 | %{_libdir}/liblttng-ust-cyg-profile.la | |
215 | %{_libdir}/liblttng-ust-cyg-profile-fast.la | |
567ef3fb | 216 | %{_libdir}/liblttng-ust-dl.la |
50148dfb | 217 | %{_libdir}/liblttng-ust-fd.la |
b209f2a8 JB |
218 | %{_libdir}/liblttng-ust-fork.la |
219 | %{_libdir}/liblttng-ust-libc-wrapper.la | |
567ef3fb | 220 | %{_libdir}/liblttng-ust-pthread-wrapper.la |
b209f2a8 JB |
221 | %{_libdir}/liblttng-ust-tracepoint.la |
222 | %{_includedir}/lttng | |
223 | %{_pkgconfigdir}/lttng-ust.pc | |
41f57d1a | 224 | %{_pkgconfigdir}/lttng-ust-ctl.pc |
b209f2a8 | 225 | %{_mandir}/man1/lttng-gen-tp.1* |
7f99f27e | 226 | %{_mandir}/man3/do_tracepoint.3* |
b209f2a8 JB |
227 | %{_mandir}/man3/lttng-ust.3* |
228 | %{_mandir}/man3/lttng-ust-cyg-profile.3* | |
567ef3fb | 229 | %{_mandir}/man3/lttng-ust-dl.3* |
ec86b2a8 | 230 | %{_mandir}/man3/lttng_ust_*.3* |
7f99f27e JB |
231 | %{_mandir}/man3/tracef.3* |
232 | %{_mandir}/man3/tracelog.3* | |
233 | %{_mandir}/man3/tracepoint.3* | |
234 | %{_mandir}/man3/tracepoint_enabled.3* | |
b209f2a8 JB |
235 | %{_examplesdir}/%{name}-%{version} |
236 | ||
140582fd | 237 | %if %{with static_libs} |
b209f2a8 JB |
238 | %files static |
239 | %defattr(644,root,root,755) | |
240 | %{_libdir}/liblttng-ust.a | |
ec86b2a8 | 241 | %{_libdir}/liblttng-ust-common.a |
b209f2a8 JB |
242 | %{_libdir}/liblttng-ust-ctl.a |
243 | %{_libdir}/liblttng-ust-cyg-profile.a | |
244 | %{_libdir}/liblttng-ust-cyg-profile-fast.a | |
567ef3fb | 245 | %{_libdir}/liblttng-ust-dl.a |
50148dfb | 246 | %{_libdir}/liblttng-ust-fd.a |
b209f2a8 JB |
247 | %{_libdir}/liblttng-ust-fork.a |
248 | %{_libdir}/liblttng-ust-libc-wrapper.a | |
567ef3fb | 249 | %{_libdir}/liblttng-ust-pthread-wrapper.a |
b209f2a8 | 250 | %{_libdir}/liblttng-ust-tracepoint.a |
140582fd | 251 | %endif |
b209f2a8 JB |
252 | |
253 | %if %{with java} | |
254 | %files -n java-lttng-ust | |
255 | %defattr(644,root,root,755) | |
5afbdfe9 | 256 | %doc doc/java-agent.txt |
7f99f27e JB |
257 | %attr(755,root,root) %{_libdir}/liblttng-ust-context-jni.so.*.*.* |
258 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-context-jni.so.0 | |
259 | %attr(755,root,root) %{_libdir}/liblttng-ust-context-jni.so | |
b209f2a8 JB |
260 | %attr(755,root,root) %{_libdir}/liblttng-ust-java.so.*.*.* |
261 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-java.so.0 | |
262 | %attr(755,root,root) %{_libdir}/liblttng-ust-java.so | |
567ef3fb JB |
263 | %attr(755,root,root) %{_libdir}/liblttng-ust-jul-jni.so.*.*.* |
264 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-jul-jni.so.0 | |
265 | %attr(755,root,root) %{_libdir}/liblttng-ust-jul-jni.so | |
5afbdfe9 JB |
266 | %attr(755,root,root) %{_libdir}/liblttng-ust-log4j-jni.so.*.*.* |
267 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-log4j-jni.so.0 | |
268 | %attr(755,root,root) %{_libdir}/liblttng-ust-log4j-jni.so | |
5afbdfe9 | 269 | %{_javadir}/liblttng-ust-agent.jar |
b209f2a8 | 270 | %{_javadir}/liblttng-ust-java.jar |
7f99f27e JB |
271 | %{_javadir}/lttng-ust-agent-all-1.0.0.jar |
272 | %{_javadir}/lttng-ust-agent-all.jar | |
273 | %{_javadir}/lttng-ust-agent-common-1.0.0.jar | |
274 | %{_javadir}/lttng-ust-agent-common.jar | |
275 | %{_javadir}/lttng-ust-agent-jul-1.0.0.jar | |
276 | %{_javadir}/lttng-ust-agent-jul.jar | |
277 | %{_javadir}/lttng-ust-agent-log4j-1.0.0.jar | |
278 | %{_javadir}/lttng-ust-agent-log4j.jar | |
b209f2a8 | 279 | %endif |
619f5062 JB |
280 | |
281 | %if %{with python} | |
282 | %files -n python-lttng-ust | |
283 | %defattr(644,root,root,755) | |
284 | %attr(755,root,root) %{_libdir}/liblttng-ust-python-agent.so.*.*.* | |
ec86b2a8 | 285 | %attr(755,root,root) %ghost %{_libdir}/liblttng-ust-python-agent.so.1 |
619f5062 JB |
286 | %attr(755,root,root) %{_libdir}/liblttng-ust-python-agent.so |
287 | %{py_sitescriptdir}/lttngust | |
288 | %{py_sitescriptdir}/lttngust-%{version}-py*.egg-info | |
289 | %endif |