public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tom Rix <Tom.Rix@amd.com>
To: git-commits@fedoraproject.org
Subject: [rpms/amdsmi] epel10: Generate suse package names
Date: Tue, 09 Jun 2026 22:35:57 GMT	[thread overview]
Message-ID: <178104455793.1.14868057911878553097.rpms-amdsmi-826f64dccdbe@fedoraproject.org> (raw)

            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
 

                 reply	other threads:[~2026-06-09 22:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178104455793.1.14868057911878553097.rpms-amdsmi-826f64dccdbe@fedoraproject.org \
    --to=tom.rix@amd.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox