2007-04-11 04:44:39 +02:00
|
|
|
#
|
|
|
|
# spec file for package tgt (Version 0.1)
|
|
|
|
#
|
|
|
|
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
|
# This file and all modifications and additions to the pristine
|
|
|
|
# package are under the same license as the package itself.
|
|
|
|
#
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
Name: tgt
|
|
|
|
BuildRequires: libaio-devel openssl-devel
|
|
|
|
Obsoletes: iscsitarget
|
|
|
|
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
|
|
|
|
Prereq: %fillup_prereq %insserv_prereq
|
|
|
|
Autoreqprov: on
|
|
|
|
Version: 0.1
|
2007-08-10 00:16:15 +02:00
|
|
|
Release: 23
|
2007-04-11 04:44:39 +02:00
|
|
|
Requires: kernel
|
|
|
|
Summary: Generic Linux target framework (tgt)
|
|
|
|
Source: %{name}-r849.tar.bz2
|
|
|
|
Source1: %{name}.init
|
|
|
|
Source2: scsi_tgt_if.h
|
|
|
|
Source3: %{name}.services
|
|
|
|
Patch1: %{name}-git-update
|
|
|
|
Patch2: %{name}-mmc-read-toc-swapped-args
|
|
|
|
Patch10: %{name}-update-scsi-header-file
|
|
|
|
Patch11: %{name}-fix-build
|
|
|
|
Patch12: %{name}-ibmvio-build-local
|
2007-08-10 00:16:15 +02:00
|
|
|
Patch13: tgt.hash.patch
|
2007-04-11 04:44:39 +02:00
|
|
|
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
|
|
|
|
%setup -n %{name}-r849
|
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch10 -p1
|
|
|
|
%patch11 -p1
|
|
|
|
%patch12 -p1
|
2007-08-10 00:16:15 +02:00
|
|
|
%patch13 -p1
|
2007-04-11 04:44:39 +02:00
|
|
|
|
|
|
|
%build
|
2007-08-10 00:16:15 +02:00
|
|
|
cp %{S:2} usr/scsi_tgt_if.h
|
2007-04-11 04:44:39 +02:00
|
|
|
cd usr
|
|
|
|
%ifarch ppc ppc64
|
|
|
|
IBMVIO=1
|
|
|
|
%else
|
|
|
|
IBMVIO=0
|
|
|
|
%endif
|
|
|
|
%{__make} CFLAGS="${RPM_OPT_FLAGS}" ISCSI=1 IBMVIO=$IBMVIO
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -vD usr/tgtd ${RPM_BUILD_ROOT}/usr/sbin/tgtd
|
|
|
|
install -vD usr/tgtadm ${RPM_BUILD_ROOT}/usr/sbin/tgtadm
|
|
|
|
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}
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%{insserv_cleanup}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%attr(755,root,root)/usr/sbin/*
|
|
|
|
%attr(755,root,root)/etc/init.d/tgtd
|
|
|
|
%attr(644,root,root)/etc/sysconfig/SuSEfirewall2.d/services/iscsitarget
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README doc/README.iscsi doc/TODO
|
|
|
|
|
|
|
|
%changelog
|
2007-08-10 00:16:15 +02:00
|
|
|
* Thu Aug 09 2007 - olh@suse.de
|
|
|
|
- remove inclusion of linux/hash.h, include it directly
|
2007-04-11 04:44:39 +02:00
|
|
|
* Wed Apr 04 2007 - hare@suse.de
|
|
|
|
- Added service definition for SUSEFirewall2 (#251679)
|
|
|
|
* Wed Apr 04 2007 - hare@suse.de
|
|
|
|
- Initial version svn r849
|
|
|
|
- Update to latest git version
|
|
|
|
- Fixes for build on openSUSE
|