aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 768bd5ada24dbe2403e01e3547f3a9fcabc94c91 (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
# Maintainer: George Rawlinson <grawlinson@archlinux.org>

pkgname=fleet
pkgver=r95.4273ea8
pkgrel=1
pkgdesc='Experimental build tool for Rust'
arch=('x86_64')
url='https://fleet.rs'
license=('Apache')
depends=('sccache' 'rustup' 'lld' 'clang')
makedepends=('git')
options=('!lto')
_commit='4273ea8d3bda31c1f6b27f132312bff6d0f0e985'
source=("$pkgname::git+https://github.com/dimensionhq/fleet.git#commit=$_commit")
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"

  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$pkgname"

  RUSTUP_TOOLCHAIN=nightly cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
  cd "$pkgname"
  
  RUSTUP_TOOLCHAIN=nightly cargo build --frozen --release --all-features
}

package() {
  cd "$pkgname"

  install -vDm755 -t "$pkgdir/usr/bin" target/release/fleet
}