blob: 2be7f23e180c5a9d48e9ff5129e7eff557d6e2f7 (
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
49
|
# Maintainer: iamawacko <iamawacko@protonmail.com>
# Contributor: George Rawlinson <grawlinson@archlinux.org>
pkgname=starlark-rust
_pkgname=starlark
pkgver=0.13.0
pkgrel=1
pkgdesc='Rust implementation of the Starlark language'
arch=('x86_64')
url='https://github.com/facebookexperimental/starlark-rust'
license=('Apache')
depends=('gcc-libs')
makedepends=('git' 'rustup')
provides=('starlark')
options=('!lto')
source=("https://github.com/facebookexperimental/starlark-rust/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('c27d974dd242f133184a5fc53a145374f193464e163fa6fbd4cade566e3cfab6')
prepare() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo build --frozen --release --workspace
}
check() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --workspace
}
package() {
cd "$pkgname-$pkgver"
# binary
install -vDm755 -t "$pkgdir/usr/bin" target/release/starlark
# documentation
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" ./*.md
cp -vr docs "$pkgdir/usr/share/doc/$pkgname"
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
|