X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=yaz.spec;h=ae214f820a28f5a8e72b8293bb1c23539e6db41d;hp=8e103262d9f90b0c98f626ef68f1cd1e482a4156;hb=55b4bc7eb9295ce335fad273d08d82d62ce4b7ea;hpb=6166a9b9b8434a39f893f4f37846a66c58ead847 diff --git a/yaz.spec b/yaz.spec index 8e10326..ae214f8 100644 --- a/yaz.spec +++ b/yaz.spec @@ -11,11 +11,12 @@ Version: %{idmetaversion} Release: 1.indexdata # determine system +%define is_redhat5 %(grep 'release 5' /etc/redhat-release >/dev/null 2>&1 && echo 1 || echo 0) %define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0) %define is_suse %(test -e /etc/SuSE-release >/dev/null && echo 1 || echo 0) %define is_suse11 %(grep 'VERSION = 11' /etc/SuSE-release >/dev/null 2>&1 && echo 1 || echo 0) %define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0) -Requires: libxslt, gnutls, readline, libyaz5 = %{version} +Requires: readline, libyaz5 = %{version} License: BSD Group: Applications/Internet Vendor: Index Data ApS @@ -23,10 +24,10 @@ Source: yaz-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root Prefix: %{_prefix} -%define TCPWRAPPER tcp_wrappers - -%if %is_fedora %define TCPWRAPPER tcp_wrappers-devel + +%if %is_redhat5 +%define TCPWRAPPER tcp_wrappers %endif %if %is_suse @@ -47,8 +48,11 @@ BuildRequires: libxslt-devel BuildRequires: readline-devel BuildRequires: libicu-devel BuildRequires: wget -BuildRequires: cyrus-sasl-devel BuildRequires: libgcrypt-devel +%if %is_redhat5 +%else +BuildRequires: hiredis-devel +%endif Packager: Adam Dickmeiss URL: http://www.indexdata.com/yaz @@ -60,6 +64,10 @@ for the ANSI/NISO Z39.50 protocol for Information Retrieval. Summary: Z39.50 Library Group: Libraries Requires: libxslt, gnutls, libicu, libgcrypt +%if %is_redhat5 +%else +Requires: hiredis +%endif %description -n libyaz5 YAZ is a library for the ANSI/NISO Z39.50 protocol for Information @@ -97,19 +105,12 @@ chain facility of YAZ. %prep %setup -wget -q http://ftp.indexdata.dk/pub/support/libmemcached-1.0.18.tar.gz -tar zxf libmemcached-1.0.18.tar.gz - %build -YD=`pwd` -cd libmemcached-1.0.18 -./configure --disable-shared --prefix=${YD}/libmemcached -make install -cd .. -PKG_CONFIG_PATH=${YD}/libmemcached/lib/pkgconfig CFLAGS="$RPM_OPT_FLAGS" \ +CFLAGS="$RPM_OPT_FLAGS" \ ./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} \ - --enable-shared --enable-tcpd --with-xslt --with-gnutls --with-icu + --enable-shared --enable-tcpd --with-xslt --with-gnutls --with-icu \ + --without-memcached make CFLAGS="$RPM_OPT_FLAGS" %install