SHA256
1
0
forked from pool/oprofile
oprofile/oprofile.spec
Martin Pluskal dfd2c0e8d0 Accepting request 350773 from home:pluskalm:branches:devel:tools
- Update to 1.1.0
  * New/updated Processor Support
    + Broadcom Brahmma-B15 CPU
    + Intel Skylake
    + Intel Airmont
    + Intel Xeon D
  * Bug fixes
    + Prevent dropping of samples when the JVM changes memory 
      mappings
    + Better handling of IBM Power JVM generated zero-sized 
      mappings
    + Correct handling of anon_hugepage mmap entries for Java
    + Improved oparchive documentation and man page
    + Fixed compile error when using compile fortification
    + Support IBM Power 8 event code larger than sizeof int
    + Avoid changing POSIXLY_CORRECT environment variable for 
      processes monitored by operf and ocount
    + Ensure correct setting of the extra bits (edge, inv, cmask) 
      for Intel processors
    + Fix default unit masks for Intel Haswell and Broadwell 
      processors
    + Correctly initialize operf temporary file header information
- Cleanup spec file with spec-cleaner
- Use url for source
- Drop desktop file since binary it is calling is no longer 
  present (at least since version 1.0.0)
- Update dependencies

OBS-URL: https://build.opensuse.org/request/show/350773
OBS-URL: https://build.opensuse.org/package/show/devel:tools/oprofile?expand=0&rev=38
2015-12-25 17:38:30 +00:00

173 lines
5.7 KiB
RPMSpec

#
# spec file for package oprofile
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: oprofile
Version: 1.1.0
Release: 0
Summary: System-Wide Profiler for Linux Systems
License: GPL-2.0+ and LGPL-2.1+
Group: Development/Tools/Other
Url: http://oprofile.sourceforge.net/
Source0: http://prdownloads.sourceforge.net/oprofile/oprofile-%{version}.tar.gz
Source2: %{name}.rpmlintrc
Source3: baselibs.conf
Source4: jvmpi.h
Source5: README-BEFORE-ADDING-PATCHES
Patch1: %{name}-no-libjvm-version.patch
Patch2: %{name}-pfm-ppc.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: binutils-devel
BuildRequires: docbook-utils
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: java2-devel-packages
BuildRequires: libICE-devel
BuildRequires: libtool
BuildRequires: libxslt
BuildRequires: pkg-config
BuildRequires: popt-devel
BuildRequires: qt-devel
BuildRequires: zlib-devel
Requires(pre): %{_sbindir}/groupadd %{_sbindir}/useradd
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%ifarch ppc ppc64 ppc64le
BuildRequires: libpfm-devel >= 4.3.0
%endif
%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.
%package devel
Summary: System-Wide Profiler for Linux Systems
Group: Development/Libraries/C and C++
Requires: binutils-devel
Requires: libopagent1 = %{version}-%{release}
%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.
This package contains the files needed to develop JIT agents for other
virtual machines.
%package -n libopagent1
Summary: System-Wide Profiler for Linux Systems
Group: Development/Libraries/C and C++
%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.
This package contains the library needed at runtime when profiling JITed code
from supported virtual machines.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
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 %{SOURCE4} java/include
%build
./autogen.sh
%configure \
--with-java=$PWD/java
# Change DATE/TIME macros to use last change time of oprofile.changes
# See http://lists.opensuse.org/opensuse-factory/2011-05/msg00304.html
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\""
find . -type f -regex ".*\.c\|.*\.cpp\|.*\.h" -exec grep -E -e __DATE__ -e __TIME__ {} +
find . -type f -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} htmldir=%{_docdir}/oprofile install
rm -f %{buildroot}%{_libdir}/oprofile/libopagent.*a
# Hardlink duplicate files automatically (from package fdupes):
# It doesn't save much, but it keeps rpmlint from breaking the package build.
%fdupes %{buildroot}
%pre
%{_sbindir}/groupadd -r oprofile 2>/dev/null || :
%{_sbindir}/useradd -r -g oprofile -d %{_localstatedir}/lib/empty -s /bin/false -c "Special user account to be used by OProfile" oprofile 2>/dev/null || :
%post -n libopagent1 -p /sbin/ldconfig
%postun -n libopagent1 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/ocount
%{_bindir}/ophelp
%{_bindir}/opimport
%{_bindir}/opannotate
%{_bindir}/opgprof
%{_bindir}/opreport
%{_bindir}/oparchive
%{_bindir}/opjitconv
%{_bindir}/op-check-perfevents
%{_bindir}/operf
%{_datadir}/oprofile
%{_mandir}/man1/*
%{_libdir}/oprofile/libjvm[tp]i_oprofile.so
%exclude %{_libdir}/oprofile/libjvm[tp]i_oprofile.*a
%doc doc/oprofile.html doc/internals.html doc/opreport.xsd
%doc COPYING README TODO ChangeLog-*
%files devel
%defattr(-,root,root)
%{_includedir}/*
%doc doc/op-jit-devel.html
%dir %{_libdir}/oprofile
%{_libdir}/oprofile/libopagent.so
%files -n libopagent1
%defattr(-,root,root)
%dir %{_libdir}/oprofile
%{_libdir}/oprofile/libopagent.so.1*
%changelog