Name: scsi-target-utils Version: 0.9.7 Release: 1%{?dist} Summary: The SCSI target daemon and utility programs Group: System Environment/Daemons License: GPLv2 URL: http://stgt.berlios.de Source0: http://stgt.berlios.de/releases/tgt-%{version}.tar.bz2 Source1: tgtd.init Patch0: tgt-20080805-shebang.patch Patch1: tgt-0.9.5-makefile.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: openssl-devel pkgconfig Requires: /sbin/chkconfig /sbin/service %description The SCSI target package contains the daemon and tools to setup a SCSI targets. Currently, software iSCSI targets are supported. %prep %setup -q -n tgt-%{version} %patch0 -p1 %patch1 -p1 %{__chmod} 0644 scripts/tgt-core-test %build if pkg-config openssl ; then CPPFLAGS=$(pkg-config --cflags openssl) ; export CPPFLAGS LDFLAGS=$(pkg-config --libs openssl) ; export LDFLAGS fi pushd usr %{__sed} -i -e 's|-g -O2|%{optflags}|' Makefile %{__make} %{?_smp_mflags} ISCSI=1 %install %{__rm} -rf %{buildroot} %{__install} -d %{buildroot}%{_sbindir} %{__install} -d %{buildroot}%{_mandir}/man8 %{__install} -d %{buildroot}%{_initrddir} %{__install} -p -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/tgtd %{__install} -p -m 0755 scripts/tgt-admin %{buildroot}/%{_sbindir}/tgt-admin %{__install} -p -m 0644 doc/manpages/tgtadm.8 %{buildroot}/%{_mandir}/man8 %{__install} -p -m 0644 doc/manpages/tgt-admin.8 %{buildroot}/%{_mandir}/man8 pushd usr %{__make} install DESTDIR=%{buildroot} # we ship these by doc macro %{__rm} -rf %{buildroot}/usr/share/doc/tgt %post /sbin/chkconfig --add tgtd %postun if [ "$1" = "1" ] ; then /sbin/service tgtd condrestart > /dev/null 2>&1 fi %preun if [ "$1" = "0" ] ; then /sbin/chkconfig tgtd stop > /dev/null 2>&1 /sbin/chkconfig --del tgtd fi %clean %{__rm} -rf %{buildroot} %files %defattr(-, root, root, -) %doc README doc/README.* doc/targets.conf.example doc/tmf.txt doc/TODO %doc scripts/tgt-core-test %{_sbindir}/tgtd %{_sbindir}/tgtadm %{_sbindir}/tgt-setup-lun %{_sbindir}/tgt-admin %{_sbindir}/tgtimg %{_mandir}/man8/* %{_initrddir}/tgtd %changelog * Mon Mar 16 2009 Terje Rosten - 0.9.5-1 - 0.9.5 - remove patch now upstream - add patch to fix mising destdir in usr/Makefile - mktape and dump_tape has moved to tgtimg - add more docs * Wed Feb 25 2009 Fedora Release Engineering - 0.9.2-3 - rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Jan 17 2009 Tomas Mraz - 0.9.2-2 - rebuild with new openssl * Tue Dec 16 2008 Jarod Wilson - 0.9.2-1 - update to 0.9.2 release * Tue Oct 21 2008 Terje Rosten - 0.0-6.20080805snap - add tgt-admin man page, tgt-admin and tgt-core-test * Fri Aug 22 2008 Terje Rosten - 0.0-5.20080805snap - update to 20080805 snapshot * Sun Feb 10 2008 Terje Rosten - 0.0-4.20071227snap - update to 20071227 snapshot - add patch to compile with newer glibc * Sat Feb 9 2008 Terje Rosten - 0.0-3.20070803snap - rebuild * Sun Dec 07 2007 Alex Lancaster - 0.0-2.20070803snap - rebuild for new openssl soname bump * Wed Sep 26 2007 Terje Rosten - 0.0-1.20070803snap - random cleanup * Wed Sep 26 2007 Terje Rosten - 0.0-0.20070803snap - update to 20070803 - fix license tag - use date macro - build with correct flags (%%optflags) * Tue Jul 10 2007 Mike Christie - 0.0-0.20070620snap - first build