3 %bcond_with qt3 # Qt 3 instead of Qt 4
4 %bcond_without gui # no Qt-based GUI
6 Summary: System-wide profiler
7 Summary(pl.UTF-8): Ogólnosystemowy profiler
11 License: GPL v2 (oprofile), LGPL v2.1+ (libopagent)
12 Group: Applications/System
13 Source0: http://downloads.sourceforge.net/oprofile/%{name}-%{version}.tar.gz
14 # Source0-md5: 8b5d1d9b65f84420bcc3234777ad3be3
15 URL: http://oprofile.sourceforge.net/
16 # not used directly, but build fails without it
17 BuildRequires: autoconf
18 BuildRequires: binutils-devel
19 BuildRequires: libstdc++-devel
20 BuildRequires: popt-devel
21 BuildRequires: rpmbuild(macros) >= 1.217
24 BuildRequires: qt-devel >= 3.0
26 BuildRequires: Qt3Support-devel >= 4
27 BuildRequires: QtCore-devel >= 4
28 BuildRequires: QtGui-devel >= 4
29 BuildRequires: qt4-build >= 4
32 Requires: uname(release) >= 2.6
33 Conflicts: kernel < 2.6
34 ExclusiveArch: alpha arm %{ix86} ia64 mips ppc ppc64 %{x8664}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define oprofile_arch %(echo "%{_target_base_arch}" | sed -e 's#x86_64#x86-64#')
40 It consists of a kernel driver and a daemon for collecting sample
41 data, and several post-profiling tools for turning data into
44 OProfile leverages the hardware performance counters of the CPU to
45 enable profiling of a wide variety of interesting statistics, which
46 can also be used for basic time-spent profiling. All code is profiled:
47 hardware and software interrupt handlers, kernel modules, the kernel,
48 shared libraries, and applications.
50 %description -l pl.UTF-8
51 Pakiet składa się ze sterownika dla jądra oraz demona zbierającego
52 próbki danych, a także kilku narzędzi do postprocesingu,
53 przekształcających dane na informacje.
55 OProfile utrzymuje liczniki wydajności sprzętu dla CPU, aby umożliwić
56 profilowanie wielorakich interesujących statystyk, których można
57 używać także do podstawowego profilowania czasu wykonywania.
58 Profilowany jest cały kod: procedury obsługi przerwań sprzętowych i
59 programowych, moduły jądra, jądro, biblioteki współdzielone oraz
63 Summary: Header file for libopagent library
64 Summary(pl.UTF-8): Plik nagłówkowy biblioteki libopagent
66 Group: Development/Libraries
67 Requires: %{name} = %{version}-%{release}
70 Header file for libopagent library.
72 %description devel -l pl.UTF-8
73 Plik nagłówkowy biblioteki libopagent.
76 Summary: Static libopagent library
77 Summary(pl.UTF-8): Statyczna biblioteka libopagent
79 Group: Development/Libraries
80 Requires: %{name}-devel = %{version}-%{release}
83 Static libopagent library.
85 %description static -l pl.UTF-8
86 Statyczna biblioteka libopagent.
89 Summary: Qt-based GUI for OProfile
90 Summary(pl.UTF-8): Oparty na Qt graficzny interfejs użytkownika do OProfile
91 Group: X11/Applications
92 Requires: %{name} = %{version}-%{release}
95 Qt-based GUI for OProfile.
97 %description gui -l pl.UTF-8
98 Oparty na Qt graficzny interfejs użytkownika do OProfile.
105 --enable-gui%{?with_gui:%{!?with_qt3:=qt4}}%{!?with_gui:=no} \
106 --with-kernel-support \
107 %{?with_qt3:--with-qt-includes=%{_includedir}/qt}
110 %{?with_gui:%{!?with_qt3:UIC=uic3}}
113 rm -rf $RPM_BUILD_ROOT
114 install -d $RPM_BUILD_ROOT%{_var}/lib/oprofile
117 DESTDIR=$RPM_BUILD_ROOT
120 rm -rf $RPM_BUILD_ROOT
123 if [ "$1" = 0 ]; then
124 %{_bindir}/opcontrol --shutdown 2>/dev/null 1>&2
125 rm -rf %{_var}/lib/oprofile/*
129 %defattr(644,root,root,755)
130 %doc ChangeLog* README TODO doc/*.html
131 %attr(755,root,root) %{_bindir}/opannotate
132 %attr(755,root,root) %{_bindir}/oparchive
133 %attr(755,root,root) %{_bindir}/opcontrol
134 %attr(755,root,root) %{_bindir}/opgprof
135 %attr(755,root,root) %{_bindir}/ophelp
136 %attr(755,root,root) %{_bindir}/opimport
137 %attr(755,root,root) %{_bindir}/opjitconv
138 %attr(755,root,root) %{_bindir}/opreport
139 %attr(755,root,root) %{_bindir}/oprofiled
141 %exclude %{_bindir}/oprof_start
143 %dir %{_libdir}/oprofile
144 %attr(755,root,root) %{_libdir}/oprofile/libopagent.so.*.*.*
145 %attr(755,root,root) %{_libdir}/oprofile/libopagent.so.1
147 %dir %{_var}/lib/oprofile
148 %{_mandir}/man1/opannotate.1*
149 %{_mandir}/man1/oparchive.1*
150 %{_mandir}/man1/opcontrol.1*
151 %{_mandir}/man1/opgprof.1*
152 %{_mandir}/man1/ophelp.1*
153 %{_mandir}/man1/opimport.1*
154 %{_mandir}/man1/opreport.1*
155 %{_mandir}/man1/oprofile.1*
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_libdir}/oprofile/libopagent.so
160 %{_libdir}/oprofile/libopagent.la
161 %{_includedir}/opagent.h
164 %defattr(644,root,root,755)
165 %{_libdir}/oprofile/libopagent.a
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_bindir}/oprof_start