summaryrefslogtreecommitdiffstats
path: root/systemtap.spec
diff options
context:
space:
mode:
Diffstat (limited to 'systemtap.spec')
-rw-r--r--systemtap.spec29
1 files changed, 27 insertions, 2 deletions
diff --git a/systemtap.spec b/systemtap.spec
index 5b9283cf..521eec75 100644
--- a/systemtap.spec
+++ b/systemtap.spec
@@ -1,9 +1,11 @@
%{!?with_sqlite: %define with_sqlite 1}
%{!?with_docs: %define with_docs 1}
%{!?with_crash: %define with_crash 0}
+%{!?with_rpm: %define with_rpm 1}
%{!?with_bundled_elfutils: %define with_bundled_elfutils 0}
%{!?elfutils_version: %define elfutils_version 0.127}
%{!?pie_supported: %define pie_supported 1}
+%{!?with_grapher: %define with_grapher 0}
Name: systemtap
Version: 0.9.7
@@ -24,6 +26,9 @@ BuildRequires: sqlite-devel
%if %{with_crash}
BuildRequires: crash-devel zlib-devel
%endif
+%if %{with_rpm}
+BuildRequires: rpm-devel glibc-headers
+%endif
# Alternate kernel packages kernel-PAE-devel et al have a virtual
# provide for kernel-devel, so this requirement does the right thing.
Requires: kernel-devel
@@ -35,6 +40,7 @@ BuildRequires: nss-devel nss-tools pkgconfig
%if %{with_bundled_elfutils}
Source1: elfutils-%{elfutils_version}.tar.gz
Patch1: elfutils-portability.patch
+BuildRequires: m4
%define setup_elfutils -a1
%else
BuildRequires: elfutils-devel >= %{elfutils_version}
@@ -111,7 +117,6 @@ Summary: Static probe support tools
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
-Requires: systemtap
%description sdt-devel
Support tools to allow applications to use static probes.
@@ -170,6 +175,13 @@ cd ..
%define crash_config --disable-crash
%endif
+# Enable/disable the code to find and suggest needed rpms
+%if %{with_rpm}
+%define rpm_config --with-rpm
+%else
+%define rpm_config --without-rpm
+%endif
+
%if %{with_docs}
%define docs_config --enable-docs
%else
@@ -183,8 +195,14 @@ cd ..
%define pie_config --disable-pie
%endif
+%if %{with_grapher}
+%define grapher_config --enable-grapher
+%else
+%define grapher_config --disable-grapher
+%endif
-%configure %{?elfutils_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config}
+
+%configure %{?elfutils_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{grapher_config} %{rpm_config}
make %{?_smp_mflags}
%install
@@ -244,6 +262,13 @@ exit 0
chkconfig --del systemtap
exit 0
+%post
+# Remove any previously-built uprobes.ko materials
+(make -C /usr/share/systemtap/runtime/uprobes clean) >/dev/null 3>&1 || true
+
+%preun
+# Ditto
+(make -C /usr/share/systemtap/runtime/uprobes clean) >/dev/null 3>&1 || true
%files
%defattr(-,root,root)