summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f6799835979a44fba570e006468bb87d52f6d13b (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
# Maintainer: Accessory
_exe_name=minus_games_server
pkgname=$_exe_name-git
pkgver=0.3.0
_source_folder=$pkgname-$pkgver
pkgrel=1
epoch=
pkgdesc="Minus Games Server"
arch=("x86_64")
url="https://github.com/Accessory/minus_games"
license=('MIT')
groups=()
depends=()
makedepends=(cargo)
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("$_source_folder::git+$url#branch=main")
noextract=()
sha256sums=('SKIP')
validpgpkeys=()

prepare() {
    export RUSTUP_TOOLCHAIN=stable
	cd  $_source_folder
    cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
    export RUSTUP_TOOLCHAIN=stable
	export CARGO_TARGET_DIR=target
	cd  $_source_folder
	cargo build --release --bin $_exe_name
}

check() {
	echo "No tests"
}

package() {
	install -Dm0755 -t "$pkgdir/usr/bin/" "$_source_folder/target/release/$_exe_name"
}