6 Summary: Linux SCSI target framework
11 Group: Networking/Daemons
12 Source0: http://stgt.berlios.de/releases/%{name}-%{version}.tar.bz2
13 # Source0-md5: efe76fadd42c4090761be00747c49522
15 URL: http://stgt.berlios.de/
16 BuildRequires: librdmacm-devel
17 BuildRequires: openssl-devel
18 BuildRequires: rpm-perlprov >= 4.1-13
19 BuildRequires: rpmbuild(macros) >= 1.379
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Linux target framework (tgt) aims to simplify various SCSI target
24 driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance. Our
25 key goals are the clean integration into the scsi-mid layer and
26 implementing a great portion of tgt in user space.
29 - iSCSI software target driver for Ethernet NICs
30 - iSER software target driver for Infiniband and RDMA NICs
31 - Virtual SCSI target driver for IBM pSeries
32 - FCoE software target driver for Ethernet NICs (in progress)
33 - Qlogic qla2xxx FC target driver (in progress)
34 - LSI logic FC target driver (not yet)
35 - Qlogic qla4xxx iSCSI target driver (not yet)
36 - Virtual SCSI target driver for Xen (obsolete)
39 - SBC: a virtual disk drive that can use a file to store the content.
40 - SMC: a virtual media jukebox that can be controlled by the "mtx"
41 tool (partially functional).
42 - MMC: a virtual DVD drive that can read DVD-ROM iso files and create
43 burnable DVD+R. It can be combined with SMC to provide a fully
44 operational DVD jukebox.
45 - SSC: a virtual tape device (aka VTL) that can use a file to store
46 the content (in progress).
47 - OSD: a virtual object-based storage device that can use a file to
48 store the content (in progress).
53 sed -i -e 's#-O2#$(OPTFLAGS)#g' usr/Makefile
58 OPTFLAGS="%{rpmcppflags} %{rpmcflags}" \
60 KERNELSRC="%{_kernelsrcdir}" \
69 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,tgt}
72 install -d $RPM_BUILD_ROOT{%{_docdir}/%{name},%{_mandir}/man8}
74 %{__make} -C usr install \
75 DESTDIR=$RPM_BUILD_ROOT \
76 docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}
78 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/tgt
79 install doc/manpages/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
80 install doc/targets.conf.example $RPM_BUILD_ROOT/etc/tgt/targets.conf
83 rm -rf $RPM_BUILD_ROOT
86 /sbin/chkconfig --add tgt
89 if [ "$1" = "0" ]; then
91 /sbin/chkconfig --del tgt
95 %defattr(644,root,root,755)
97 %attr(755,root,root) %{_sbindir}/tgt*
99 %attr(754,root,root) /etc/rc.d/init.d/tgt
100 %attr(750, root, root) %dir %{_sysconfdir}/tgt
101 %attr(750, root, root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tgt/*.conf