2007-01-12 01:32:05 +01:00
|
|
|
#
|
2010-02-09 22:42:00 +01:00
|
|
|
# spec file for package oprofile (Version 0.9.6)
|
2007-01-12 01:32:05 +01:00
|
|
|
#
|
2010-02-09 22:42:00 +01:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-12 01:32:05 +01:00
|
|
|
#
|
2008-10-23 12:27:14 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-12 01:32:05 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-07-11 21:26:54 +02:00
|
|
|
|
2007-01-12 01:32:05 +01:00
|
|
|
|
|
|
|
Name: oprofile
|
2011-05-02 20:31:50 +02:00
|
|
|
BuildRequires: binutils-devel fdupes java2-devel-packages libxslt popt-devel qt-devel update-desktop-files
|
2007-10-12 01:06:51 +02:00
|
|
|
Url: http://oprofile.sourceforge.net/
|
2010-06-28 12:03:30 +02:00
|
|
|
License: GPLv2+ ; LGPLv2.1+
|
2007-01-12 01:32:05 +01:00
|
|
|
Group: Development/Tools/Other
|
2007-10-12 01:06:51 +02:00
|
|
|
AutoReqProv: on
|
2008-07-19 00:32:25 +02:00
|
|
|
PreReq: /usr/sbin/groupadd /usr/sbin/useradd
|
2010-02-09 22:42:00 +01:00
|
|
|
Version: 0.9.6
|
2011-05-02 20:31:50 +02:00
|
|
|
Release: 3
|
2007-01-12 01:32:05 +01:00
|
|
|
Summary: System-Wide Profiler for Linux Systems
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2009-08-05 00:58:38 +02:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
2007-01-12 01:32:05 +01:00
|
|
|
Source1: %{name}.desktop
|
2009-07-30 22:54:32 +02:00
|
|
|
Source2: %{name}.rpmlintrc
|
2010-02-09 22:42:00 +01:00
|
|
|
Source3: baselibs.conf
|
2010-06-28 12:03:30 +02:00
|
|
|
Source4: jvmpi.h
|
2011-05-02 20:31:50 +02:00
|
|
|
Source5: README-BEFORE-ADDING-PATCHES
|
2009-07-30 22:54:32 +02:00
|
|
|
Patch1: oprofile-0.9.5-buildfixes.diff
|
|
|
|
Patch2: oprofile-0.9.4-fixes.diff
|
2011-05-02 20:31:50 +02:00
|
|
|
Patch3: oprofile-qt4.diff
|
2011-05-03 05:58:39 +02:00
|
|
|
Patch4: oprofile-0.9.6-gcc46.patch
|
2007-01-12 01:32:05 +01:00
|
|
|
|
|
|
|
%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 module and a daemon for collecting sample data,
|
|
|
|
and several post-profiling tools for turning data into information.
|
|
|
|
|
|
|
|
OProfile leverages the CPU hardware performance counters 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 (the only exception being the oprofile
|
|
|
|
interrupt handler itself).
|
|
|
|
|
|
|
|
OProfile is currently in alpha status; however it has proven stable
|
|
|
|
over a large number of differing configurations. As always, there is no
|
|
|
|
warranty.
|
|
|
|
|
|
|
|
This is the package containing the userspace tools.
|
|
|
|
|
2008-07-19 00:32:25 +02:00
|
|
|
%package devel
|
|
|
|
Summary: System-Wide Profiler for Linux Systems
|
|
|
|
Group: Development/Libraries/C and C++
|
2010-02-09 22:42:00 +01:00
|
|
|
License: GPLv2+ ; LGPLv2.1+
|
2008-07-19 00:32:25 +02:00
|
|
|
AutoReqProv: on
|
2009-07-30 22:54:32 +02:00
|
|
|
Requires: libopagent1 = %{version}-%{release} binutils-devel
|
2008-07-19 00:32:25 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
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.
|
|
|
|
|
2008-10-23 12:27:14 +02:00
|
|
|
This package contains the files needed to develop JIT agents for other
|
|
|
|
virtual machines.
|
2008-07-19 00:32:25 +02:00
|
|
|
|
2009-07-30 22:54:32 +02:00
|
|
|
%package -n libopagent1
|
|
|
|
Summary: System-Wide Profiler for Linux Systems
|
|
|
|
Group: Development/Libraries/C and C++
|
2010-02-09 22:42:00 +01:00
|
|
|
License: GPLv2+ ; LGPLv2.1+
|
2009-07-30 22:54:32 +02:00
|
|
|
AutoReqProv: on
|
|
|
|
|
|
|
|
%description -n libopagent1
|
|
|
|
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.
|
|
|
|
|
2010-06-28 12:03:30 +02:00
|
|
|
This package contains the library needed at runtime when profiling JITed code
|
|
|
|
from supported virtual machines.
|
2009-07-30 22:54:32 +02:00
|
|
|
|
2007-01-12 01:32:05 +01:00
|
|
|
%prep
|
2009-08-05 00:58:38 +02:00
|
|
|
%setup -q
|
2009-06-12 19:54:47 +02:00
|
|
|
%patch1
|
|
|
|
%patch2 -p1
|
2011-05-02 20:31:50 +02:00
|
|
|
%patch3 -p1
|
2011-05-03 05:58:39 +02:00
|
|
|
%patch4 -p1
|
2010-06-28 12:03:30 +02:00
|
|
|
mkdir -p java/include
|
|
|
|
# copy files necessary to build Java agent libraries
|
|
|
|
# libjvmpi_oprofile.so and libjvmti_oprofile.so
|
|
|
|
# %S:4 is rpm speak for Source4 (jvmpi.h)
|
|
|
|
ln -s %_libdir/jvm/java/include/* java/include
|
|
|
|
test -f java/include/jvmpi.h || ln -s %{S:4} java/include
|
2007-01-12 01:32:05 +01:00
|
|
|
|
|
|
|
%build
|
2008-07-11 21:26:54 +02:00
|
|
|
autoreconf -fi
|
2007-01-12 01:32:05 +01:00
|
|
|
./configure CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
|
2008-11-20 16:06:19 +01:00
|
|
|
--prefix=/usr --mandir=%{_mandir} --libdir=%{_libdir} \
|
|
|
|
--with-kernel-support --with-java=$PWD/java \
|
2011-05-02 20:31:50 +02:00
|
|
|
--enable-gui=qt4
|
2007-01-12 01:32:05 +01:00
|
|
|
make %{?jobs:-j%jobs}
|
|
|
|
|
|
|
|
%install
|
2007-06-18 18:27:23 +02:00
|
|
|
make DESTDIR=$RPM_BUILD_ROOT htmldir=%{_docdir}/oprofile install
|
2007-01-12 01:32:05 +01:00
|
|
|
%suse_update_desktop_file -i %name Development Profiling
|
2009-08-05 00:58:38 +02:00
|
|
|
rm -vf $RPM_BUILD_ROOT%{_libdir}/libopagent.*a
|
2009-07-30 22:54:32 +02:00
|
|
|
# Hardlink duplicate files automatically (from package fdupes):
|
|
|
|
# It doesn't save much, but it keeps rpmlint from breaking the package build.
|
|
|
|
%fdupes $RPM_BUILD_ROOT
|
2007-01-12 01:32:05 +01:00
|
|
|
|
2008-07-19 00:32:25 +02:00
|
|
|
%pre
|
|
|
|
/usr/sbin/groupadd -r oprofile 2>/dev/null || :
|
|
|
|
/usr/sbin/useradd -r -g oprofile -d /var/lib/empty -s /bin/false -c "Special user account to be used by OProfile" oprofile 2>/dev/null || :
|
|
|
|
|
2009-07-30 22:54:32 +02:00
|
|
|
%post -n libopagent1 -p /sbin/ldconfig
|
2008-10-23 12:27:14 +02:00
|
|
|
|
2009-07-30 22:54:32 +02:00
|
|
|
%postun -n libopagent1 -p /sbin/ldconfig
|
2008-10-23 12:27:14 +02:00
|
|
|
|
2007-01-12 01:32:05 +01:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/bin/*
|
|
|
|
/usr/share/applications/*.desktop
|
|
|
|
/usr/share/oprofile
|
2007-06-18 18:27:23 +02:00
|
|
|
%{_mandir}/man1/*
|
2010-06-28 12:03:30 +02:00
|
|
|
%{_libdir}/libjvm[tp]i_oprofile.so
|
|
|
|
%exclude %{_libdir}/libjvm[tp]i_oprofile.*a
|
2007-06-18 18:27:23 +02:00
|
|
|
%doc doc/oprofile.html doc/internals.html doc/opreport.xsd
|
2009-07-30 22:54:32 +02:00
|
|
|
%doc COPYING README TODO ChangeLog
|
2007-11-26 20:58:01 +01:00
|
|
|
|
2008-07-19 00:32:25 +02:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/include/*
|
|
|
|
%doc doc/op-jit-devel.html
|
2008-10-23 12:27:14 +02:00
|
|
|
%{_libdir}/libopagent.so
|
2008-07-19 00:32:25 +02:00
|
|
|
|
2009-07-30 22:54:32 +02:00
|
|
|
%files -n libopagent1
|
|
|
|
%defattr(-,root,root)
|
2010-06-28 12:03:30 +02:00
|
|
|
%{_libdir}/libopagent.so.1*
|
2009-07-30 22:54:32 +02:00
|
|
|
|
2007-06-18 18:27:23 +02:00
|
|
|
%changelog
|