upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / rust-script / trunk / PKGBUILD
blobc2b8291bd0c507e31fdef4b31ac2a3feb0c63719
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
3 # Contributor: Wenxuan Zhang <wenxuangm@gmail.com>
5 pkgname=rust-script
6 pkgver=0.27.0
7 pkgrel=1
8 pkgdesc='Run Rust files and expressions as scripts without any setup or compilation'
9 arch=('x86_64')
10 url='https://rust-script.org'
11 license=('MIT' 'Apache')
12 depends=('gcc-libs')
13 makedepends=('cargo')
14 source=("$pkgname-$pkgver.tar.gz::https://github.com/fornwall/rust-script/archive/$pkgver.tar.gz")
15 sha256sums=('5864825c4fec863e226088deb0a03365f4bd69ed7700cae1f16096806b0fffcc')
17 prepare() {
18   cd "$pkgname-$pkgver"
20   # download dependencies
21   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
24 build() {
25   cd "$pkgname-$pkgver"
27   cargo build --frozen --release
30 check() {
31   cd "$pkgname-$pkgver"
33   cargo test \
34         --frozen -- \
35         --skip "tests::script::test_nightly_toolchain" \
36         --skip "tests::script::test_stable_toolchain"
39 package() {
40   cd "$pkgname-$pkgver"
42   # binary
43   install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
45   # documentation
46   install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
48   # licenses
49   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE*