summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 027f845c91525db38717836a9136634ad196f5d8 (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
# Maintainer: Jiří Sejkora <sejsel@sejsel.cz>
pkgname=ksplang
pkgver=0.1.0
pkgrel=1
pkgdesc="An interpreter for ksplang"
arch=('x86_64')
url="https://github.com/ksp/ksplang"
license=('MIT')
depends=()
makedepends=(cargo)
source=("$pkgname-$pkgver.tar.gz::https://github.com/ksp/$pkgname/archive/refs/tags/$pkgver.tar.gz")
sha512sums=('b8978d79729e3fef3b79edbccf3ce97a835ce04e81eea4e181917c8d88d8cfa0379e7297a1e32d9c079f0e9883cdb25b5affeeda059f027c8aab4b4400c4ab79')

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

build() {
    cd $pkgname-$pkgver
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build -p ksplang-cli --frozen --release --all-features
	mv target/release/ksplang-cli target/release/ksplang
}

package() {
    cd $pkgname-$pkgver
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
}