Create llvm-libs split package
This commit is contained in:
@@ -55,8 +55,8 @@ package_llvm() {
|
||||
DESTDIR="$BPM_OUTPUT" ninja install
|
||||
cp bin/FileCheck "$BPM_OUTPUT"/usr/bin
|
||||
|
||||
# Move clang files to another temporary directory
|
||||
CLANG="$BPM_WORKDIR"/clang-output
|
||||
# Move clang files to clang package
|
||||
CLANG="$BPM_SOURCE"/output-clang
|
||||
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/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-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 -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() {
|
||||
# Move clang files to 'output' diorectory
|
||||
CLANG="$BPM_WORKDIR"/clang-output
|
||||
# Replace 'output' directory with 'output-clang'
|
||||
rmdir "$BPM_OUTPUT"
|
||||
mv "$CLANG" "$BPM_OUTPUT"
|
||||
mv "$BPM_SOURCE"/output-clang "$BPM_OUTPUT"
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/clang/LICENSE.TXT
|
||||
|
||||
Reference in New Issue
Block a user