2007-04-11 04:44:39 +02:00
|
|
|
#
|
2008-08-08 17:24:37 +02:00
|
|
|
# spec file for package tgt (Version 20080805)
|
2007-04-11 04:44:39 +02:00
|
|
|
#
|
2008-08-08 17:24:37 +02:00
|
|
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-04-11 04:44:39 +02:00
|
|
|
#
|
2008-08-08 17:24:37 +02:00
|
|
|
# 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.
|
|
|
|
|
2007-04-11 04:44:39 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-08-08 17:24:37 +02:00
|
|
|
|
2007-04-11 04:44:39 +02:00
|
|
|
Name: tgt
|
|
|
|
BuildRequires: libaio-devel openssl-devel
|
|
|
|
Obsoletes: iscsitarget
|
2008-08-08 17:24:37 +02:00
|
|
|
Url: http://stgt.berlios.de
|
2007-08-10 00:16:15 +02:00
|
|
|
License: GPL v2 or later
|
2007-04-11 04:44:39 +02:00
|
|
|
Group: System/Daemons
|
2008-08-08 17:24:37 +02:00
|
|
|
PreReq: %fillup_prereq %insserv_prereq
|
|
|
|
AutoReqProv: on
|
|
|
|
Version: 20080805
|
|
|
|
Release: 1
|
2007-04-11 04:44:39 +02:00
|
|
|
Summary: Generic Linux target framework (tgt)
|
2008-08-08 17:24:37 +02:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
2007-04-11 04:44:39 +02:00
|
|
|
Source1: %{name}.init
|
|
|
|
Source2: scsi_tgt_if.h
|
|
|
|
Source3: %{name}.services
|
|
|
|
Patch11: %{name}-fix-build
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
Linux target framework (tgt) aims to simplify various SCSI target
|
|
|
|
driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance.
|
|
|
|
|
|
|
|
Tgt consists of kernel modules, user-space daemon, and user-space
|
|
|
|
tools. Some target drivers uses all of them and some use only
|
|
|
|
user-space daemon and tools (i.e. they completely runs in user space).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
|
|
Mike Christie <michaelc@cs.wisc.edu>
|
|
|
|
|
|
|
|
%prep
|
2008-08-08 17:24:37 +02:00
|
|
|
%setup -n %{name}-%{version}
|
2007-04-11 04:44:39 +02:00
|
|
|
%patch11 -p1
|
2008-08-08 17:24:37 +02:00
|
|
|
cp %{S:2} usr
|
2007-04-11 04:44:39 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
cd usr
|
|
|
|
%ifarch ppc ppc64
|
2008-08-08 17:24:37 +02:00
|
|
|
%define backends ISCSI=1 FCP=1 FCOE=1 IBMVIO=1
|
2007-04-11 04:44:39 +02:00
|
|
|
%else
|
2008-08-08 17:24:37 +02:00
|
|
|
%define backends ISCSI=1 FCP=1 FCOE=1
|
2007-04-11 04:44:39 +02:00
|
|
|
%endif
|
2008-08-08 17:24:37 +02:00
|
|
|
%{__make} OPTFLAGS="${RPM_OPT_FLAGS}" %{backends}
|
2007-04-11 04:44:39 +02:00
|
|
|
|
|
|
|
%install
|
2008-08-08 17:24:37 +02:00
|
|
|
cd usr
|
|
|
|
%{__make} DESTDIR=${RPM_BUILD_ROOT} install
|
|
|
|
cd ../scripts
|
|
|
|
install -vD -m 755 tgt-admin ${RPM_BUILD_ROOT}/usr/sbin/tgt-admin
|
2007-04-11 04:44:39 +02:00
|
|
|
install -vD -m 755 %{S:1} ${RPM_BUILD_ROOT}/etc/init.d/tgtd
|
|
|
|
install -vD %{S:3} ${RPM_BUILD_ROOT}/etc/sysconfig/SuSEfirewall2.d/services/iscsitarget
|
|
|
|
|
|
|
|
%clean
|
2007-08-10 00:16:15 +02:00
|
|
|
rm -rf ${RPM_BUILD_ROOT}
|
2007-04-11 04:44:39 +02:00
|
|
|
rm -f filelist
|
|
|
|
|
|
|
|
%post
|
|
|
|
%{fillup_and_insserv tgtd}
|
|
|
|
|
2008-08-08 17:24:37 +02:00
|
|
|
%preun
|
|
|
|
%stop_on_removal
|
|
|
|
|
2007-04-11 04:44:39 +02:00
|
|
|
%postun
|
|
|
|
%{insserv_cleanup}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2008-08-08 17:24:37 +02:00
|
|
|
/usr/sbin/*
|
|
|
|
/etc/init.d/tgtd
|
|
|
|
%config %attr(0644,root,root) /etc/sysconfig/SuSEfirewall2.d/services/iscsitarget
|
2007-04-11 04:44:39 +02:00
|
|
|
%doc README doc/README.iscsi doc/TODO
|
2008-08-08 17:24:37 +02:00
|
|
|
%doc %{_mandir}/man8/*
|
2007-04-11 04:44:39 +02:00
|
|
|
|
|
|
|
%changelog
|
2008-08-08 17:24:37 +02:00
|
|
|
* Fri Aug 08 2008 hare@suse.de
|
|
|
|
- Update to latest released version 20080805
|
|
|
|
* Include FCP backend
|
|
|
|
* Include FCoE backend
|
|
|
|
* Bugfixes
|
|
|
|
* Thu Aug 09 2007 olh@suse.de
|
2007-08-10 00:16:15 +02:00
|
|
|
- remove inclusion of linux/hash.h, include it directly
|
2008-08-08 17:24:37 +02:00
|
|
|
* Wed Apr 04 2007 hare@suse.de
|
2007-04-11 04:44:39 +02:00
|
|
|
- Added service definition for SUSEFirewall2 (#251679)
|
2008-08-08 17:24:37 +02:00
|
|
|
* Wed Apr 04 2007 hare@suse.de
|
2007-04-11 04:44:39 +02:00
|
|
|
- Initial version svn r849
|
|
|
|
- Update to latest git version
|
|
|
|
- Fixes for build on openSUSE
|