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: Add --with static
Date: Tue, 09 Jun 2026 22:35:57 GMT	[thread overview]
Message-ID: <178104455750.1.16123845785165688140.rpms-amdsmi-c7f5594d9171@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/amdsmi
            Branch : epel10
            Commit : c7f5594d91718a424bb3d8e58d406a2374a46506
            Author : Tom Rix <Tom.Rix@amd.com>
            Date   : 2026-04-14T08:52:28-07:00
            Stats  : +31/-12 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/amdsmi/c/c7f5594d91718a424bb3d8e58d406a2374a46506?branch=epel10

            Log:
            Add --with static

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

---
diff --git a/amdsmi.spec b/amdsmi.spec
index b1c12ba..3b3f56a 100644
--- a/amdsmi.spec
+++ b/amdsmi.spec
@@ -61,12 +61,23 @@
 %global build_test OFF
 %endif
 
+%bcond_with static
+%if %{with static}
+%global build_static ON
+%else
+%global build_static OFF
+%if %{with preview}
+# Test does not link without static libs, disable tests
+%global build_test OFF
+%endif
+%endif
+
 Name:       amdsmi%{pkg_suffix}
 Version:    %{rocm_version}
 %if %{with preview}
 Release:    0%{?dist}
 %else
-Release:    1%{?dist}
+Release:    2%{?dist}
 %endif
 Summary:    AMD System Management Interface
 
@@ -155,6 +166,7 @@ Requires:       libdrm-devel
 %endif
 
 %if %{with preview}
+%if %{with static}
 %package static
 Summary: Static libraries for %{name}
 Requires: amdsmi%{pkg_suffix}-devel = %{version}-%{release}
@@ -163,6 +175,7 @@ Provides:  amdsmi%{pkg_suffix}-static = %{version}-%{release}
 %description static
 %{summary}
 %endif
+%endif
 
 %prep
 %if %{without preview}
@@ -205,16 +218,15 @@ sed -i 's@set(SHARE_INSTALL_PREFIX@#set(SHARE_INSTALL_PREFIX@' CMakeLists.txt
 
 %build
 %cmake \
-    -DCMAKE_INSTALL_PREFIX=%{pkg_prefix} \
+    -DAUTO_BUILD_STATIC_LIBS=%{build_static} \
+    -DBUILD_BOTH_LIBS=%{build_static} \
     -DBUILD_KERNEL_ASM_DIR=/usr/include/asm \
-    -DBUILD_TESTS=%build_test \
+    -DBUILD_TESTS=%{build_test} \
     -DCMAKE_INSTALL_LIBDIR=%{pkg_libdir} \
     -DCMAKE_INSTALL_PREFIX=%{pkg_prefix} \
     -DCMAKE_SKIP_INSTALL_RPATH=TRUE \
     -DSHARE_INSTALL_PREFIX=%{pkg_prefix}/share \
-%if %{with test}
-    -DUSE_SYSTEM_GTEST=On \
-%endif
+    -DUSE_SYSTEM_GTEST=%{build_test} \
     %{nil}
 
 %cmake_build
@@ -261,11 +273,11 @@ rm -f %{buildroot}%{pkg_prefix}/share/amd_smi/_version.py
 rm -f %{buildroot}%{pkg_prefix}/share/setup.py
 rm -f %{buildroot}%{pkg_prefix}/share/amd_smi/setup.py
 
-%if %{with test}
-# put the test files in a reasonable place
-mkdir %{buildroot}%{pkg_prefix}/share/amdsmi
-mv %{buildroot}%{pkg_prefix}/share/tests %{buildroot}%{pkg_prefix}/share/amdsmi/.
-%endif
+if [ -e %{buildroot}%{pkg_prefix}/share/tests ]; then
+  # put the test files in a reasonable place
+  mkdir %{buildroot}%{pkg_prefix}/share/amdsmi
+  mv %{buildroot}%{pkg_prefix}/share/tests %{buildroot}%{pkg_prefix}/share/amdsmi/
+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:]
@@ -307,17 +319,24 @@ chrpath -d %{buildroot}%{pkg_prefix}/lib/python%{python3_version}/site-packages/
 %{pkg_prefix}/%{pkg_libdir}/libamdsminic.so
 %endif
 
+%if %{without preview}
 %if %{with test}
 %files test
-%{pkg_prefix}/share/amdsmi
+%{pkg_prefix}/share/amdsmi/
+%endif
 %endif
 
 %if %{with preview}
+%if %{with static}
 %files static
 %{pkg_prefix}/%{pkg_libdir}/libamd_smi_static.a
 %endif
+%endif
 
 %changelog
+* Tue Apr 14 2026 Tom Rix <Tom.Rix@amd.com> - 7.2.1-2
+- Add --with static
+
 * Tue Mar 24 2026 Tom Rix <Tom.Rix@amd.com> - 7.2.1-1
 - Update to 7.2.1
 

                 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=178104455750.1.16123845785165688140.rpms-amdsmi-c7f5594d9171@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