File srptools.spec of Package srptools
#
# spec file for package srptools (Version 0.0.4)
#
# Copyright (c) 2008-2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
#%%define my_release -0.1.gce1f64c
Name: srptools
Summary: Tools for SRP/IB
Version: 1.0.2
Release: 0.4
License: BSD-2-Clause or GPL-2.0
Group: System/Console
Source0: http://www.openfabrics.org/downloads/srptools/%{name}-%{version}.tar.gz
Source1: conf.sysconfig
Patch0: srptools-no_init_level_4.patch
Patch1: srptools-remote_fs_dependency.patch
Url: http://www.openfabrics.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libibumad-devel libibverbs-devel
BuildRequires: automake autoconf libtool
BuildRequires: rsyslog
PreReq: %fillup_prereq
Suggests: rsyslog
Suggests: logrotate
%description
In conjunction with the kernel ib_srp driver, srptools allows you to
discover and use SCSI devices via the SCSI RDMA Protocol over
InfiniBand.
%prep
%setup -q -n %{name}-%{version}
%patch0
%patch1
cp %{S:1} .
%build
autoreconf -fi
export CFLAGS="%optflags"
%configure
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
# install sysconfig configuration
install -m 700 -D conf.sysconfig %{buildroot}/var/adm/fillup-templates/sysconfig.infiniband-%name
ln -sf %{_sysconfdir}/init.d/srpd %{buildroot}/usr/sbin/rcsrpd
%post
%{fillup_and_insserv -n infiniband}
%restart_on_update
%preun
%stop_on_removal
%postun
%restart_on_update
%insserv_cleanup
%files
%defattr(-, root, root)
%doc COPYING
%config(noreplace) %_sysconfdir/srp_daemon.conf
%config %{_sysconfdir}/logrotate.d/srp_daemon
%config %{_sysconfdir}/rsyslog.d/srp_daemon.conf
/var/adm/fillup-templates/sysconfig.infiniband-%name
%_sbindir/*
%_mandir/man1/*
%{_sysconfdir}/init.d/srpd
%{_prefix}/sbin/rcsrpd
%changelog