Blame SPECS/oprofile.spec

6a578a
%{?scl:%scl_package oprofile}
6a578a
6a578a
Summary: System wide profiler
6a578a
Name: %{?scl_prefix}oprofile
6a578a
Version: 0.9.9
6a578a
Release: 6%{?dist}
6a578a
License: GPLv2+ and LGPLv2+
6a578a
Group: Development/System
6a578a
#
6a578a
Source0: http://downloads.sourceforge.net/oprofile/oprofile-%{version}.tar.gz
6a578a
#FIXME a workaround until java-1.6.0-openjdk-devel is available on all archs
6a578a
Source1: openjdk-include.tar.gz
6a578a
Requires: binutils
6a578a
Requires: which
6a578a
Requires(pre): shadow-utils
6a578a
Requires(postun): shadow-utils
6a578a
%{?scl:Requires:%scl_runtime}
6a578a
Patch10: oprofile-0.4-guess2.patch
6a578a
Patch83: oprofile-0.9.7-xen.patch
6a578a
Patch303: oprofile-num_symbolic.patch
6a578a
Patch304: oprofile-xml.patch
6a578a
Patch305: oprofile-rhbz1121205.patch
6a578a
Patch400: oprofile-haswell.patch
6a578a
Patch401: oprofile-silvermont.patch
6a578a
Patch402: oprofile-broadwell.patch
6a578a
Patch500: oprofile-aarch64.patch
6a578a
Patch600: oprofile-power8.patch
6a578a
Patch601: oprofile-ppc64le.patch
6a578a
6a578a
URL: http://oprofile.sf.net
6a578a
6a578a
#If oprofile doesn't build on an arch, report it and will add ExcludeArch tag.
6a578a
BuildRequires: qt-devel
6a578a
BuildRequires: libxslt
6a578a
BuildRequires: docbook-style-xsl
6a578a
BuildRequires: docbook-utils
6a578a
BuildRequires: elinks
6a578a
BuildRequires: gtk2-devel
6a578a
BuildRequires: automake
6a578a
BuildRequires: libtool
6a578a
%if 0%{?rhel} >= 7 || 0%{?fedora} >= 15
6a578a
BuildRequires: binutils-static
6a578a
BuildRequires: libpfm-devel >= 4.3.0
6a578a
%else
6a578a
BuildRequires: %{?scl_prefix}binutils-devel
6a578a
BuildRequires: binutils-devel
6a578a
%endif
6a578a
%if 0%{?rhel} == 6
6a578a
BuildRequires: papi-devel
6a578a
%endif
6a578a
%if 0%{?rhel} >= 6
6a578a
BuildRequires: popt-devel
6a578a
%else
6a578a
BuildRequires: popt
6a578a
%endif
6a578a
6a578a
#BuildRequires: java-devel
6a578a
#BuildRequires: jpackage-utils
6a578a
#BuildRequires: java-1.6.0-openjdk-devel
6a578a
6a578a
BuildRoot: %{_tmppath}/%{name}-root
6a578a
6a578a
%description
6a578a
OProfile is a profiling system for systems running Linux. The
6a578a
profiling runs transparently during the background, and profile data
6a578a
can be collected at any time. OProfile makes use of the hardware performance
6a578a
counters provided on Intel P6, and AMD Athlon family processors, and can use
6a578a
the RTC for profiling on other x86 processor types.
6a578a
6a578a
See the HTML documentation for further details.
6a578a
6a578a
%package devel
6a578a
Summary: Header files and libraries for developing apps which will use oprofile
6a578a
Group: Development/Libraries
6a578a
Requires: %{?scl_prefix}oprofile = %{version}-%{release}
6a578a
Provides: %{?scl_prefix}oprofile-static = %{version}-%{release}
6a578a
6a578a
%description devel
6a578a
6a578a
Header files and libraries for developing apps which will use oprofile.
6a578a
6a578a
%package gui
6a578a
Summary: GUI for oprofile
6a578a
Group: Development/System
6a578a
Requires: %{?scl_prefix}oprofile = %{version}-%{release}
6a578a
6a578a
%description gui
6a578a
6a578a
The oprof_start GUI for oprofile.
6a578a
6a578a
%package jit
6a578a
Summary: Libraries required for profiling Java and other JITed code
6a578a
Group: Development/System
6a578a
Requires: %{?scl_prefix}oprofile = %{version}-%{release}
6a578a
#Requires: java >= 1.6
6a578a
#Requires: jpackage-utils
6a578a
Requires(post): /sbin/ldconfig
6a578a
Requires(postun): /sbin/ldconfig
6a578a
Requires: /etc/ld.so.conf.d
6a578a
6a578a
%description jit
6a578a
This package includes a base JIT support library, as well as a Java
6a578a
agent library.
6a578a
6a578a
%prep
6a578a
%setup -q -n %{pkg_name}-%{version} -a1
6a578a
%patch10 -p1 -b .guess2
6a578a
%patch83 -p1 -b .xen
6a578a
%patch303 -p1 -b .num_symbolic
6a578a
%patch304 -p1 -b .xml
6a578a
%patch305 -p1 -b .xml
6a578a
%patch400 -p1 -b .haswell
6a578a
%patch401 -p1 -b .silvermont
6a578a
%patch402 -p1 -b .broadwell
6a578a
%patch500 -p1 -b .aarch64
6a578a
%patch600 -p1 -b .power8
6a578a
%patch601 -p1 -b .ppc64le
6a578a
6a578a
./autogen.sh
6a578a
6a578a
%build
6a578a
6a578a
%global qt_ver qt4
6a578a
6a578a
#The CXXFLAGS below is temporary to work around
6a578a
# bugzilla #113909
6a578a
CXXFLAGS=-g;     export CXXFLAGS
6a578a
6a578a
%configure \
6a578a
--enable-gui=%{qt_ver} \
6a578a
--with-java=`pwd`/java-1.6.0-openjdk-1.6.0.0
6a578a
6a578a
make CFLAGS="$RPM_OPT_FLAGS"
6a578a
6a578a
#tweak the manual pages
6a578a
find -path "*/doc/*.1" -exec \
6a578a
    sed -i -e \
