]> git.pld-linux.org Git - SPECS.git/blob - tgt.spec
SPECS updated Sun 1 Aug 11:02:02 CEST 2021
[SPECS.git] / tgt.spec
1 # TODO:
2 # - init scripts
3 # - config files
4 %bcond_with     kernel
5 #
6 Summary:        Linux SCSI target framework
7 Name:           tgt
8 Version:        0.9.4
9 Release:        0.1
10 License:        GPL
11 Group:          Networking/Daemons
12 Source0:        http://stgt.berlios.de/releases/%{name}-%{version}.tar.bz2
13 # Source0-md5:  efe76fadd42c4090761be00747c49522
14 Source1:        %{name}.init
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)
21
22 %description
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.
27
28 Target drivers:
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)
37
38 Device Emulation :
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).
49
50 %prep
51 %setup -q
52
53 sed -i -e 's#-O2#$(OPTFLAGS)#g' usr/Makefile
54
55 %build
56 %{__make} -C usr \
57         CC="%{__cc}" \
58         OPTFLAGS="%{rpmcppflags} %{rpmcflags}" \
59 %if %{with kernel}
60                 KERNELSRC="%{_kernelsrcdir}" \
61                 IBMVIO=1 \
62                 FCP=1 \
63                 FCOE=1 \
64 %endif
65         ISCSI=1 \
66         ISCSI_RDMA=1
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70
71 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,tgt}
72 install -d $RPM_BUILD_ROOT{%{_docdir}/%{name},%{_mandir}/man8}
73
74 %{__make} -C usr install \
75         DESTDIR=$RPM_BUILD_ROOT \
76         docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}
77
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
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %post
86 /sbin/chkconfig --add tgt
87
88 %preun
89 if [ "$1" = "0" ]; then
90         %service tgt stop
91         /sbin/chkconfig --del tgt
92 fi
93
94 %files
95 %defattr(644,root,root,755)
96 %doc doc/*.*
97 %attr(755,root,root) %{_sbindir}/tgt*
98 %{_mandir}/man8/*
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
This page took 0.209818 seconds and 3 git commands to generate.