File mstflint.spec of Package mstflint
#
# spec file for package mstflint
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define git_tag -9b9af70
Name: mstflint
Summary: Mellanox Firmware Burning and Diagnostics Tools
License: GPL-2.0 or BSD-2-Clause
Group: System/Console
Version: 4.3.0
Release: 0
Source0: %{name}-%{version}%{git_tag}.tar.xz
Source1: mstflint-additional_manpages.tar.xz
# PATCH-FIX-UPSTREAM Add all needed defines to get it built on s390x
Patch4: mstflint-s390_arch.patch
Patch5: mstflint-add_manpages.patch
Patch6: mstflint-common_int_handling.patch
Url: http://www.openfabrics.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libibmad-devel
BuildRequires: libopenssl-devel
BuildRequires: libtool
BuildRequires: libtool
BuildRequires: zlib-devel
%description
This package contains a burning tool and diagnostic tools for Mellanox
manufactured HCA/NIC cards. It also provides access to the relevant
source code. Please see the file LICENSE for licensing details.
This package is based on a subset of the Mellanox Firmware Tools (MFT)
package. For a full documentation of the MFT package, please refer to
the downloads page at the Mellanox web site.
%package devel
Summary: SDK to access flash on Mellanox HCAs/NICs
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
This package contains the header and the library symlink needed
to access the flash memory on Mellanox HCAs/NICs.
%prep
%setup -q -a 1
%patch4
%patch5
%patch6
# Avoid unnecessary rebuilds of the package
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M:%%S')
sed -i -e "s/__DATE__/\"$FAKE_BUILDDATE\"/" -e "s/__TIME__/\"$FAKE_BUILDTIME\"/" common/tools_version.h
%build
autoreconf -fiv
%{configure} --enable-cs
make
%install
make DESTDIR=%{buildroot} install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-, root, root)
%doc README COPYING LICENSE ChangeLog
%{_mandir}/man1/*.1.gz
%_bindir/*
%{_datadir}/%{name}
%files devel
%defattr(-, root, root)
%{_includedir}/mtcr_ul
%{_libdir}/libmtcr_ul.a
%changelog