From 6cb2ce284f8e5dd68061c7bc121eab088e2faea7 Mon Sep 17 00:00:00 2001 From: pcpa Date: Sat, 11 May 2013 14:32:11 -0300 Subject: [PATCH] Allow clean upgrade after SAGE_DEVEL rename --- sagemath.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sagemath.spec b/sagemath.spec index 95a69e1..db0343c 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -74,7 +74,7 @@ Name: sagemath Group: Applications/Engineering Summary: A free open-source mathematics software system Version: 5.9 -Release: 2%{?dist} +Release: 3%{?dist} # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # Additionally, every $files section has a comment with the license name # before files with that license @@ -1181,6 +1181,15 @@ rm -r %{buildroot}%{python_sitearch}/sagenb/data/sage3d rm -fr $DOT_SAGE ######################################################################## +%pretrans +# Temporary due to moving directory to symlink +if [ ! -L %{SAGE_ROOT}/devel -a -d %{SAGE_ROOT}/devel ]; then + mkdir %{SAGE_SRC} + mv %{SAGE_ROOT}/devel/* %{SAGE_SRC} + rmdir %{SAGE_ROOT}/devel + ln -s src %{SAGE_ROOT}/devel +fi + %post core /sbin/ldconfig exit 0 @@ -1423,6 +1432,9 @@ exit 0 ######################################################################## %changelog +* Sat May 11 2013 pcpa - 5.9-3 +- Add pretrans for clean upgrade after rename of SAGE_DEVEL to SAGE_SRC. + * Sat May 11 2013 pcpa - 5.9-2 - Build in f18 and f18 with workaround to cython wrong defines (#961372)