mirror of
https://github.com/termux/termux-packages.git
synced 2024-12-04 18:45:52 +00:00
0bfa477382
Co-authored-by: TomIO <43716232+TomJo2000@users.noreply.github.com>
36 lines
1.4 KiB
Bash
36 lines
1.4 KiB
Bash
TERMUX_PKG_HOMEPAGE=https://github.com/getzola/zola
|
|
TERMUX_PKG_DESCRIPTION="A fast static site generator in a single binary with everything built-in."
|
|
TERMUX_PKG_LICENSE="MIT"
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
|
TERMUX_PKG_VERSION="0.19.2"
|
|
TERMUX_PKG_SRCURL="https://github.com/getzola/zola/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
|
|
TERMUX_PKG_SHA256=bae10101b4afff203f781702deeb0a60d3ab0c9f0c7a616a7c1e0c504c33c93f
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
termux_step_pre_configure() {
|
|
termux_setup_rust
|
|
}
|
|
|
|
termux_step_make() {
|
|
cargo build \
|
|
--jobs "$TERMUX_PKG_MAKE_PROCESSES" \
|
|
--target "$CARGO_TARGET_NAME" \
|
|
--release
|
|
}
|
|
|
|
termux_step_make_install() {
|
|
install -Dm700 target/"${CARGO_TARGET_NAME}"/release/zola "$TERMUX_PREFIX"/bin
|
|
}
|
|
|
|
termux_step_post_make_install() {
|
|
mkdir -p "${TERMUX_PREFIX}/share/zsh/site-functions"
|
|
mkdir -p "${TERMUX_PREFIX}/share/bash-completion/completions"
|
|
mkdir -p "${TERMUX_PREFIX}/share/fish/vendor_completions.d"
|
|
mkdir -p "${TERMUX_PREFIX}/share/elvish/lib"
|
|
cargo run -- completion zsh > "${TERMUX_PREFIX}/share/zsh/site-functions/_${TERMUX_PKG_NAME}"
|
|
cargo run -- completion bash > "${TERMUX_PREFIX}/share/bash-completion/completions/${TERMUX_PKG_NAME}"
|
|
cargo run -- completion fish > "${TERMUX_PREFIX}/share/fish/vendor_completions.d/${TERMUX_PKG_NAME}.fish"
|
|
cargo run -- completion elvish > "${TERMUX_PREFIX}/share/elvish/lib/${TERMUX_PKG_NAME}.elv"
|
|
}
|