Petr Šabata 0ef609
%global __remake_config 1
Petr Šabata 0ef609
Petr Šabata 0ef609
Name:		mstflint
Petr Šabata 0ef609
Summary:	Mellanox firmware burning tool
Kamal Heib 30920b
Version:	4.24.0
Michel Lind 34c551
Release:	%autorelease
Petr Šabata 0ef609
License:	GPLv2+ or BSD
Michal Schmidt dbbba6
Url:		https://github.com/Mellanox/%{name}
Michal Schmidt dbbba6
Source0: 	https://github.com/Mellanox/%{name}/releases/download/v%{version}-1/%{name}-%{version}-1.tar.gz
Petr Šabata 0ef609
Group:		Applications/System
Michal Schmidt dbbba6
Michal Schmidt dbbba6
Patch4:	add-default-link-flags-for-shared-libraries.patch
Petr Šabata 0ef609
Patch6: 	replace-mlxfwreset-with-mstfwreset-in-mstflint-message.patch
Michal Schmidt dbbba6
Michal Schmidt dbbba6
BuildRequires:	make
Petr Šabata 0ef609
BuildRequires:	libstdc++-devel, zlib-devel, libibmad-devel, gcc-c++, gcc
Petr Šabata 0ef609
BuildRequires:  libcurl-devel, boost-devel, libxml2-devel, openssl-devel
ac6b57
BuildRequires:  expat-devel
Petr Šabata 0ef609
%if %{__remake_config}
Petr Šabata 0ef609
BuildRequires:  libtool, autoconf, automake
Petr Šabata 0ef609
%endif
Petr Šabata 0ef609
Obsoletes:	openib-mstflint <= 1.4 openib-tvflash <= 0.9.2 tvflash <= 0.9.0
Petr Šabata 0ef609
ExcludeArch:	s390 s390x %{arm}
Petr Šabata 0ef609
Requires:	python3
Petr Šabata 0ef609
Petr Šabata 0ef609
%description
Petr Šabata 0ef609
This package contains firmware update tool, vpd dump and register dump tools
Petr Šabata 0ef609
for network adapters based on Mellanox Technologies chips.
Petr Šabata 0ef609
Petr Šabata 0ef609
%prep
Michal Schmidt dbbba6
%setup -q -n %{name}-%{version}
Michal Schmidt dbbba6
Petr Šabata 0ef609
%patch4 -p1
Petr Šabata 0ef609
%patch6 -p1
Michal Schmidt dbbba6
Petr Šabata 0ef609
find . -type f -iname '*.[ch]' -exec chmod a-x '{}' ';'
Petr Šabata 0ef609
find . -type f -iname '*.cpp' -exec chmod a-x '{}' ';'
Petr Šabata 0ef609
Petr Šabata 0ef609
%build
Petr Šabata 0ef609
%if %{__remake_config}
Petr Šabata 0ef609
./autogen.sh
Petr Šabata 0ef609
%endif
ac6b57
%configure --enable-fw-mgr --enable-adb-generic-tools
Petr Šabata 0ef609
%make_build
Petr Šabata 0ef609
Petr Šabata 0ef609
%install
Petr Šabata 0ef609
%make_install
Petr Šabata 0ef609
# Remove the devel files that we don't ship
Petr Šabata 0ef609
rm -fr %{buildroot}%{_includedir}
Petr Šabata 0ef609
find %{buildroot} -type f -name '*.la' -delete
Petr Šabata 0ef609
find %{buildroot} -type f -name '*.a' -delete
Petr Šabata 0ef609
Michal Schmidt e2dcae
# Mark these shared libs executable for find-debuginfo.sh to find them.
Michal Schmidt e2dcae
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Debuginfo/
Michal Schmidt e2dcae
chmod +x %{buildroot}/%{_libdir}/mstflint/python_tools/*.so
Michal Schmidt e2dcae
Petr Šabata 0ef609
%files
Petr Šabata 0ef609
%doc README
Petr Šabata 0ef609
%_bindir/*
Petr Šabata 0ef609
%{_sysconfdir}/mstflint
Petr Šabata 0ef609
%{_libdir}/mstflint
Petr Šabata 0ef609
Petr Šabata 0ef609
%{_datadir}/mstflint
Petr Šabata 0ef609
%{_mandir}/man1/*
Petr Šabata 0ef609
Petr Šabata 0ef609
%changelog
Michel Lind 34c551
%autochangelog