Add macros.clang file
This commit is contained in:
parent
a5df6c712b
commit
d99713b7d0
18
clang.spec
18
clang.spec
@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
Name: %pkg_name
|
Name: %pkg_name
|
||||||
Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}
|
Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A C language family front-end for LLVM
|
Summary: A C language family front-end for LLVM
|
||||||
|
|
||||||
License: NCSA
|
License: NCSA
|
||||||
@ -80,6 +80,9 @@ 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
|
Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig
|
||||||
%endif
|
%endif
|
||||||
Source4: tstellar-gpg-key.asc
|
Source4: tstellar-gpg-key.asc
|
||||||
|
%if !0%{?compat_build}
|
||||||
|
Source5: macros.%{name}
|
||||||
|
%endif
|
||||||
|
|
||||||
# Patches for clang
|
# Patches for clang
|
||||||
Patch0: 0001-PATCH-clang-Reorganize-gtest-integration.patch
|
Patch0: 0001-PATCH-clang-Reorganize-gtest-integration.patch
|
||||||
@ -379,6 +382,15 @@ rm -Rf %{buildroot}%{install_prefix}/libexec
|
|||||||
|
|
||||||
%else
|
%else
|
||||||
|
|
||||||
|
# File in the macros file for other packages to use. We are not doing this
|
||||||
|
# in the compat package, because the version macros would # conflict with
|
||||||
|
# eachother if both clang and the clang compat package were installed together.
|
||||||
|
install -p -m0644 -D %{SOURCE5} %{buildroot}%{_rpmmacrodir}/macros.%{name}
|
||||||
|
sed -i -e "s|@@CLANG_MAJOR_VERSION@@|%{maj_ver}|" \
|
||||||
|
-e "s|@@CLANG_MINOR_VERSION@@|%{min_ver}|" \
|
||||||
|
-e "s|@@CLANG_PATCH_VERSION@@|%{patch_ver}|" \
|
||||||
|
%{buildroot}%{_rpmmacrodir}/macros.%{name}
|
||||||
|
|
||||||
# install clang python bindings
|
# install clang python bindings
|
||||||
mkdir -p %{buildroot}%{python3_sitelib}/clang/
|
mkdir -p %{buildroot}%{python3_sitelib}/clang/
|
||||||
install -p -m644 bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/
|
install -p -m644 bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/
|
||||||
@ -485,6 +497,7 @@ false
|
|||||||
%{_includedir}/clang-c/
|
%{_includedir}/clang-c/
|
||||||
%{_libdir}/cmake/*
|
%{_libdir}/cmake/*
|
||||||
%dir %{_datadir}/clang/
|
%dir %{_datadir}/clang/
|
||||||
|
%{_rpmmacrodir}/macros.%{name}
|
||||||
%else
|
%else
|
||||||
%{pkg_libdir}/*.so
|
%{pkg_libdir}/*.so
|
||||||
%{pkg_includedir}/clang/
|
%{pkg_includedir}/clang/
|
||||||
@ -548,6 +561,9 @@ false
|
|||||||
|
|
||||||
%endif
|
%endif
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 09 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0~rc1-2
|
||||||
|
- Add macros.clang file
|
||||||
|
|
||||||
* Fri Aug 06 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0~rc1-1
|
* Fri Aug 06 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0~rc1-1
|
||||||
- 13.0.0-rc1 Release
|
- 13.0.0-rc1 Release
|
||||||
|
|
||||||
|
16
macros.clang
Normal file
16
macros.clang
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
%clang_major_version @@CLANG_MAJOR_VERSION@@
|
||||||
|
%clang_minor_version @@CLANG_MINOR_VERSION@@
|
||||||
|
%clang_patch_version @@CLANG_PATCH_VERSION@@
|
||||||
|
|
||||||
|
%clang_version %{clang_major_version}.%{clang_minor_version}.%{clang_patch_version}
|
||||||
|
|
||||||
|
# This is the path to the clang resource directory that has clang's internal
|
||||||
|
# headers and libraries. This path should be used by packages that need to
|
||||||
|
# install files into this directory. This macro's value changes every time
|
||||||
|
# clang's version changes.
|
||||||
|
%clang_resource_dir %{_libdir}/clang/%{clang_version}
|
||||||
|
|
||||||
|
# This is the path to the clang resource directory that should be used
|
||||||
|
# by packages that need to read files from this directory at runtime.
|
||||||
|
# This macro only changes when clang's major version changes.
|
||||||
|
%clang_resource_dir_readonly %{_libdir}/clang/%{clang_major_version}
|
Loading…
Reference in New Issue
Block a user