On Tue, Jan 6, 2009 at 14:45, Greg Swift <[email protected]> wrote:

> The first patch makes changes to the spec for building against a custom
> python2.3 when in a rhel3 environment.  When in that environment it will use
> the func-python2.3.patch to adjust all the python script's headers to point
> to the right binary.


original spec file patch builds fine on rhel3, broke on rhel5 and fedora.
fixed.  new attachment ignore last patch and is against git trunk.
func-python2.3.patch from original is still corrent.
diff --git a/func.spec b/func.spec
index 396eb7a..cc0eb69 100644
--- a/func.spec
+++ b/func.spec
@@ -1,3 +1,8 @@
+%if 0%{?rhel} == 3
+%define __python_ver 2.3
+%endif
+%define python python%{?__python_ver}
+%define __python /usr/bin/%{python}
 
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
@@ -9,23 +14,33 @@ Source1: version
 Version: %(echo `awk '{ print $1 }' %{SOURCE1}`)
 Release: %(echo `awk '{ print $2 }' %{SOURCE1}`)%{?dist}
 Source0: %{name}-%{version}.tar.gz
+%if 0%{?rhel} == 3
+Patch0: %{name}-%{python}.patch
+%endif
 License: GPLv2+
 Group: Applications/System
+%if 0%{?rhel} == 3
+Requires: %{python}
+Requires: pyOpenSSL-py23
+%else
 Requires: python >= 2.3
 Requires: pyOpenSSL
-Requires: python-simplejson
-Requires: certmaster >= 0.24
+%endif
+Requires: %{python}-simplejson
+Requires: certmaster >= %{version}
 Requires: logrotate
-BuildRequires: python-devel
+BuildRequires: %{python}-devel
 %if %is_suse
 BuildRequires: gettext-devel
 %else
 %if 0%{?fedora} >= 8
 BuildRequires: python-setuptools-devel
 %else
+%if 0%{?rhel} >= 5
 BuildRequires: python-setuptools
 %endif
 %endif
+%endif
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 BuildArch: noarch
 Url: https://fedorahosted.org/func/
@@ -35,6 +50,9 @@ func is a remote api for mangement, configuration, and monitoring of systems.
 
 %prep
 %setup -q
+%if 0%{?rhel} == 3
+%patch0 -p1
+%endif
 
 %build
 %{__python} setup.py build
@@ -135,6 +153,13 @@ fi
 
 
 %changelog
+* Tue Jan 06 Greg Swift <[email protected]> - 0.24-3
+- Fixed spec because it was only building in rhel3
+
+* Wed Dec 31 2008 Greg Swift <[email protected]> - 0.24-2
+- Patched SPEC to build on rhel3 with python2.3
+- Added Patch0 to handle python2.3 if on rhel3
+
 * Wed Dec 17 2008 Adrian Likins <[email protected]> - 0.24-1
 - require certmaster 0.24 
 
diff --git a/version b/version
index 14e8220..8893a2c 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-0.24 1
+0.24 3
_______________________________________________
Func-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/func-list

Reply via email to