summaryrefslogtreecommitdiffstats
path: root/systemtap.spec.in
diff options
context:
space:
mode:
Diffstat (limited to 'systemtap.spec.in')
-rw-r--r--systemtap.spec.in23
1 files changed, 14 insertions, 9 deletions
diff --git a/systemtap.spec.in b/systemtap.spec.in
index e663b15a..1fdd65a4 100644
--- a/systemtap.spec.in
+++ b/systemtap.spec.in
@@ -130,16 +130,19 @@ cd ..
%configure %{?elfutils_config} %{sqlite_config} %{crash_config} %{docs_config}
make %{?_smp_mflags}
+%install
+rm -rf ${RPM_BUILD_ROOT}
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# We want the examples in the special doc dir, not the generoc doc install dir.
+mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/examples examples
+
# Fix paths in the example & testsuite scripts
find examples testsuite -type f -name '*.stp' -print0 | xargs -0 sed -i -r -e '1s@^#!.+stap@#!%{_bindir}/stap@'
# To avoid perl dependency, make perl sample script non-executable
chmod -x examples/samples/kmalloc-top
-%install
-rm -rf ${RPM_BUILD_ROOT}
-make DESTDIR=$RPM_BUILD_ROOT install
-
# Because "make install" may install staprun with mode 04111, the
# post-processing programs rpmbuild runs won't be able to read it.
# So, we change permissions so that they can read it. We'll set the
@@ -148,8 +151,12 @@ chmod 755 $RPM_BUILD_ROOT%{_bindir}/staprun
# Copy over the testsuite
cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap
-mkdir $RPM_BUILD_ROOT%{_datadir}/%{name}/src
-cp -rp examples $RPM_BUILD_ROOT%{_datadir}/%{name}/src
+
+#%if %{with_docs}
+# We want the manuals in the special doc dir, not the generic doc install dir.
+mkdir docs.installed
+mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/
+#%endif
%clean
rm -rf ${RPM_BUILD_ROOT}
@@ -164,8 +171,7 @@ exit 0
%doc README AUTHORS NEWS COPYING examples
%if %{with_docs}
-%doc doc/tutorial.pdf
-%doc doc/langref.pdf
+%doc docs.installed/*.pdf
%endif
%{_bindir}/stap
@@ -196,7 +202,6 @@ exit 0
%files testsuite
%defattr(-,root,root)
-%{_datadir}/%{name}/src
%{_datadir}/%{name}/testsuite