File istgt.spec of Package istgt

#
# spec file for package istgt
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           istgt
Version:        0.10
Release:        0
%define upstreamrel 20121028
Summary:        Userspace iSCSI Target
License:        BSD-2-Clause
Group:          Productivity/Networking/Other
Url:            http://www.peach.ne.jp/archives/istgt/
Source:         istgt-%{upstreamrel}.tar.gz
Requires:       bash
BuildRequires:  autoconf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch1:         fix-installdir.patch
Patch2:         add-istgtcontrol-manpage.patch
Patch3:         disk-support-0-len-read-and-write-CBDs.patch
Patch4:         lu-perform-lba-range-check-before-0-byte-fastpath.patch
Patch5:         lu-add-sense-data-to-out-of-range-read-and-write-err.patch
Patch6:         iscsi-cancel-conn-worker-threads-using-the-task_pipe.patch
Patch7:         md5-add-RFC1321-based-RSA-free-MD5-library.patch
Patch8:         md5-use-in-tree-libmd5-rfc-rather-than-libcrypto.patch

%description
This software (istgt) is the implementation of iSCSI target
(refer to RFC3720 about iSCSI) developed for FreeBSD.
It includes iSCSI protocol processor and SPC-3 (SCSI Primary
Commands - 3) based logical unit emulation.

Key Features:
* MCS/MPIO for failover (up to 255 concurrent sessions)
* Multipath I/O (only support Microsoft MPIO/VMware ESXi)
* SPC-3 Persistent Reservation for cluster nodes
* 64bit LBA for over 2TB
* Header/Data digest by CRC32C
* CHAP w/Mutual authentication
* Multiple LUNs and ACLs for portals
* IPv6/IPv4 dual support

%prep
%setup -q -n istgt-%{upstreamrel}
%patch1 -p1
%patch2 -p1
%patch3 -p0
%patch4 -p0
%patch5 -p0
%patch6 -p0
%patch7 -p0
%patch8 -p0

autoconf

%build
%configure
make

%install
make install DESTDIR=$RPM_BUILD_ROOT

%post
/sbin/ldconfig

%preun
%{?stop_on_removal:%{stop_on_removal istgt}}

%postun
/sbin/ldconfig
%{?restart_on_update:%{restart_on_update istgt}}
%{?insserv_cleanup:%{insserv_cleanup}}

%files
%defattr(-,root,root)
%{_sbindir}/istgt
%{_sbindir}/istgtcontrol
%dir %{_sysconfdir}/istgt/
%config %{_sysconfdir}/istgt/*.conf.sample
%{_sysconfdir}/init.d/istgt
%doc %{_mandir}/man1/istgt.1.gz
%doc %{_mandir}/man1/istgtcontrol.1.gz

%changelog
openSUSE Build Service is sponsored by