Allow clean upgrade after SAGE_DEVEL rename

This commit is contained in:
pcpa 2013-05-11 14:32:11 -03:00
parent 173cd60d9a
commit 6cb2ce284f

View file

@ -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 <paulo.cesar.pereira.de.andrade@gmail.com> - 5.9-3
- Add pretrans for clean upgrade after rename of SAGE_DEVEL to SAGE_SRC.
* Sat May 11 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 5.9-2
- Build in f18 and f18 with workaround to cython wrong defines (#961372)