archrelease: copy trunk to community-any
[ArchLinux/community.git] / cargo-hakari / trunk / PKGBUILD
blob40e09d29b312c156e00642f6bba7670d5d3b37e7
1 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
3 pkgname=cargo-hakari
4 pkgver=0.9.14
5 pkgrel=1
6 pkgdesc="Manage workspace-hack packages to speed up builds in large workspaces"
7 arch=('x86_64')
8 url="https://github.com/facebookincubator/cargo-guppy"
9 license=('MIT' 'Apache')
10 depends=('gcc-libs')
11 makedepends=('cargo')
12 source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgname-$pkgver.tar.gz")
13 sha512sums=('83fd807c65554fa2ad17ebea05286bb97951c370bdf1301ae993e6c6d48930e24ba0ce392940caa14782d4a464126a57afadcd9ddfaf8a2917c95e8c81e6941c')
15 prepare() {
16   mv "cargo-guppy-$pkgname-$pkgver" "$pkgname-$pkgver"
17   cd "$pkgname-$pkgver/tools/$pkgname"
18   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
21 build() {
22   cd "$pkgname-$pkgver/tools/$pkgname"
23   CFLAGS+=" -ffat-lto-objects"
24   cargo build --release --frozen
27 check() {
28   cd "$pkgname-$pkgver/tools/$pkgname"
29   cargo test --frozen
32 package() {
33   cd "$pkgname-$pkgver"
34   install -Dm 755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
35   install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
36   install -Dm 644 LICENSE-MIT -t "$pkgdir/usr/share/licenses/$pkgname"
39 # vim: ts=2 sw=2 et: