Create llvm-libs split package
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
name: llvm
|
name: llvm
|
||||||
description: A collection of modular and reusable compiler and toolchain technologies
|
description: A collection of modular and reusable compiler and toolchain technologies
|
||||||
version: 20.1.8
|
version: 20.1.8
|
||||||
|
revision: 2
|
||||||
url: https://llvm.org
|
url: https://llvm.org
|
||||||
license: Apache2-with-llvm-exception
|
license: Apache2-with-llvm-exception
|
||||||
architecture: any
|
architecture: any
|
||||||
@@ -8,7 +9,9 @@ make_depends: ["cmake","libffi","ncurses","ninja","python3","zlib","zstd"]
|
|||||||
type: source
|
type: source
|
||||||
split_packages:
|
split_packages:
|
||||||
- name: llvm
|
- name: llvm
|
||||||
depends: ["libedit","perl"]
|
depends: ["llvm-libs","perl"]
|
||||||
|
- name: llvm-libs
|
||||||
|
depends: ["gcc-libs","libedit","libffi","libxml2","zlib","zstd"]
|
||||||
- name: clang
|
- name: clang
|
||||||
description: C language family frontend for LLVM
|
description: C language family frontend for LLVM
|
||||||
url: https://clang.llvm.org/
|
url: https://clang.llvm.org/
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ package_llvm() {
|
|||||||
DESTDIR="$BPM_OUTPUT" ninja install
|
DESTDIR="$BPM_OUTPUT" ninja install
|
||||||
cp bin/FileCheck "$BPM_OUTPUT"/usr/bin
|
cp bin/FileCheck "$BPM_OUTPUT"/usr/bin
|
||||||
|
|
||||||
# Move clang files to another temporary directory
|
# Move clang files to clang package
|
||||||
CLANG="$BPM_WORKDIR"/clang-output
|
CLANG="$BPM_SOURCE"/output-clang
|
||||||
mkdir -p "$CLANG"/{usr/bin,usr/lib,usr/lib/cmake/,usr/include,usr/share,usr/share/man/man1}
|
mkdir -p "$CLANG"/{usr/bin,usr/lib,usr/lib/cmake/,usr/include,usr/share,usr/share/man/man1}
|
||||||
mv "$BPM_OUTPUT"/usr/bin/{amdgpu-arch,analyze-build,c-index-test,diagtool,git-clang-format,hmaptool,intercept-build,nvptx-arch,scan-build,scan-build-py,scan-view} "$CLANG"/usr/bin
|
mv "$BPM_OUTPUT"/usr/bin/{amdgpu-arch,analyze-build,c-index-test,diagtool,git-clang-format,hmaptool,intercept-build,nvptx-arch,scan-build,scan-build-py,scan-view} "$CLANG"/usr/bin
|
||||||
mv "$BPM_OUTPUT"/usr/bin/clang* -t "$CLANG"/usr/bin
|
mv "$BPM_OUTPUT"/usr/bin/clang* -t "$CLANG"/usr/bin
|
||||||
@@ -70,15 +70,30 @@ package_llvm() {
|
|||||||
mv "$BPM_OUTPUT"/usr/share/scan-build -t "$CLANG"/usr/share
|
mv "$BPM_OUTPUT"/usr/share/scan-build -t "$CLANG"/usr/share
|
||||||
mv "$BPM_OUTPUT"/usr/share/scan-view -t "$CLANG"/usr/share
|
mv "$BPM_OUTPUT"/usr/share/scan-view -t "$CLANG"/usr/share
|
||||||
|
|
||||||
|
# Move runtime libraries to llvm-libs package
|
||||||
|
LLVM_LIBS="$BPM_SOURCE"/output-llvm-libs
|
||||||
|
mkdir -p "$LLVM_LIBS"/usr/lib/
|
||||||
|
for lib in libLLVM libLLVM-"${BPM_PKG_VERSION%%.*}" libLTO libRemarks; do
|
||||||
|
mv "$BPM_OUTPUT"/usr/lib/"$lib".so* -t "$LLVM_LIBS"/usr/lib/
|
||||||
|
done
|
||||||
|
|
||||||
# Install package license
|
# Install package license
|
||||||
install -Dm644 ../LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/llvm/LICENSE.TXT
|
install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/llvm/LICENSE.TXT
|
||||||
|
}
|
||||||
|
|
||||||
|
package_llvm-libs() {
|
||||||
|
# Replace 'output' directory with 'output-llvm-libs'
|
||||||
|
rmdir "$BPM_OUTPUT"
|
||||||
|
mv "$BPM_SOURCE"/output-llvm-libs "$BPM_OUTPUT"
|
||||||
|
|
||||||
|
# Install package license
|
||||||
|
install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/llvm-libs/LICENSE.TXT
|
||||||
}
|
}
|
||||||
|
|
||||||
package_clang() {
|
package_clang() {
|
||||||
# Move clang files to 'output' diorectory
|
# Replace 'output' directory with 'output-clang'
|
||||||
CLANG="$BPM_WORKDIR"/clang-output
|
|
||||||
rmdir "$BPM_OUTPUT"
|
rmdir "$BPM_OUTPUT"
|
||||||
mv "$CLANG" "$BPM_OUTPUT"
|
mv "$BPM_SOURCE"/output-clang "$BPM_OUTPUT"
|
||||||
|
|
||||||
# Install package license
|
# Install package license
|
||||||
install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/clang/LICENSE.TXT
|
install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/clang/LICENSE.TXT
|
||||||
|
|||||||
Reference in New Issue
Block a user