tgt/tgt.spec

99 lines
2.6 KiB
RPMSpec

#
# 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: GNU General Public License (GPL)
Group: System/Daemons
Prereq: %fillup_prereq %insserv_prereq
Autoreqprov: on
Version: 0.1
Release: 1
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
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
cp %{S:2} usr/scsi_tgt_if.h
%build
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
[ "${RPM_BUILD_ROOT}" != "/" -a -d ${RPM_BUILD_ROOT} ] && 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
* 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