%define name oprofile %define version 0.9.7 %define rel 1 Summary: Transparent low-overhead system-wide profiler Name: %name Version: %version Release: %mkrel %rel Group: Development/Other License: GPLv2+ URL: http://oprofile.sourceforge.net/ Source0: http://prdownloads.sourceforge.net/%name/%name-%version.tar.gz # Use -module -avoid-version for agents: Patch2: oprofile-agents-ldflags.patch Source11: %name-16.png Source12: %name-32.png Source13: %name-48.png BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: binutils-devel qt4-devel libpopt-devel gettext-devel BuildRequires: java-rpmbuild %description OProfile is a system-wide profiler for Linux systems, capable of profiling all running code at low overhead. OProfile is released under the GNU GPL. It consists of a kernel driver and a daemon for collecting sample data, and several post-profiling tools for turning data into information. OProfile leverages the hardware performance counters of the CPU to enable profiling of a wide variety of interesting statistics, which can also be used for basic time-spent profiling. All code is profiled: hardware and software interrupt handlers, kernel modules, the kernel, shared libraries, and applications. %package gui Summary: GUI for starting the OProfile profiler Group: Development/Other Requires: usermode usermode-consoleonly Requires: %{name} = %{version} %description gui OProfile is a system-wide profiler for Linux systems, capable of profiling all running code at low overhead. OProfile is released under the GNU GPL. This package provides a convenient QT GUI for starting the profiler. %package jit Summary: Libraries for profiling Java and other JIT compiled code Group: Development/Other %description jit Libraries needed for profiling Java and other JIT compiled code. For profiling Java code, you need to load %{_libdir}/oprofile/libjvmti_oprofile.so into the JVM as per the OProfile documentation. %package devel Summary: Development files for developing OProfile JIT agents Group: Development/Other Requires: %{name}-jit = %{version} %description devel Header and development library symlink for libopagent, required for compiling additional OProfile JIT agents. %prep %setup -q %patch2 -p1 %build export QTDIR=%{qt4dir} # fixes build touch NEWS AUTHORS INSTALL ChangeLog # strange, autoreconf does not create these autoreconf -if %configure2_5x --with-kernel-support \ --with-java=%{java_home} \ --enable-gui=qt4 %make %install rm -rf %{buildroot} %makeinstall_std rm -f %{buildroot}%{_datadir}/doc/%{name}/*.html # root dialog install -d -m755 %{buildroot}%{_sbindir} mv %{buildroot}%{_bindir}/oprof_start %{buildroot}%{_sbindir}/oprof_start ln -s consolehelper %{buildroot}%{_bindir}/oprof_start install -d -m755 %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/mageia-%{name}.desktop <<EOF [Desktop Entry] Name=OProfile starter Comment=Start OProfile profiler Exec=%{_bindir}/oprof_start Icon=%{name} Terminal=false Type=Application Categories=Development;Profiling;Qt; EOF install -m644 %{SOURCE11} -D %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png install -m644 %{SOURCE12} -D %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png install -m644 %{SOURCE13} -D %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png rm %{buildroot}%{_libdir}/oprofile/*a %clean rm -rf %{buildroot} %pre jit %_pre_useradd oprofile "%{_var}/lib/oprofile" /bin/nologin %postun jit %_postun_userdel oprofile %files %defattr(-,root,root) %doc README TODO COPYING ChangeLog* doc/*.html %{_bindir}/opannotate %{_bindir}/oparchive %{_bindir}/opcontrol %{_bindir}/opgprof %{_bindir}/ophelp %{_bindir}/opreport %{_bindir}/oprofiled %{_bindir}/opimport %{_bindir}/opjitconv %{_datadir}/%{name} %{_mandir}/man1/op* %files gui %defattr(-,root,root) %doc COPYING %{_bindir}/oprof_start %{_sbindir}/oprof_start %{_datadir}/applications/mageia-*.desktop %{_iconsdir}/hicolor/*/apps/%{name}.png %files jit %defattr(-,root,root) %dir %{_libdir}/oprofile %{_libdir}/oprofile/libjvmti_oprofile.so %{_libdir}/oprofile/libopagent.so.* %files devel %defattr(-,root,root) %{_includedir}/opagent.h %{_libdir}/oprofile/libopagent.so %changelog * Thu Nov 03 2011 anssi <anssi> 0.9.7-1.mga2 + Revision: 162466 - new version - fix license tag - drop qt4 patch, applied upstream * Sat Jan 15 2011 pterjan <pterjan> 0.9.6-3.mga1 + Revision: 18098 - Build with qt4 (from a patch in SF tracker) + ahmad <ahmad> - drop unneeded/old scriptlets - rename the .desktop file to mageia-* - imported package oprofile * Fri Dec 03 2010 Oden Eriksson <oeriksson@mandriva.com> 0.9.6-2mdv2011.0 + Revision: 607024 - rebuild * Wed Nov 25 2009 Per Ãyvind Karlsen <peroyvind@mandriva.org> 0.9.6-1mdv2010.1 + Revision: 469866 - new release: 0.9.6 - drop patches merged upstream (P0 & P1) * Mon Jul 13 2009 Anssi Hannula <anssi@mandriva.org> 0.9.4-1mdv2010.0 + Revision: 395412 - new version 0.9.4 - introduce oprofile-jit and oprofile-devel - fix missing mode argument (mode-argument.patch from CVS) - fix build on call to basename() (basename.patch from fedora) - add module ldflags to JIT agents (agents-ldflags.patch) * Wed Feb 11 2009 Thierry Vignaud <tv@mandriva.org> 0.9.3-8mdv2009.1 + Revision: 339467 - rebuild for new binutils * Tue Aug 19 2008 Funda Wang <fwang@mandriva.org> 0.9.3-7mdv2009.0 + Revision: 273979 - fix bug in specfile - rebuild + Pixel <pixel@mandriva.com> - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas * Tue Jun 10 2008 Thierry Vignaud <tv@mandriva.org> 0.9.3-6mdv2009.0 + Revision: 217466 - patch 0: fix build with gcc-4.3 - rebuild * Fri Feb 01 2008 Thierry Vignaud <tv@mandriva.org> 0.9.3-4mdv2008.1 + Revision: 161064 - rebuild for new libbfd * Sat Jan 26 2008 Anssi Hannula <anssi@mandriva.org> 0.9.3-3mdv2008.1 + Revision: 158297 - rebuild for new binutils + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tv@mandriva.org> - kill re-definition of %%buildroot on Pixel's request - kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated' * Tue Jul 17 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 0.9.3-2mdv2008.0 + Revision: 52919 - put icon into the right dir (Anssi) * Tue Jul 17 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 0.9.3-1mdv2008.0 + Revision: 52852 - new version - fdo icons - adjust desktop file * Sat Jun 09 2007 Anssi Hannula <anssi@mandriva.org> 0.9.2-5mdv2008.0 + Revision: 37624 - rebuild for new binutils * Fri Jan 19 2007 Anssi Hannula <anssi@mandriva.org> 0.9.2-4mdv2007.0 + Revision: 110661 - rebuild for new gettext * Thu Jan 11 2007 Anssi Hannula <anssi@mandriva.org> 0.9.2-3mdv2007.1 + Revision: 107663 - rebuild for new binutils * Fri Jan 05 2007 Anssi Hannula <anssi@mandriva.org> 0.9.2-2mdv2007.1 + Revision: 104549 - rebuild for new binutils * Sun Oct 29 2006 Anssi Hannula <anssi@mandriva.org> 0.9.2-1mdv2007.1 + Revision: 73619 - 0.9.2 - drop patch0, fixed upstream - Import oprofile * Sun Jul 23 2006 Anssi Hannula <anssi@mandriva.org> 0.9.1-6mdv2007.0 - rebuild for new binutils - xdg menu * Sat May 27 2006 Anssi Hannula <anssi@mandriva.org> 0.9.1-5mdv2007.0 - patch0: fix build with gcc4.1 * Sat May 27 2006 Anssi Hannula <anssi@mandriva.org> 0.9.1-4mdv2007.0 - rebuild for new binutils on x86_64 * Sat Mar 18 2006 Anssi Hannula <anssi@mandriva.org> 0.9.1-3mdk - rebuild * Tue Jan 17 2006 Anssi Hannula <anssi@mandriva.org> 0.9.1-2mdk - fix BuildRequires * Sun Jan 15 2006 Anssi Hannula <anssi@mandriva.org> 0.9.1-1mdk - initial Mandriva release