diff --git a/bzip2.spec b/bzip2.spec index 689ef81a80143f0810021f2999ff52623bcf37d5..7199f3df048bbaedb7f48393f8e896548154a59a 100644 --- a/bzip2.spec +++ b/bzip2.spec @@ -1,6 +1,6 @@ Name: bzip2 Version: 1.0.8 -Release: 5 +Release: 6 Summary: A high-quality data compressor License: BSD @@ -37,12 +37,21 @@ header files for bzip2 %autosetup -n %{name}-%{version} -p1 %build +%if "%toolchain" == "clang" +%make_build -f Makefile-libbz2_so "CFLAGS=%{optflags} -Winline -fpic -fPIC -D_FILE_OFFSET_BITS=64" CC=clang AR=llvm-ar RANLIB=llvm-ranlib +%make_build "CFLAGS=%{optflags} -fpic -fPIC -Winline -D_FILE_OFFSET_BITS=64" CC=clang AR=llvm-ar RANLIB=llvm-ranlib +%else %make_build -f Makefile-libbz2_so "CFLAGS=%{optflags} -Winline -fpic -fPIC -D_FILE_OFFSET_BITS=64" %make_build "CFLAGS=%{optflags} -fpic -fPIC -Winline -D_FILE_OFFSET_BITS=64" +%endif %install rm -rf %RPM_BUILD_ROOT +%if "%toolchain" == "clang" +%make_install PREFIX=%{buildroot}%{_prefix} CC=clang AR=llvm-ar RANLIB=llvm-ranlib +%else %make_install PREFIX=%{buildroot}%{_prefix} +%endif # Default install path is /usr/bin lib man, change dest dirs here. pushd %{buildroot}%{_prefix} @@ -90,6 +99,9 @@ make check %{_mandir}/man1/b*.1.gz %changelog +* Thu Apr 13 2023 Chenxi Mao - 1.0.8-6 +- Support build with clang. + * Tue Sep 20 2022 zhoupengcheng - 1.0.8-5 - Delete redundant .so files