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