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 ab247b
Version:	4.23.0
Michal Schmidt ee3fcf
Release:	%autorelease
Doug Ledford 8df8b7
License:	GPLv2+ or BSD
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
Izabela Bakollari 9d534d
Patch4:	add-default-link-flags-for-shared-libraries.patch
Honggang Li c600aa
Patch6: 	replace-mlxfwreset-with-mstfwreset-in-mstflint-message.patch
f0ce58
Patch7: mstflint-c99.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
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
Izabela Bakollari 9d534d
%patch4 -p1
Izabela Bakollari 9d534d
%patch6 -p1
f0ce58
%patch7 -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
Izabela Bakollari 9d534d
%configure --enable-fw-mgr
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
Michal Schmidt e1beba
Doug Ledford 8df8b7
%files
Doug Ledford 8df8b7
%doc README
Doug Ledford 8df8b7
%_bindir/*
Honggang Li 2ae396
%{_sysconfdir}/mstflint
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