Disable python bindings for < 2.4 (required for EL-4).

This commit is contained in:
Matthias Saou 2008-02-03 20:18:09 +00:00
parent 32a78cd432
commit 854391f19c

View File

@ -1,12 +1,20 @@
# Make it possible to disable the client by passing --without client # Possible rpmbuild options
%{?_without_ibverbs:%define _without_ibverbs --disable-ibverbs}
%{?_without_client:%define _without_client --disable-fuse-client} %{?_without_client:%define _without_client --disable-fuse-client}
# Default to disabling client on RHEL, but allow forcing --with client %{?_without_python:%define _without_python --disable-python}
# Default to disabling client on RHEL, but allow forcing --with client too
%{?rhel:%{!?_with_client:%define _without_client --disable-fuse-client}} %{?rhel:%{!?_with_client:%define _without_client --disable-fuse-client}}
# Disable the python bindings if we have < 2.4, since 2.4+ is required
%if "%(%{__python} -c "import sys ; print sys.version[:3]")" < "2.4"
%define _without_python --disable-python
%endif
Summary: Cluster File System Summary: Cluster File System
Name: glusterfs Name: glusterfs
Version: 1.3.8 Version: 1.3.8
Release: 0.7%{?dist} Release: 0.8%{?dist}
License: GPLv3+ License: GPLv3+
Group: System Environment/Base Group: System Environment/Base
URL: http://www.gluster.org/docs/index.php/GlusterFS URL: http://www.gluster.org/docs/index.php/GlusterFS
@ -20,8 +28,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires(post): /sbin/chkconfig Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service, /sbin/chkconfig Requires(preun): /sbin/service, /sbin/chkconfig
Requires(postun): /sbin/service Requires(postun): /sbin/service
BuildRequires: python-devel
%{!?_without_ibverbs:BuildRequires: libibverbs-devel} %{!?_without_ibverbs:BuildRequires: libibverbs-devel}
%{!?_without_client:BuildRequires: fuse-devel}
%{!?_without_python:BuildRequires: python-devel}
BuildRequires: flex, bison, byacc BuildRequires: flex, bison, byacc
%description %description
@ -52,13 +61,11 @@ This package includes libglusterfs and glusterfs translator modules
common to both GlusterFS server and client framework. common to both GlusterFS server and client framework.
%if 0%{!?_without_client:1}
%package client %package client
Summary: GlusterFS Client Summary: GlusterFS Client
Group: Applications/File Group: Applications/File
Requires: fuse Requires: fuse
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
BuildRequires: fuse-devel
%description client %description client
GlusterFS is a clustered file-system capable of scaling to several GlusterFS is a clustered file-system capable of scaling to several
@ -70,7 +77,6 @@ called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable. is in userspace and easily manageable.
This package provides the FUSE based GlusterFS client. This package provides the FUSE based GlusterFS client.
%endif
%package server %package server
@ -114,7 +120,7 @@ This package provides the development libraries.
%build %build
%configure %{?_without_ibverbs:--disable-ibverbs} %{?_without_client} %configure %{?_without_ibverbs} %{?_without_client} %{?_without_python}
%{__make} %{?_smp_mflags} %{__make} %{?_smp_mflags}
@ -208,6 +214,9 @@ fi
%changelog %changelog
* Sun Feb 3 2008 Matthias Saou <http://freshrpms.net/> 1.3.8-0.8
- Add python version check and disable bindings for version < 2.4.
* Sun Feb 3 2008 Matthias Saou <http://freshrpms.net/> 1.3.8-0.7 * Sun Feb 3 2008 Matthias Saou <http://freshrpms.net/> 1.3.8-0.7
- Add --without client rpmbuild option, make it the default for RHEL (no fuse). - Add --without client rpmbuild option, make it the default for RHEL (no fuse).
(I hope "rhel" is the proper default macro name, couldn't find it...) (I hope "rhel" is the proper default macro name, couldn't find it...)