File qlvnictools.spec of Package qlvnictools

#
# spec file for package qlvnictools (Version 0.0.1 )
#
# 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/
#

%define extra_version -0.1.ge27eef7

Name:           qlvnictools
Version:        0.0.1
Release:        1
Summary:        VNIC ULP service
Group:          System/Console
License:        GPL-2.0+ or BSD-2-Clause
Url:            http://www.openfabrics.porg
Source0:        http://openib.org/downloads/%{name}-%{version}%{extra_version}.tar.gz
Source1:        ib_qlgc_vnic_info.1
Source2:        ib_qlgc_vnic_query.1
Source3:        ib_qlgc_vnic_update.1
Patch0:         qlvnictools-LSB_header.patch
Patch1:         qlvnictools-build_configuration.patch
Patch2:         qlvnictools-require_libibverbs.patch
Patch3:         qlvnictools-initscript.patch
Patch4:         qlvnictools-pid_dir.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       ibvexdmtools
BuildRequires:  autoconf automake libibumad-devel libibverbs-devel

%description
This package handles loading and unloading of the VNIC driver and triggers
creation of the VNIC interfaces by invoking a script which parses the VNIC
configuration file and creates the VNIC interfaces.

%package -n     ibvexdmtools 
Group:          System/Console
Summary:        Tools for VNIC/IB

%description -n ibvexdmtools
In conjunction with the kernel ib_vnic driver, ibvexdmtools allows you
to discover and use QLogic Virtual NIC devices via the VNIC protocol
over InfiniBand.



%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4

%build
pushd ibvexdmtools
autoreconf -fi
%configure 
make %{?_smp_mflags}
popd

pushd qlgc_vnic_daemon
autoreconf -fi
%configure
make %{?_smp_mflags}
popd

%install
install -D qlgc_vnic %{buildroot}%{_sysconfdir}/init.d/qlgc_vnic
install -D ib_qlgc_vnic_parser.pl %{buildroot}%{_sbindir}/ib_qlgc_vnic_parser.pl
install -D ib_qlgc_vnic_info %{buildroot}%{_sbindir}/ib_qlgc_vnic_info
install -D -m 0644 qlgc_vnic.cfg.sample %{buildroot}%{_sysconfdir}/infiniband/qlgc_vnic.cfg
ln -s %{_sysconfdir}/init.d/qlgc_vnic %{buildroot}%{_sbindir}/rcqlgc_vnic
install -d %{buildroot}%{_mandir}/man1
install -D -m 0644 %{S:1} %{S:2} %{S:3} %{buildroot}%{_mandir}/man1

pushd ibvexdmtools
make DESTDIR=%{buildroot} install
popd
pushd qlgc_vnic_daemon
make DESTDIR=%{buildroot} install
popd

%preun
%stop_on_removal qlgc_vic

%postun
%restart_on_update qlgc_vnic
%insserv_cleanup

%files
%defattr(-,root,root)
%doc COPYING README qlgc_vnic_daemon/README
%dir %_sysconfdir/infiniband
%_sysconfdir/init.d/qlgc_vnic
%_sbindir/ib_qlgc_vnic_parser.pl
%_sbindir/ib_qlgc_vnic_info
%{_sbindir}/ib_qlgc_vnic_update
%{_prefix}/sbin/rcqlgc_vnic
%doc %{_mandir}/man1/*.gz
%config(noreplace) %_sysconfdir/infiniband/qlgc_vnic.cfg

%files -n ibvexdmtools
%defattr(-,root,root)
%doc ibvexdmtools/NEWS ibvexdmtools/ChangeLog
%{_sbindir}/ib_qlgc_vnic_query

%changelog
openSUSE Build Service is sponsored by