Update package version to 0.26.8
This commit is contained in:
@@ -5,31 +5,30 @@
|
||||
# The prepare function is executed in the root of the temp directory
|
||||
# This function is used for putting downloaded files to the correct location or applying patches
|
||||
prepare() {
|
||||
cd "$BPM_SOURCE"/cli
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||
cd "$BPM_SOURCE"/crates/cli
|
||||
cargo fetch --locked --target "$(rustc --print host-tuple)"
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
# Build library
|
||||
mkdir lib/build
|
||||
cd lib/build
|
||||
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON ..
|
||||
make
|
||||
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
|
||||
cmake --build build
|
||||
|
||||
# Build command-line interface
|
||||
cd "$BPM_SOURCE"/cli
|
||||
|
||||
cd "$BPM_SOURCE"/crates/cli
|
||||
cargo build --release --locked --offline
|
||||
|
||||
# Build shell completions
|
||||
for completion in bash elvish fish nushell zsh; do
|
||||
cargo run --frozen --release -- complete --shell $completion > $completion-completions
|
||||
done
|
||||
}
|
||||
|
||||
# Function for packaging the main tree sitter library
|
||||
package_tree-sitter() {
|
||||
cd lib/build
|
||||
|
||||
make DESTDIR="$BPM_OUTPUT" install
|
||||
DESTDIR="$BPM_OUTPUT" cmake --install build
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/tree-sitter/LICENSE
|
||||
@@ -37,10 +36,16 @@ package_tree-sitter() {
|
||||
|
||||
# Function for packaging the tree sitter cli tools
|
||||
package_tree-sitter-cli() {
|
||||
cd cli
|
||||
|
||||
install -D "$BPM_SOURCE"/target/release/tree-sitter "$BPM_OUTPUT"/usr/bin/tree-sitter
|
||||
|
||||
# Install shell completions
|
||||
cd crates/cli
|
||||
install -Dm644 bash-completions "$BPM_OUTPUT"/usr/share/bash-completion/completions/tree-sitter
|
||||
install -Dm644 elvish-completions "$BPM_OUTPUT"/usr/share/elvish/lib/tree-sitter.elv
|
||||
install -Dm644 fish-completions "$BPM_OUTPUT"/usr/share/fish/vendor_completions.d/tree-sitter.fish
|
||||
install -Dm644 nushell-completions "$BPM_OUTPUT"/usr/share/nushell/vendor/autoload/tree-sitter.nu
|
||||
install -Dm644 zsh-completions "$BPM_OUTPUT"/usr/share/zsh/site-functions/_tree-sitter
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/tree-sitter/LICENSE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user