Initial commit of spec file and patches

This commit is contained in:
Jan Zeleny 2009-04-10 07:31:57 +00:00
parent a08b7bfd39
commit 40414ea5a1
3 changed files with 147 additions and 0 deletions

View File

@ -0,0 +1,40 @@
--- fcoe-utils-1.0.7/etc/initd/initd.fedora 2009-03-27 21:40:22.000000000 +0100
+++ fcoe-utils-1.0.7/etc/initd/initd.fedora.update 2009-04-03 09:54:39.000000000 +0200
@@ -15,14 +15,17 @@
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
#
+# chkconfig: - 21 80
+#
# Maintained at www.Open-FCoE.org
### BEGIN INIT INFO
# Provides: fcoe
# Required-Start: network
# Required-Stop:
-# Default-Start: 3 5
-# Default-Stop: 3 5
+# Default-Start:
+# Default-Stop:
+# Short-Description: Open-FCoE SAN Setup
# Description: Open-FCoE SAN Setup
### END INIT INFO
@@ -183,6 +186,9 @@ service_start()
daemon --pidfile ${PID_FILE} ${FCOEMON}
fi
+ echo
+ touch /var/lock/subsys/fcoe-utils
+
return
}
@@ -218,6 +224,7 @@ service_stop()
done
rm -f /var/run/fcoemon.*
rm -f /tmp/fcoemon.dcbd.*
+ rm -f /var/lock/subsys/fcoe-utils
}
service_status()

View File

@ -0,0 +1,22 @@
--- fcoe-utils-1.0.7/Makefile.am 2009-03-27 21:40:22.000000000 +0100
+++ fcoe-utils-1.0.7/Makefile.am.initdir 2009-04-02 15:35:34.000000000 +0200
@@ -56,7 +56,7 @@ etc/initd/fcoe:
ln -s ${abs_srcdir}/etc/initd/initd.fcoe $@; \
fi
-init_ddir = ${sysconfdir}/init.d
+init_ddir = ${sysconfdir}/rc.d/init.d
init_d_SCRIPTS = etc/initd/fcoe
dist_noinst_DATA = README COPYING INSTALL fcoe-utils.spec
--- fcoe-utils-1.0.7/Makefile.in 2009-03-27 21:44:40.000000000 +0100
+++ fcoe-utils-1.0.7/Makefile.in.initdir 2009-04-02 15:35:19.000000000 +0200
@@ -211,7 +211,7 @@ fcoe_scripts_SCRIPTS = fcoeplumb
dist_man_MANS = doc/fcoeadm.8 $(am__append_2)
dist_noinst_SCRIPTS = etc/initd/initd.fcoe etc/initd/initd.suse etc/initd/initd.fedora
CLEANFILES = etc/initd/fcoe
-init_ddir = ${sysconfdir}/init.d
+init_ddir = ${sysconfdir}/rc.d/init.d
init_d_SCRIPTS = etc/initd/fcoe
dist_noinst_DATA = README COPYING INSTALL fcoe-utils.spec
all: all-am

85
fcoe-utils.spec Normal file
View File

@ -0,0 +1,85 @@
Name: fcoe-utils
Version: 1.0.7
Release: 3%{?dist}
Summary: Fibre Channel over Ethernet utilities
Group: Applications/System
License: GPLv2
URL: http://www.open-fcoe.org
Source0: http://www.open-fcoe.org/openfc/downloads/%{name}-%{version}.tar.gz
Patch0: fcoe-utils-1.0.7-init.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libhbaapi-devel dcbd-devel
Requires: dcbd
Requires(post): chkconfig
Requires(preun): chkconfig initscripts
Requires(postun): initscripts
%description
Fibre Channel over Ethernet utilities
fcoeadm - command line tool for configuring FCoE interfaces
fcoemon - service to configure DCB Ethernet QOS filters, works with dcbd
%prep
%setup -q
%patch0 -p1 -b .initPatch
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_initddir}
mv $RPM_BUILD_ROOT/etc/init.d/fcoe $RPM_BUILD_ROOT%{_initddir}/fcoe-utils
rm -rf $RPM_BUILD_ROOT/etc/init.d
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add fcoe-utils
%preun
if [ $1 = 0 ]; then
/sbin/service fcoe-utils stop > /dev/null 2>&1
/sbin/chkconfig --del fcoe-utils
fi
%postun
if [ "$1" -ge "1" ]; then
/sbin/service fcoe-utils condrestart > /dev/null 2>&1 || :
fi
%files
%defattr(-,root,root,-)
%doc README COPYING
%{_sbindir}/*
%{_mandir}/man8/*
%{_sysconfdir}/fcoe/scripts/fcoeplumb
%dir %{_sysconfdir}/fcoe/
%dir %{_sysconfdir}/fcoe/scripts/
%config(noreplace) %{_sysconfdir}/fcoe/config
%config(noreplace) %{_sysconfdir}/fcoe/cfg-ethx
%{_initrddir}/fcoe-utils
%changelog
* Wed Apr 8 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-3
- more minor corrections in spec file
* Thu Apr 2 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-2
- minor corrections in spec file
- moved init script to correct location
- correction in the init script (chkconfig directives)
* Mon Mar 2 2009 Chris Leech <christopher.leech@intel.com> - 1.0.7-1
- initial rpm build of fcoe tools