From dcb54054e35e58c71d5e3b4c5bccfc4c705ed2fa Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Mon, 25 Mar 2013 11:12:35 -0700 Subject: [PATCH] Add packaging Change-Id: I09052b2de7f0bc0e658592023f04171e77c9bc5d --- packaging/oprofile.changes | 4 ++ packaging/oprofile.spec | 91 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 packaging/oprofile.changes create mode 100644 packaging/oprofile.spec diff --git a/packaging/oprofile.changes b/packaging/oprofile.changes new file mode 100644 index 0000000..be0e8d1 --- /dev/null +++ b/packaging/oprofile.changes @@ -0,0 +1,4 @@ +* Mon Mar 25 2013 Patrick McCarty upstream/0.9.8@9e256c2 +- Add packaging +- Imported Upstream version 0.9.8 + diff --git a/packaging/oprofile.spec b/packaging/oprofile.spec new file mode 100644 index 0000000..8f6bd3e --- /dev/null +++ b/packaging/oprofile.spec @@ -0,0 +1,91 @@ +Name: oprofile +Version: 0.9.8 +Release: 0 +License: GPL-2.0+ and LGPL-2.1+ +Summary: System wide profiler +Url: http://oprofile.sf.net +Group: Base/Tools +Source: %{name}-%{version}.tar.gz +BuildRequires: binutils-devel +BuildRequires: pkgconfig(popt) +Requires: which +Requires(pre): pwdutils + +%description +OProfile is a profiling system for systems running Linux. The +profiling runs transparently during the background, and profile data +can be collected at any time. OProfile makes use of the hardware performance +counters provided on Intel P6, and AMD Athlon family processors, and can use +the RTC for profiling on other x86 processor types. + +See the HTML documentation for further details. + +%package devel +Summary: Header files and libraries for developing apps which will use oprofile +Group: Development/Libraries +Requires: %{name} = %{version} + +%description devel +Header files and libraries for developing apps which will use oprofile. + +%package jit +Summary: Libraries required for profiling Java and other JITed code +Group: Development/Libraries +Requires: %{name} = %{version} + +%description jit +This package includes a base JIT support library, as well as a Java +agent library. + +%prep +%setup -q + +%build +%configure --enable-gui=no +make %{?_smp_mflags} + +%install +%make_install + +mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d +echo "%{_libdir}/oprofile" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/oprofile-%{_arch}.conf + +rm -rf %{buildroot}%{_datadir}/doc + +%pre +getent group oprofile >/dev/null || groupadd -r -g 16 oprofile +getent passwd oprofile >/dev/null || \ +useradd -g oprofile -d /var/lib/oprofile -M -r -u 16 -s /sbin/nologin \ + -c "Special user account to be used by OProfile" oprofile +exit 0 + +%postun +# do not try to remove existing oprofile user or group + +%post jit -p /sbin/ldconfig + +%postun jit -p /sbin/ldconfig + +%docs_package + +%files +%license COPYING +%{_bindir}/ophelp +%{_bindir}/opimport +%{_bindir}/opannotate +%{_bindir}/opcontrol +%{_bindir}/opgprof +%{_bindir}/opreport +%{_bindir}/oprofiled +%{_bindir}/oparchive +%{_bindir}/opjitconv +%{_bindir}/op-check-perfevents +%{_bindir}/operf +%{_datadir}/oprofile + +%files devel +%{_includedir}/opagent.h + +%files jit +%config %{_sysconfdir}/ld.so.conf.d/* +%{_libdir}/oprofile -- 2.34.1