blob: 50d69382efa930ec82e3acc083683439f4406662 (
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
|
# Maintainer: Kimiblock Moe
pkgname=clash2sing-box-git
pkgdesc="Simple tool for converting clash client outbounds to sing-box format "
url="https://github.com/oluceps/clash2sing-box"
license=(GPL3)
arch=("any")
pkgver=r242.19435af
pkgrel=1
makedepends=("rust" "cargo" "git")
depends=()
source=("git+https://github.com/oluceps/clash2sing-box.git")
md5sums=("SKIP")
provides=("clash2sing-box")
function pkgver() {
cd "${srcdir}/clash2sing-box"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
function prepare() {
cd "${srcdir}/clash2sing-box/ctos"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
function build() {
cd "${srcdir}/clash2sing-box/ctos"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}
function check() {
cd "${srcdir}/clash2sing-box/ctos"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}
function package() {
install -Dm755 "${srcdir}/clash2sing-box/ctos/target/release/ctos" "${pkgdir}/usr/bin/ctos"
}
|