File istgt.spec of Package istgt

#
# spec file for package istgt
#
# Copyright (c) 2012 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:        20121028
%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
%if 0%{?fedora_version} || 0%{?rhel_version}
BuildRequires:	openssl-devel
%else
BuildRequires:	libopenssl-devel
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch1:		fix-installdir.patch
Patch2:		add-istgtcontrol-manpage.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
autoconf
%configure

%build
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