diff --git a/python-dmidecode.spec b/python-dmidecode.spec index a5cd27b..13533a1 100644 --- a/python-dmidecode.spec +++ b/python-dmidecode.spec @@ -1,6 +1,6 @@ Name: python-dmidecode Version: 3.12.3 -Release: 3 +Release: 4 Summary: Python extension module for dmidecode License: GPLv2 @@ -13,6 +13,9 @@ Patch1: python-dmidecode-3.12.3-sw.patch Patch2: python-dmidecode-rhbz2154949.patch BuildRequires: gcc libxml2-devel python3-libxml2 python3-devel +%if "%toolchain" == "clang" +BuildRequires: clang llvm lld +%endif %description Dmidecode reports information about your system's hardware as described in @@ -47,7 +50,9 @@ sed -i 's/python2/python3/g' Makefile unit-tests/Makefile export PYTHON_BIN=%{__python3} export PYTHON_VERSION=%{python3_version} export CFLAGS="%{build_cflags} -std=gnu89" -export CC=gcc +%if "%toolchain" == "clang" +export CFLAGS="$CFLAGS -Wno-error=int-conversion" +%endif %make_build %install @@ -71,6 +76,9 @@ make -C unit-tests %doc README doc/README.upstream %changelog +* Fri Aug 11 2023 liyunfei - 3.12.3-4 +- add clang compile support + * Wed Jul 05 2023 zhouwenpei - 3.12.3-3 - fix build error