Make f35 compat builds work

This PR fixes a few issues when building in compat mode:

---

We don't want to package the `macros.clang` package when building clang in compat mode

Fixes:

```
error: Bad file: /builddir/build/SOURCES/macros.clang13: No such file or directory
```

See also 967d1e9cb7?branch=rawhide by @tbaeder  where this change is already applied.

---

Don't install libear and libscanbuild in compat build

Fixes:

```
Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/clang13-13.0.0-3.fc35.ppc64le
error: Installed (but unpackaged) file(s) found:
   /usr/lib64/llvm13/lib/libear/__init__.py
   /usr/lib64/llvm13/lib/libear/config.h.in
   /usr/lib64/llvm13/lib/libear/ear.c
   /usr/lib64/llvm13/lib/libscanbuild/__init__.py
   /usr/lib64/llvm13/lib/libscanbuild/analyze.py
   /usr/lib64/llvm13/lib/libscanbuild/arguments.py
   /usr/lib64/llvm13/lib/libscanbuild/clang.py
   /usr/lib64/llvm13/lib/libscanbuild/compilation.py
   /usr/lib64/llvm13/lib/libscanbuild/intercept.py
   /usr/lib64/llvm13/lib/libscanbuild/report.py
   /usr/lib64/llvm13/lib/libscanbuild/resources/scanview.css
   /usr/lib64/llvm13/lib/libscanbuild/resources/selectable.js
   /usr/lib64/llvm13/lib/libscanbuild/resources/sorttable.js
   /usr/lib64/llvm13/lib/libscanbuild/shell.py
```
This commit is contained in:
Konrad Kleine 2022-06-21 12:09:56 +02:00
parent fde900e4dd
commit def0a09b9f
1 changed files with 3 additions and 1 deletions

View File

@ -84,7 +84,7 @@ Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_
Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig
%endif
Source4: tstellar-gpg-key.asc
%if !0%{?compat_build}
%if %{without compat_build}
Source5: macros.%{name}
%endif
@ -384,6 +384,8 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
rm -Rf %{buildroot}%{install_bindir}
rm -Rf %{buildroot}%{install_prefix}/share
rm -Rf %{buildroot}%{install_prefix}/libexec
rm -Rf %{buildroot}%{install_prefix}/lib/libear
rm -Rf %{buildroot}%{install_prefix}/lib/libscanbuild
%else