rpms/scsi-target-utils/devel scsi-target-utils.spec, NONE, 1.1 tgtd.init, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Terje Røsten (terjeros)
fedora-extras-commits at redhat.com
Thu Oct 11 17:42:12 UTC 2007
Author: terjeros
Update of /cvs/extras/rpms/scsi-target-utils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31347/devel
Modified Files:
.cvsignore sources
Added Files:
scsi-target-utils.spec tgtd.init
Log Message:
--- NEW FILE scsi-target-utils.spec ---
%define date 20070803
Name: scsi-target-utils
Version: 0.0
Release: 1.%{date}snap%{?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-%{date}.tar.bz2
Source1: tgtd.init
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-%{date}
%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|-Wall -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 0644 doc/manpages/tgtadm.8 %{buildroot}/%{_mandir}/man8
pushd usr
%{__make} install DESTDIR=%{buildroot}
%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.iscsi
%{_sbindir}/tgtd
%{_sbindir}/tgtadm
%{_mandir}/man8/*
%{_initrddir}/tgtd
%changelog
* Wed Sep 26 2007 Terje Rosten <terje.rosten at ntnu.no> - 0.0-1.20070803snap
- random cleanup
* Wed Sep 26 2007 Terje Rosten <terje.rosten at ntnu.no> - 0.0-0.20070803snap
- update to 20070803
- fix license tag
- use date macro
- build with correct flags (%%optflags)
* Tue Jul 10 2007 Mike Christie <mchristie at redhat.com> - 0.0-0.20070620snap
- first build
--- NEW FILE tgtd.init ---
#!/bin/sh
#
# chkconfig: - 39 35
#
### BEGIN INIT INFO
# Provides: tgtd
# Required-Start: $network
# Short-Description: Starts and stops the generic storage target daemon
# Description: tgtd provides the SCSI and software transport target state
# machine daemon.
### END INIT INFO
#
#
# pidfile: /var/run/tgtd.pid
#
# Source function library.
. /etc/init.d/functions
PATH=/sbin:/bin:/usr/sbin:/usr/bin
RETVAL=0
start()
{
echo -n $"Starting SCSI target daemon: "
if [ -f /var/lock/subsys/tgtd ]; then
echo
success
return
fi
daemon tgtd
echo
RETVAL=$?
if [ $RETVAL -eq "0" ]; then
touch /var/lock/subsys/tgtd
fi
}
stop()
{
echo -n $"Stopping SCSI target daemon: "
if [ ! -f /var/lock/subsys/tgtd ]; then
echo
success
return
fi
if tgtadm --op show -m target | grep "Target" >/dev/null ; then
echo $"Targets still in use. Cannot shutdown service."
RETVAL=1
return
fi
killproc tgtd
echo
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/tgtd
}
restart()
{
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
status tgtd
RETVAL=$?
;;
condrestart)
[ -f /var/lock/subsys/tgtd ] && restart
;;
*)
echo $"Usage: $0 {start|stop|restart|status|condrestart}"
exit 1
esac
exit $RETVAL
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/scsi-target-utils/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 12 Jul 2007 02:05:19 -0000 1.1
+++ .cvsignore 11 Oct 2007 17:41:40 -0000 1.2
@@ -0,0 +1 @@
+tgt-20070803.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/scsi-target-utils/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 12 Jul 2007 02:05:19 -0000 1.1
+++ sources 11 Oct 2007 17:41:40 -0000 1.2
@@ -0,0 +1 @@
+b5f1cbe03ee6b973e0f2ea7184c48dff tgt-20070803.tar.bz2
More information about the fedora-extras-commits
mailing list