6a578a
     's,/doc/oprofile/,/doc/oprofile-%{version}/,g' {} \;
6a578a
6a578a
%install
6a578a
rm -rf %{buildroot}
6a578a
6a578a
mkdir -p %{buildroot}%{_bindir}
6a578a
mkdir -p %{buildroot}%{_mandir}/man1
6a578a
6a578a
make DESTDIR=%{buildroot} INSTALL="install -p" install
6a578a
6a578a
# We want the manuals in the special doc dir, not the generic doc install dir.
6a578a
# We build it in place and then move it away so it doesn't get installed
6a578a
# twice. rpm can specify itself where the (versioned) docs go with the
6a578a
# %%doc directive.
6a578a
mkdir docs.installed
6a578a
mv %{buildroot}%{_datadir}/doc/oprofile/* docs.installed/
6a578a
6a578a
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
6a578a
echo "%{_libdir}/oprofile" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/oprofile-%{_arch}.conf
6a578a
6a578a
%pre
6a578a
getent group oprofile >/dev/null || groupadd -r -g 16 oprofile
6a578a
getent passwd oprofile >/dev/null || \
6a578a
useradd -g oprofile -d /var/lib/oprofile -M -r -u 16 -s /sbin/nologin \
6a578a
    -c "Special user account to be used by OProfile" oprofile
6a578a
exit 0
6a578a
6a578a
%postun
6a578a
# do not try to remove existing oprofile user or group
6a578a
6a578a
%files
6a578a
%defattr(-,root,root)
6a578a
%doc  docs.installed/*
6a578a
%doc COPYING
6a578a
6a578a
%{_bindir}/*
6a578a
6a578a
%{_mandir}/man1/*
6a578a
6a578a
%{_datadir}/oprofile
6a578a
6a578a
%files devel
6a578a
%defattr(-,root,root)
6a578a
6a578a
%{_includedir}/opagent.h
6a578a
6a578a
%files gui
6a578a
%defattr(-,root,root)
6a578a
6a578a
%{_bindir}/oprof_start
6a578a
6a578a
%post jit -p /sbin/ldconfig
6a578a
6a578a
%postun jit -p /sbin/ldconfig
6a578a
6a578a
%files jit
6a578a
%defattr(-,root,root)
6a578a
6a578a
%{_libdir}/oprofile
6a578a
%{_sysconfdir}/ld.so.conf.d/*
6a578a
6a578a
%changelog
6a578a
* Wed Sep 17 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-6
6a578a
- Update support for Intel Silvermont (Avoton).
6a578a
- Enable configure for ppc64le.
6a578a
6a578a
* Mon Aug 18 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-5
6a578a
- Update Intel Haswell events.
6a578a
- Add support for Intel Silvermont (Avoton).
6a578a
- Add support for Intel Broadwell.
6a578a
- Add support for aarch64.
6a578a
- Update IBM power8 events.
6a578a
6a578a
* Wed May 28 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-2.1
6a578a
- Correct xml output.
6a578a
6a578a
* Fri May 16 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-1.1
6a578a
- Rebase on oprofile-0.9.9.