[shogun/el5] keep a clean copy of examples

Björn Esser besser82 at fedoraproject.org
Mon Feb 24 13:09:53 UTC 2014


commit 2aa35dae85660ee5e16a399f9ae7bfb1f2ea03b8
Author: Björn Esser <bjoern.esser at gmail.com>
Date:   Mon Feb 24 14:10:07 2014 +0100

    keep a clean copy of examples

 shogun.spec |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/shogun.spec b/shogun.spec
index 9ad282b..e9ddfbf 100644
--- a/shogun.spec
+++ b/shogun.spec
@@ -656,13 +656,6 @@ install -pm 0644 %{SOURCE99} third_party/GoogleMock
 # Copy data into proper location.
 cp -a %{_datadir}/%{name}/data data
 
-# Add data to examples, because they need it to be run.
-for _dir in 'documented' 'undocumented'
-do
-  unlink examples/${_dir}/data
-  ln -fs %{_datadir}/%{name}/data/toy examples/${_dir}/data
-done
-
 # Copy all stuff into %%{py3dir} for the Python3-build.
 cp -a . %{py3dir}
 
@@ -831,6 +824,16 @@ done
 ###############################################################################
 
 %check
+# Keep a clean copy of examples.
+cp -a examples examples.clean
+
+# Add data to clean examples, because they need it to be run.
+for _dir in 'documented' 'undocumented'
+do
+  unlink examples.clean/${_dir}/data
+  ln -fs %{_datadir}/%{name}/data/toy examples/${_dir}/data
+done
+
 %if 0%{?with_tests}
 # Disabled tests:
 #
@@ -877,6 +880,10 @@ popd
 %endif #0%{?with_python3}
 %endif #0%{?with_tests}
 
+# Restore the clean copy
+rm -rf examples
+mv examples.clean examples
+
 ###############################################################################
 
 %{?el5:%clean}


More information about the scm-commits mailing list