Maksim Bondarenkov a093ebd77b Revert "remove --offline option from cargo invocations"
This reverts commit 21a9d98f26c82a4be64c4a668e73fdef32e4cc4c.

it now behaves not how I expected. cargo now tries to make a HTTP request every try
2025-05-03 07:11:42 +03:00

59 lines
1.8 KiB
Bash

_realname=watchexec
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.3.0
pkgrel=1
msys2_repository_url="https://github.com/watchexec/watchexec/"
url="https://watchexec.github.io/"
pkgdesc="Executes commands in response to file modifications (mingw-w64)"
license=('spdx:Apache-2.0')
msys2_references=(
'archlinux: watchexec'
'purl: pkg:cargo/watchexec-cli'
)
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
makedepends=("${MINGW_PACKAGE_PREFIX}-rust")
options=('!strip')
source=("https://github.com/watchexec/watchexec/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('bf508d3662fe85294a61ab39a3fbfb0a76f79202448fb3c038a3003ae3e18245')
prepare() {
cd "${_realname}-${pkgver}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "${_realname}-${pkgver}"
WINAPI_NO_BUNDLED_LIBRARIES=1 \
cargo build --release --frozen -p watchexec-cli
}
check() {
cd "${_realname}-${pkgver}"
WINAPI_NO_BUNDLED_LIBRARIES=1 \
cargo test --release --frozen -p watchexec-cli
}
package() {
cd "${_realname}-${pkgver}"
WINAPI_NO_BUNDLED_LIBRARIES=1 \
cargo install \
--frozen \
--offline \
--no-track \
--path crates/cli \
--root "${pkgdir}${MINGW_PREFIX}"
install -Dm644 completions/bash "${pkgdir}${MINGW_PREFIX}/share/bash-completion/completions/watchexec"
install -Dm644 completions/zsh "${pkgdir}${MINGW_PREFIX}/share/zsh/site-functions/_watchexec"
install -Dm644 completions/fish "${pkgdir}${MINGW_PREFIX}/share/fish/vendor_completions.d/watchexec.fish"
install -Dm644 doc/watchexec.1 "${pkgdir}${MINGW_PREFIX}/share/man/man1/watchexec.1"
install -Dm644 doc/watchexec.1.md "${pkgdir}${MINGW_PREFIX}/share/doc/watchexec/watchexec.1.md"
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/watchexec/LICENSE"
}