[trace-gui/el6/master] New package

Jon Stanley jstanley at fedoraproject.org
Thu Mar 3 17:30:31 UTC 2011


commit d5180bb23b569e4f7630b66218d536af26d1699f
Author: Jon Stanley <jonstanley at gmail.com>
Date:   Thu Mar 3 12:30:07 2011 -0500

    New package

 .gitignore                          |    1 +
 kernelshark.desktop                 |    7 +++
 sources                             |    1 +
 trace-cmd-1.0.4-rpm-opt-flags.patch |   12 ++++++
 trace-gui.spec                      |   73 +++++++++++++++++++++++++++++++++++
 5 files changed, 94 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4532e62 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/trace-cmd-1.0.4.tar.bz2
diff --git a/kernelshark.desktop b/kernelshark.desktop
new file mode 100644
index 0000000..e51a7ab
--- /dev/null
+++ b/kernelshark.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=Kernelshark
+Comment=Analyze data output by trace-cmd
+Exec=kernelshark
+Type=Application
+Categories=Development;Profiling;
+Icon=applications-development
diff --git a/sources b/sources
index e69de29..9cca8be 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6928e17a30a30223e7b792b6c1f049ac  trace-cmd-1.0.4.tar.bz2
diff --git a/trace-cmd-1.0.4-rpm-opt-flags.patch b/trace-cmd-1.0.4-rpm-opt-flags.patch
new file mode 100644
index 0000000..eef8a72
--- /dev/null
+++ b/trace-cmd-1.0.4-rpm-opt-flags.patch
@@ -0,0 +1,12 @@
+diff -up trace-cmd-1.0.4/Makefile.orig trace-cmd-1.0.4/Makefile
+--- trace-cmd-1.0.4/Makefile.orig	2011-02-15 10:44:22.594567168 -0500
++++ trace-cmd-1.0.4/Makefile	2011-02-15 10:45:52.314478315 -0500
+@@ -158,7 +158,7 @@ KERNELSHARK_VERSION = $(KS_VERSION).$(KS
+ 
+ INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES)
+ 
+-CFLAGS = -g -Wall $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ)
++CFLAGS = $(RPM_OPT_FLAGS) -g -Wall $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ)
+ 
+ ifeq ($(VERBOSE),1)
+   Q =
diff --git a/trace-gui.spec b/trace-gui.spec
new file mode 100644
index 0000000..ffcb7c0
--- /dev/null
+++ b/trace-gui.spec
@@ -0,0 +1,73 @@
+%global upstream_name trace-cmd
+
+Name: trace-gui
+Version: 1.0.4
+Release: 3%{?dist}
+# changed from the trace-cmd spec. The libraries are not included here,
+# therefore there is no LGPLv2,1 in here.
+License: GPLv2
+Summary: trace-cmd is a user interface to Ftrace
+
+Group: Development/Tools
+URL: http://www.kernel.org/pub/linux/analysis/trace-cmd/
+Source0: http://www.kernel.org/pub/linux/analysis/trace-cmd/%{upstream_name}-%{version}.tar.bz2
+Source1: kernelshark.desktop
+Patch0: trace-cmd-1.0.4-rpm-opt-flags.patch
+BuildRoot: %{_tmppath}/%{upstream_name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# needed for the GUI pieces only
+BuildRequires: glib2-devel
+BuildRequires: gtk2-devel
+BuildRequires: libxml2-devel
+BuildRequires: desktop-file-utils
+# Require our friend
+Requires: trace-cmd = %{version}
+
+%description
+trace-cmd is a user interface to Ftrace. Instead of needing to use the
+debugfs directly, trace-cmd will handle of setting of options and
+tracers and will record into a data file.
+
+This package is the GUI components of trace-cmd, that is not packaged in RHEL,
+built for EPEL only.
+
+%prep
+%setup -q -n %{upstream_name}-%{version}
+%patch0 -p1 -b .rpmoptflag
+
+%build
+make V=1 RPM_OPT_FLAGS="%{optflags}" gui
+
+%install
+rm -Rf %{buildroot}
+make V=1 DESTDIR=%{buildroot} prefix=%{_prefix} install_gui
+# remove the stuff that RHEL packages
+rm %{buildroot}/%{_bindir}/trace-cmd
+rm -rf %{buildroot}/%{_datadir}
+install -dm 755 %{buildroot}/%{_datadir}/applications
+install -pm 644 %{SOURCE1} %{buildroot}/%{_datadir}/applications/kernelshark.desktop
+desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc COPYING README
+%{_bindir}/trace-view
+%{_bindir}/trace-graph
+%{_bindir}/kernelshark
+%{_datadir}/applications/kernelshark.desktop
+
+%changelog
+* Mon Feb 28 2011 Jon Stanley <jonstanley at gmail.com> - 1.0.4-3
+- Preserve timestamps
+- Add icon to .desktop file
+- Drop BR on stuff needed for docs, since we don't build that here, RHEL ships
+- that stuff.
+
+* Tue Feb 15 2011 Jon Stanley <jonstanley at gmail.com> - 1.0.4-2
+- Fixups from review
+
+* Tue Feb 8 2011 Jon Stanley <jonstanley at gmail.com> - 1.0.4-1
+- Add GUI components, initial package for EPEL.
+- Based on RHEL trace-cmd spec file


More information about the scm-commits mailing list