# # 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 License: GPL v2 or later Group: System/Daemons Prereq: %fillup_prereq %insserv_prereq Autoreqprov: on Version: 0.1 Release: 23 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 Patch13: tgt.hash.patch 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 Mike Christie %prep %setup -n %{name}-r849 %patch1 -p1 %patch2 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 %build cp %{S:2} usr/scsi_tgt_if.h 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 rm -rf ${RPM_BUILD_ROOT} 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 * Thu Aug 09 2007 - olh@suse.de - remove inclusion of linux/hash.h, include it directly * 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