packaging/rhel/sogo.spec: use python2.6 on rhel5

Monotone-Parent: 9202fa182066edcb9c695acae144e370e6371711
Monotone-Revision: 1447a01e5c74f601142742ed11b455e307cc9051

Monotone-Author: jraby@inverse.ca
Monotone-Date: 2012-08-14T14:39:09
maint-2.0.2
Jean Raby 2012-08-14 14:39:09 +00:00
parent bfec2902ab
commit 8bcffcfeb5
1 changed files with 16 additions and 0 deletions

View File

@ -3,6 +3,13 @@
%global oc_build_depends samba4 openchange
%endif
%{!?python_sys_pyver: %global python_sys_pyver %(/usr/bin/python -c "import sys; print sys.hexversion")}
# if hex(sys.hexversion) < 0x02060000
%if %{python_sys_pyver} < 33947648
%global __python /usr/bin/python2.6
%endif
Summary: SOGo
Name: sogo
Version: %{sogo_version}
@ -133,6 +140,15 @@ SOGo backend for OpenChange
rm -fr ${RPM_BUILD_ROOT}
%setup -q -n SOGo-%{sogo_version}
# fix python path for python2.4 distro
%if %{python_sys_pyver} < 33947648
for pyscript in OpenChange/samba-get-config.py; do
mv $pyscript $pyscript.orig
sed -e 's!/usr/bin/python!/usr/bin/python2.6!' <$pyscript.orig >$pyscript
rm $pyscript.orig
done
%endif
# ****************************** build ********************************
%build
. /usr/share/GNUstep/Makefiles/GNUstep.sh