blob: c6c19f384747dd49d1b27b25107ef67beae6ab6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
pkgname=mirrord
pkgver=3.84.0
pkgrel=1
pkgdesc="Connect your local process and your cloud environment, and run local code in cloud conditions"
url="https://github.com/metalbear-co/mirrord"
arch=(x86_64)
license=(MIT)
depends=(
gcc-libs
glibc
)
makedepends=(
cargo-nightly
clang
protobuf
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('135be6dd8ab905eb62cde2c94e702b1efd01fb4711c1f91d85cc9927948776ef')
options=(!lto)
_archive="$pkgname-$pkgver"
prepare() {
cd "$_archive"
export RUSTUP_TOOLCHAIN=nightly
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$_archive"
export RUSTUP_TOOLCHAIN=nightly
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features --package mirrord
# Completions
./target/release/mirrord completions bash > mirrord.bash
./target/release/mirrord completions fish > mirrord.fish
./target/release/mirrord completions zsh > mirrord.zsh
}
# Tests require running a Minikube cluster as far as am aware.
# check() {
# cd "$_archive"
# export RUSTUP_TOOLCHAIN=nightly
# cargo test --frozen --all-features
# }
package() {
cd "$_archive"
install -Dm755 -t "$pkgdir/usr/bin" target/release/mirrord
install -Dm644 mirrord.bash "$pkgdir/usr/share/bash-completion/completions/mirrord"
install -Dm644 mirrord.fish "$pkgdir/usr/share/fish/vendor_completions.d/mirrord.fish"
install -Dm644 mirrord.zsh "$pkgdir/usr/share/zsh/site-functions/_mirrord"
install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" ./*.md
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
|