Honggang Li bbc279
%global __remake_config 1
Honggang Li bbc279
Doug Ledford 8df8b7
Name:		mstflint
Doug Ledford 8df8b7
Summary:	Mellanox firmware burning tool
Kamal Heib 5be463
Version:	4.26.0
Michal Schmidt ee3fcf
Release:	%autorelease
Michal Schmidt 4b0184
# COPYING says the license is your choice of OpenIB.org BSD or GPLv2.
Michal Schmidt 4b0184
# kernel/Makefile has the 3-clause BSD.
Michal Schmidt 4b0184
# ext_libs/{iniParser,json,muparser}/ have MIT.
Michal Schmidt 4b0184
# ext_libs/sqlite/ has the SQLite blessing.
Michal Schmidt 4b0184
License:	(GPL-2.0-only OR Linux-OpenIB) AND BSD-3-Clause AND MIT AND blessing
Izabela Bakollari 9d534d
Url:		https://github.com/Mellanox/%{name}
Izabela Bakollari 9d534d
Source0: 	https://github.com/Mellanox/%{name}/releases/download/v%{version}-1/%{name}-%{version}-1.tar.gz
Honggang Li c600aa
Group:		Applications/System
Izabela Bakollari 9d534d
Kamal Heib 393d82
Patch1:		0001-Fix-bind-now-test.patch
Kamal Heib 2cd407
Patch4: 	add-default-link-flags-for-shared-libraries.patch
Honggang Li c600aa
Patch6: 	replace-mlxfwreset-with-mstfwreset-in-mstflint-message.patch
Izabela Bakollari 9d534d
Izabela Bakollari 9d534d
BuildRequires:	make
Honggang Li efbb42
BuildRequires:	libstdc++-devel, zlib-devel, libibmad-devel, gcc-c++, gcc
Honggang Li 2ae396
BuildRequires:  libcurl-devel, boost-devel, libxml2-devel, openssl-devel
3698d9
BuildRequires:  expat-devel
Honggang Li bbc279
%if %{__remake_config}
Honggang Li bbc279
BuildRequires:  libtool, autoconf, automake
Honggang Li bbc279
%endif
Doug Ledford 8df8b7
Obsoletes:	openib-mstflint <= 1.4 openib-tvflash <= 0.9.2 tvflash <= 0.9.0
Honggang Li 2ae396
ExcludeArch:	s390 s390x %{arm}
Honggang Li bbc279
Requires:	python3
Doug Ledford 8df8b7
Doug Ledford 8df8b7
%description
Honggang Li 2ae396
This package contains firmware update tool, vpd dump and register dump tools
Honggang Li 2ae396
for network adapters based on Mellanox Technologies chips.
Doug Ledford 8df8b7
Doug Ledford 8df8b7
%prep
Izabela Bakollari 9d534d
%setup -q -n %{name}-%{version}
Izabela Bakollari 9d534d
Kamal Heib 393d82
%patch1 -p1
Izabela Bakollari 9d534d
%patch4 -p1
Izabela Bakollari 9d534d
%patch6 -p1
Izabela Bakollari 9d534d
Honggang Li 5934d9
find . -type f -iname '*.[ch]' -exec chmod a-x '{}' ';'
Honggang Li 5934d9
find . -type f -iname '*.cpp' -exec chmod a-x '{}' ';'
Doug Ledford 8df8b7
Doug Ledford 8df8b7
%build
Honggang Li bbc279
%if %{__remake_config}
Honggang Li bbc279
./autogen.sh
Honggang Li bbc279
%endif
Kamal Heib 49733b
%configure --enable-adb-generic-tools --disable-openssl
Honggang Li 2ae396
%make_build
Doug Ledford 8df8b7
Doug Ledford 8df8b7
%install
Tom Stellard 879205
%make_install
Doug Ledford 6566d6
# Remove the devel files that we don't ship
Doug Ledford 6566d6
rm -fr %{buildroot}%{_includedir}
Honggang Li 2ae396
find %{buildroot} -type f -name '*.la' -delete
Honggang Li bbc279
find %{buildroot} -type f -name '*.a' -delete
Doug Ledford 8df8b7
Michal Schmidt e1beba
# Mark these shared libs executable for find-debuginfo.sh to find them.
Michal Schmidt e1beba
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Debuginfo/
Michal Schmidt e1beba
chmod +x %{buildroot}/%{_libdir}/mstflint/python_tools/*.so
Kamal Heib c6d5cc
chmod +x %{buildroot}/%{_libdir}/mstflint/sdk/*.so
Michal Schmidt e1beba
Doug Ledford 8df8b7
%files
Doug Ledford 8df8b7
%doc README
Doug Ledford 8df8b7
%_bindir/*
Honggang Li 2ae396
%{_libdir}/mstflint
Doug Ledford 8df8b7
Honggang Li f06fec
%{_datadir}/mstflint
Honggang Li f06fec
%{_mandir}/man1/*
Honggang Li f06fec
Doug Ledford 8df8b7
%changelog
Michal Schmidt ee3fcf
%autochangelog