summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b88b5af673fc8bf994efd233da2a27d149ad28f2 (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: Jean Lucas <jean@4ray.co>

pkgname=sccache
pkgver=0.2.7
pkgrel=2
pkgdesc='ccache-like tool with experimental Rust support'
arch=(i686 x86_64)
url=https://github.com/mozilla/sccache
license=(Apache)
makedepends=(rust)
conflicts=(sccache-bin sccache-git)
source=($url/archive/$pkgver.tar.gz)
sha512sums=('8df06c5540cdbeeaa352cdaa2dde436ceb2f0c3287945279c051763561ff8a76a88ace2b90da7134ff418daf80345c4dce9fc10d77c8756a0422f0f4725344f2')

build() {
  cd sccache-$pkgver
  cargo build --release
}

check() {
  cd sccache-$pkgver
  cargo test --release || true
}

package() {
  cd sccache-$pkgver
  cargo install --root "$pkgdir"/usr
  rm "$pkgdir"/usr/.crates.toml
  install -Dm 644 README.md -t "$pkgdir"/usr/share/doc/sccache
  install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/sccache
}