From ad4939ffd047f6455ad95d2e26047df8803b8834 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 15:57:48 +0000 Subject: [PATCH] Fix some paths --- build.spec.inc | 4 ++++ files.spec.inc | 14 +++++++------- install.spec.inc | 20 ++++++++++---------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 38a9da0..41cff18 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -74,7 +74,11 @@ popd -DCLANG_LINK_CLANG_DYLIB=ON \ -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ -DCLANG_REPOSITORY_STRING="%{?dist_vendor} %{version}-%{release}" \ +%if %{with compat_build} -DCLANG_RESOURCE_DIR=../lib/clang/%{maj_ver} \ +%else + -DCLANG_RESOURCE_DIR=../../../lib/clang/%{maj_ver} \ +%endif -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extra \ -DCLANG_CONFIG_FILE_SYSTEM_DIR=%{_sysconfdir}/%{pkg_name_clang}/ \ -DCLANG_DEFAULT_UNWINDLIB=libgcc \ diff --git a/files.spec.inc b/files.spec.inc index 8213f8d..49860b2 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -353,7 +353,7 @@ %files -n %{pkg_name_clang}-libs %license clang/LICENSE.TXT -%{install_prefix}/lib/clang/%{maj_ver}/include/* +%{_prefix}/lib/clang/%{maj_ver}/include/* %{install_libdir}/libclang.so.* %{install_libdir}/libclang-cpp.so.* @@ -372,12 +372,12 @@ %files -n %{pkg_name_clang}-resource-filesystem %license clang/LICENSE.TXT -%dir %{install_prefix}/lib/clang/ -%dir %{install_prefix}/lib/clang/%{maj_ver}/ -%dir %{install_prefix}/lib/clang/%{maj_ver}/bin/ -%dir %{install_prefix}/lib/clang/%{maj_ver}/include/ -%dir %{install_prefix}/lib/clang/%{maj_ver}/lib/ -%dir %{install_prefix}/lib/clang/%{maj_ver}/share/ +%dir %{_prefix}/lib/clang/ +%dir %{_prefix}/lib/clang/%{maj_ver}/ +%dir %{_prefix}/lib/clang/%{maj_ver}/bin/ +%dir %{_prefix}/lib/clang/%{maj_ver}/include/ +%dir %{_prefix}/lib/clang/%{maj_ver}/lib/ +%dir %{_prefix}/lib/clang/%{maj_ver}/share/ %{_rpmmacrodir}/macros.%{pkg_name_clang} %files -n %{pkg_name_clang}-analyzer diff --git a/install.spec.inc b/install.spec.inc index bc39783..d311b1d 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -164,29 +164,29 @@ ln -s ../../%{install_bindir}/clang++ %{buildroot}%{install_bindir}/clang++-%{m %endif # Fix permissions of scan-view scripts -chmod a+x %{buildroot}%{_datadir}/scan-view/{Reporter.py,startfile.py} +chmod a+x %{buildroot}%{install_datadir}/scan-view/{Reporter.py,startfile.py} # multilib fix -%multilib_fix_c_header --file %{_includedir}/clang/Config/config.h +%multilib_fix_c_header --file %{install_includedir}/clang/Config/config.h # remove editor integrations (bbedit, sublime, emacs, vim) -rm -vf %{buildroot}%{_datadir}/clang/clang-format-bbedit.applescript -rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py* +rm -vf %{buildroot}%{install_datadir}/clang/clang-format-bbedit.applescript +rm -vf %{buildroot}%{install_datadir}/clang/clang-format-sublime.py* # TODO: Package html docs -rm -Rvf %{buildroot}%{_docdir}/LLVM/clang/html -rm -Rvf %{buildroot}%{_docdir}/LLVM/clang-tools/html -rm -Rvf %{buildroot}%{_datadir}/clang-doc/clang-doc-default-stylesheet.css -rm -Rvf %{buildroot}%{_datadir}/clang-doc/index.js +rm -Rvf %{buildroot}%{install_docdir}/LLVM/clang/html +rm -Rvf %{buildroot}%{install_docdir}/LLVM/clang-tools/html +rm -Rvf %{buildroot}%{install_datadir}/clang-doc/clang-doc-default-stylesheet.css +rm -Rvf %{buildroot}%{install_datadir}/clang-doc/index.js # TODO: What are the Fedora guidelines for packaging bash autocomplete files? -rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh +rm -vf %{buildroot}%{install_datadir}/clang/bash-autocomplete.sh # Create sub-directories in the clang resource directory that will be # populated by other packages mkdir -p %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/{bin,include,lib,share}/ -#Add versioned resource directory macro +# Add versioned resource directory macro mkdir -p %{buildroot}%{_rpmmacrodir}/ echo "%%clang%{maj_ver}_resource_dir %%{_prefix}/lib/clang/%{maj_ver}" >> %{buildroot}%{_rpmmacrodir}/macros.%{name}