blob: 9b8bacddd4281b7637c98b08d4e48f662c3e27a8 (
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
|
# Maintainer: Kimiblock Moe
# Maintainer: JohanChane
pkgname=clashtui
pkgdesc="Mihomo (Clash.Meta) TUI Client"
url="https://github.com/JohanChane/clashtui"
license=("MIT")
arch=("any")
pkgver=0.2.1
pkgrel=1
makedepends=("rust" "cargo" "git")
depends=("gcc-libs" "glibc")
source=("git+https://github.com/JohanChane/clashtui.git#tag=v${pkgver}")
md5sums=("SKIP")
provides=("clashtui")
options=(!lto)
function prepare() {
cd "${srcdir}/clashtui/clashtui"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --target "$CARCH-unknown-linux-gnu"
}
function build() {
cd "${srcdir}/clashtui/clashtui"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --release --frozen --all-features --locked
}
function check() {
cd "${srcdir}/clashtui/clashtui"
export RUSTUP_TOOLCHAIN=stable
cargo test --release --frozen --all-features --locked
}
function package() {
install -Dm755 "${srcdir}/clashtui/clashtui/target/release/clashtui" "${pkgdir}/usr/bin/clashtui"
install -Dm644 "${srcdir}/clashtui/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|