[scsi-target-utils] fix build on s390(x) by introducing new conditional

Dan Horák sharkcz at fedoraproject.org
Tue Dec 20 09:12:20 UTC 2011


commit 24fb4a4fcad9240b75c59c03800345158fd43be5
Author: Dan Horák <dan at danny.cz>
Date:   Tue Dec 20 10:12:18 2011 +0100

    fix build on s390(x) by introducing new conditional

 scsi-target-utils.spec |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/scsi-target-utils.spec b/scsi-target-utils.spec
index 3bdf63b..6eb3770 100644
--- a/scsi-target-utils.spec
+++ b/scsi-target-utils.spec
@@ -1,6 +1,10 @@
+%ifnarch s390 s390x
+%global with_rdma 1
+%endif
+
 Name:           scsi-target-utils
 Version:        1.0.22
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        The SCSI target daemon and utility programs
 
 Group:          System Environment/Daemons
@@ -17,7 +21,7 @@ Patch2:         scsi-target-utils-dynamic-link-iser.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  pkgconfig libxslt docbook-style-xsl systemd-units
-%ifnarch s390 s390x
+%if 0%{?with_rdma}
 BuildRequires:  libibverbs-devel librdmacm-devel
 %endif
 Requires: lsof sg3_utils
@@ -27,7 +31,7 @@ Requires(post): systemd-units
 The SCSI target package contains the daemon and tools to setup a SCSI targets.
 Currently, software iSCSI targets are supported.
 
-%ifnarch s390 s390x
+%if 0%{?with_rdma}
 %package iser
 Summary:        iSER (RDMA) support for SCSI Target
 Group:          System Environment/Daemons
@@ -48,7 +52,7 @@ Extensions for RDMA (ISER) to scsi-target-utils.
 
 %build
 %{__sed} -i -e 's|-g -O2 -Wall|%{optflags}|' Makefile
-%{__make} %{?_smp_mflags} ISCSI_RDMA=1 libdir=%{_libdir}/tgt
+%{__make} %{?_smp_mflags} %{?with_rdma:ISCSI_RDMA=1} libdir=%{_libdir}/tgt
 
 
 %install
@@ -71,7 +75,7 @@ Extensions for RDMA (ISER) to scsi-target-utils.
 %{__install} -p -m 0600 %{SOURCE3} %{buildroot}%{_sysconfdir}/tgt
 
 pushd usr
-%{__make} install ISCSI_RDMA=1 DESTDIR=%{buildroot} sbindir=%{_sbindir} libdir=%{_libdir}/tgt
+%{__make} install %{?with_rdma:ISCSI_RDMA=1} DESTDIR=%{buildroot} sbindir=%{_sbindir} libdir=%{_libdir}/tgt
 
 %post
 if [ $1 -eq 1 ]; then
@@ -109,11 +113,16 @@ fi
 %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/tgtd
 %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/tgt/targets.conf
 
+%if 0%{?with_rdma}
 %files iser
 %{_libdir}/tgt/*
+%endif
 
 
 %changelog
+* Tue Dec 20 2011 Dan Horák <dan[at]danny.cz> - 1.0.22-4
+- fix build on s390(x) by introducing new conditional
+
 * Thu Dec 15 2011 Andy Grover <agrover at redhat.com> - 1.0.22-3
 - Fix leftover fcoe references
 


More information about the scm-commits mailing list