public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/amdsmi] epel10: Generate suse package names
@ 2026-06-09 22:35 Tom Rix
  0 siblings, 0 replies; only message in thread
From: Tom Rix @ 2026-06-09 22:35 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/amdsmi
            Branch : epel10
            Commit : 826f64dccdbe98f437433259052155e84fc5dedd
            Author : Tom Rix <Tom.Rix@amd.com>
            Date   : 2026-04-17T13:47:04-07:00
            Stats  : +49/-12 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/amdsmi/c/826f64dccdbe98f437433259052155e84fc5dedd?branch=epel10

            Log:
            Generate suse package names

Signed-off-by: Tom Rix <Tom.Rix@amd.com>

---
diff --git a/amdsmi.spec b/amdsmi.spec
index 3b3f56a..fdd404c 100644
--- a/amdsmi.spec
+++ b/amdsmi.spec
@@ -21,6 +21,9 @@
 #
 %global upstreamname amdsmi
 
+%global pkg_library_name amd_smi
+%global pkg_library_version 26
+
 %bcond_with preview
 %if %{with preview}
 %global rocm_release 7.12
@@ -47,6 +50,12 @@
 %global pkg_module default
 %endif
 
+%if 0%{?suse_version}
+%global pkg_name lib%{pkg_library_name}%{pkg_library_version}%{pkg_suffix}
+%else
+%global pkg_name %{NAME}
+%endif
+
 # Downloads its own googletest
 # Testing also depends on having AMD hardware cpu and/or gpu installed.
 # Not suitable for a general check
@@ -77,7 +86,7 @@ Version:    %{rocm_version}
 %if %{with preview}
 Release:    0%{?dist}
 %else
-Release:    2%{?dist}
+Release:    3%{?dist}
 %endif
 Summary:    AMD System Management Interface
 
@@ -140,6 +149,10 @@ Requires:      python3dist(pyyaml)
 Requires:       rocm-filesystem%{pkg_suffix}
 %endif
 
+%if 0%{?suse_version}
+Requires:       %{pkg_name}%{?_isa} = %{version}-%{release}
+%endif
+
 # University of Illinois/NCSA Open Source License
 Provides: bundled(esmi_ib_library) = %{esmi_ver}
 
@@ -148,9 +161,19 @@ The AMD System Management Interface Library, or AMD SMI library, is a C
 library for Linux that provides a user space interface for applications
 to monitor and control AMD devices.
 
+%if 0%{?suse_version}
+%package -n %{pkg_name}
+Summary:        Runtime for %{name}
+
+%description -n %{pkg_name}
+%summary
+
+%ldconfig_scriptlets -n %{pkg_name}
+%endif
+
 %package devel
-Summary: Libraries and headers for %{name}
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Summary:        Libraries and headers for %{name}
+Requires:       %{name}%{?_isa} = %{version}-%{release}
 
 %description devel
 %{summary}
@@ -158,7 +181,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
 %if %{with test}
 %package test
 Summary:        Tests for %{name}
-Requires:       %{name}%{?_isa} = %{version}-%{release}
+Requires:       %{pkg_name}%{?_isa} = %{version}-%{release}
 Requires:       libdrm-devel
 
 %description test
@@ -281,22 +304,32 @@ fi
 
 %if %{with preview}
 #ERROR   0002: file '/usr/lib/python3.14/site-packages/amdsmi/libamd_smi.so' contains an invalid runpath '/builddir/build/BUILD/amdsmi-7.12.0-build/amdsmi/redhat-linux-build/src/nic/ai-nic/amdsmi_unified/build' in [/builddir/build/BUILD/amdsmi-7.12.0-build/amdsmi/redhat-linux-build/src/nic/ai-nic/amdsmi_unified/build:]
-chrpath -d %{buildroot}%{pkg_prefix}/lib/python%{python3_version}/site-packages/amdsmi/libamd_smi.so
+chrpath -d %{buildroot}%{pkg_prefix}/lib/python%{python3_version}/site-packages/amdsmi/lib%{pkg_library_name}.so
 
 %endif
 
 %if 0%{?suse_version}
-%post   -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
-%endif
+%files
+%{pkg_prefix}/bin/amd-smi
+%{pkg_prefix}/libexec/amdsmi_cli
+%{pkg_prefix}/lib/python%{python3_version}/site-packages/amdsmi
+
+%files -n %{pkg_name}
+%doc README.md
+%license LICENSE
+%license esmi_ib_library_License.txt 
+%{pkg_prefix}/%{pkg_libdir}/lib%{pkg_library_name}.so.%{pkg_library_version}{,.*}
+%{pkg_prefix}/%{pkg_libdir}/libgoamdsmi_shim64.so.1{,.*}
+
+%else
 
 %files
 %doc README.md
 %license LICENSE
 %license esmi_ib_library_License.txt 
-%{pkg_prefix}/%{pkg_libdir}/libamd_smi.so.*
+%{pkg_prefix}/%{pkg_libdir}/lib%{pkg_library_name}.so.%{pkg_library_version}{,.*}
 %if %{without compat}
-%{pkg_prefix}/%{pkg_libdir}/libgoamdsmi_shim64.so.*
+%{pkg_prefix}/%{pkg_libdir}/libgoamdsmi_shim64.so.1{,.*}
 %{pkg_prefix}/bin/amd-smi
 %{pkg_prefix}/libexec/amdsmi_cli
 %{pkg_prefix}/lib/python%{python3_version}/site-packages/amdsmi
@@ -304,11 +337,12 @@ chrpath -d %{buildroot}%{pkg_prefix}/lib/python%{python3_version}/site-packages/
 %if %{with preview}
 %{pkg_prefix}/%{pkg_libdir}/libamdsminic.so.*
 %endif
+%endif
 
 %files devel
 %{pkg_prefix}/include/amd_smi/
 %{pkg_prefix}/include/*.h
-%{pkg_prefix}/%{pkg_libdir}/libamd_smi.so
+%{pkg_prefix}/%{pkg_libdir}/lib%{pkg_library_name}.so
 %{pkg_prefix}/%{pkg_libdir}/cmake/amd_smi/
 %if %{without compat}
 %{pkg_prefix}/%{pkg_libdir}/libgoamdsmi_shim64.so
@@ -329,11 +363,14 @@ chrpath -d %{buildroot}%{pkg_prefix}/lib/python%{python3_version}/site-packages/
 %if %{with preview}
 %if %{with static}
 %files static
-%{pkg_prefix}/%{pkg_libdir}/libamd_smi_static.a
+%{pkg_prefix}/%{pkg_libdir}/lib%{pkg_library_name}_static.a
 %endif
 %endif
 
 %changelog
+* Fri Apr 17 2026 Tom Rix <Tom.Rix@amd.com> - 7.2.1-3
+- Generate suse package names
+
 * Tue Apr 14 2026 Tom Rix <Tom.Rix@amd.com> - 7.2.1-2
 - Add --with static
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-09 22:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-09 22:35 [rpms/amdsmi] epel10: Generate suse package names Tom Rix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox