statically check distroname to require python-uuid. still ugly but hope it'll work...
[sfa.git] / sfa.spec
index 4c7a17f..b5d9c42 100644 (file)
--- a/sfa.spec
+++ b/sfa.spec
@@ -28,7 +28,7 @@ Summary: the SFA python libraries
 Group: Applications/System
 
 BuildRequires: make
-Requires: python
+Requires: python >= 2.5
 Requires: m2crypto
 Requires: libxslt-python
 Requires: python-ZSI
@@ -40,8 +40,11 @@ Requires: python-lxml
 # it'll be installed by "devel.pkgs". we have the epel repository so
 # python-uuid will be provided. but we can test for the python
 # version.
-%define has_py24 %( python -c "import sys;sys.exit(sys.version_info[0:2] == (2,4))" 2> /dev/null; echo $? )
-%if %has_py24
+# %define has_py24 %( python -c "import sys;sys.exit(sys.version_info[0:2] == (2,4))" 2> /dev/null; echo $? )
+# %if %has_py24
+#
+# this also didn't work very well. I'll just check for distroname - baris
+%if %{distroname} == "centos5"
 Requires: python-uuid
 %endif
 
@@ -105,6 +108,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 # sfa and sfatables depend each other.
+%{_bindir}/sfa-server.py*
 /etc/sfatables/*
 %{python_sitelib}/*
 /usr/bin/keyconvert
@@ -125,7 +129,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/sfa-import-plc.py*
 %{_bindir}/sfa-clean-peer-records.py*
 %{_bindir}/sfa-nuke-plc.py*
-%{_bindir}/sfa-server.py*
 %{_bindir}/gen-sfa-cm-config.py*
 
 %files client