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