blob: 1332e34c4b4518e6f81830a4504e557668c0434d (
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
|
# Maintainer: bbaa <bbaa@bbaa.moe>
# Contributor: cap153 <1536989047@qq.com>
_pkgname=EasyTier
pkgname=easytier
pkgver=2.0.3
pkgrel=2
pkgdesc="A simple, decentralized mesh VPN with WireGuard support."
arch=("x86_64" "aarch64")
url="https://github.com/EasyTier/EasyTier"
license=('Apache-2.0')
depends=('glibc' 'gcc-libs')
makedepends=('cargo' 'protobuf')
backup=('etc/easytier/config.toml')
source=("$_pkgname-$pkgver.tar.gz::https://github.com/EasyTier/EasyTier/archive/refs/tags/v$pkgver.tar.gz" "easytier.service" "config.toml")
sha256sums=('b1f8eed03b263dca73f41224a59c38b15fe7b2e8173107cc63d9f624eae80e26'
'8bf506d141f3a7a716a9b483c8d469ad4e727f85c9664a35dbf467ae2c27513f'
'05518beea8b047d5e9b9adb14f26f85a91e4eea81ead7eeb4743f8978e1fd842')
prepare() {
cd "$_pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$_pkgname-$pkgver"
CFLAGS+=' -ffat-lto-objects' # fix for mimalloc linking
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --verbose --release
}
package() {
install -dm755 "$pkgdir/var/lib/easytier"
install -Dm644 "easytier.service" "$pkgdir/usr/lib/systemd/system/easytier.service"
install -Dm644 "config.toml" "$pkgdir/etc/easytier/config.toml"
cd "$_pkgname-$pkgver"
install -Dm755 "target/release/easytier-cli" "$pkgdir/usr/bin/easytier-cli"
install -Dm755 "target/release/easytier-core" "$pkgdir/usr/bin/easytier-core"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/easytier/LICENSE"
}
|