## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # The documentation doesn't build at the moment, use the prebuilt one instead %bcond_with doc Name: esmi_ib_library Version: 4.3 %global major_version %(echo %{version} | cut -d. -f1) %global minor_version %(echo %{version} | cut -d. -f2) %global soversion %{version}.0 %global srcversion esmi_pkg_ver-%{version} Release: %autorelease Summary: E-SMI: EPYC System management Interface In-band Library License: NCSA URL: https://github.com/amd/esmi_ib_library Source: %{url}/archive/%{srcversion}/%{name}-%{srcversion}.tar.gz Patch: %{url}/pull/21.patch#/esmi_ib_library-fix-cflags.diff # This is a hardware enablement package for AMD x86_64 platforms ExclusiveArch: x86_64 BuildRequires: chrpath BuildRequires: cmake BuildRequires: gcc-c++ %if %{with system_amd_hsmp} BuildRequires: kernel-headers %endif BuildRequires: sed %if %{with doc} BuildRequires: doxygen BuildRequires: make BuildRequires: texlive-latex %endif Suggests: %{name}-doc = %{version}-%{release} %description The EPYC System Management Interface In-band Library, or E-SMI library, is part of the EPYC System Management Inband software stack. It is a C library for Linux that provides a user space interface to monitor and control the CPU's power, energy, performance and other system management features. %package devel Summary: Development headers and libraries for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains development headers and libraries for %{name}. %package doc Summary: Additional documentation for %{name} BuildArch: noarch %description doc This package contains additional documentation for %{name}. %package -n e_smi_tool Summary: E-SMI: EPYC™ System management Interface tool %description -n e_smi_tool This package contains E-SMI tool, a program based on the E-SMI In-band library that provides options to Monitor and Control System Management functionality. %prep %autosetup -N -n %{name}-%{srcversion} %autopatch -p1 # Use FHS install paths and patch version detection sed -i CMakeLists.txt \ -e 's:${E_SMI}/bin:%{_bindir}:g' \ -e 's:e_smi/include:%{_includedir}:g' \ -e 's:${E_SMI}/lib/static:%{_libdir}:g' \ -e 's:LIBRARY DESTINATION lib COMPONENT:LIBRARY DESTINATION %{_libdir} COMPONENT:g' \ -e 's:${E_SMI}/doc:%{_pkgdocdir}:g' \ -e 's:get_package_version_number("1.0.0.0":get_version_from_tag("%{soversion}":' %if %{with doc} # Remove prebuilt docs rm ESMI_IB_Release_Notes.pdf ESMI_Manual.pdf %endif %build %cmake -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_INSTALL_PREFIX=%{_prefix} %cmake_build %if %{with doc} make -C %{_vpath_builddir} doc %endif %install %cmake_install # Strip rpath chrpath -d %{buildroot}/%{_bindir}/e_smi_tool %check %ctest %files %license License.txt %dir %{_pkgdocdir} %doc %{_pkgdocdir}/README.md %doc %{_pkgdocdir}/RELEASENOTES.md %{_libdir}/libe_smi64.so.%{major_version} %{_libdir}/libe_smi64.so.%{soversion} %files devel %{_includedir}/e_smi/ %{_libdir}/libe_smi64.so %files doc %license License.txt %dir %{_pkgdocdir} %doc %{_pkgdocdir}/ESMI_IB_Release_Notes.pdf %doc %{_pkgdocdir}/ESMI_Manual.pdf %files -n e_smi_tool %{_bindir}/e_smi_tool %changelog ## START: Generated by rpmautospec * Wed Jul 23 2025 Fedora Release Engineering - 4.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Thu Jul 17 2025 Michel Lind - 4.3-1 - Update to 4.3 * Thu Jul 17 2025 Michel Lind - 4.2-2 - Fix 4.2 build - Remove fix bundling the system header, now part of the new release - Fix cmake settings * Wed Apr 09 2025 Packit - 4.2-1 - Update to 4.2 upstream release - Resolves: rhbz#2358601 * Tue Mar 18 2025 Michel Lind - 4.1.2-1 - Update to 4.1.2; Fixes: RHBZ#2267230 - Update version parsing to make it easier to update the spec - Also enable Packit * Thu Jan 16 2025 Fedora Release Engineering - 3.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Wed Jul 17 2024 Fedora Release Engineering - 3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Thu May 30 2024 Software Management Team - 3.0-2 - Eliminate use of obsolete %%patchN syntax (#2283636) * Wed Jan 24 2024 Davide Cavalca - 3.0-1 - Update to 3.0; Fixes: RHBZ#2260128 * Wed Jan 24 2024 Fedora Release Engineering - 1.5.0^20220622gitf4ce871-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 1.5.0^20220622gitf4ce871-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Jul 19 2023 Fedora Release Engineering - 1.5.0^20220622gitf4ce871-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Mar 31 2023 Davide Cavalca - 1.5.0^20220622gitf4ce871-3 - Number patches for compatibility with el8 * Wed Mar 29 2023 Davide Cavalca - 1.5.0^20220622gitf4ce871-2 - Fix build on EPEL 8 and EPEL 9 * Wed Mar 08 2023 Davide Cavalca - 1.5.0^20220622gitf4ce871-1 - Initial import; Fixes: RHBZ#2174487 ## END: Generated by rpmautospec