summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cf142a252aa6facd61d0f388a3a4fd0255a6a9f5 (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
# Maintainer: Daniel M. Capella <polycitizen@gmail.com>

pkgname=fcat-git
pkgver=r40.c938b62
pkgrel=1
pkgdesc="cat implementation in Rust using Linux' splice syscall"
arch=('x86_64')
url=https://github.com/mre/fcat
license=('Apache' 'MIT')
depends=('gcc-libs')
makedepends=('git' 'rust')
provides=('fcat')
conflicts=('fcat')
source=("git+$url.git")
sha512sums=('SKIP')

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

build() {
  cd fcat
  cargo build --release --locked
}

check() {
  cd fcat
  cargo test --release --locked
}

package() {
  cd fcat
  install -Dm644 LICENSE-MIT "$pkgdir"/usr/share/licenses/fcat-git/LICENSE
  install -Dt "$pkgdir"/usr/bin target/release/fcat
}

# vim:set ts=2 sw=2 et: