summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9cf8181768bbd56f7e98ea977a592078c38b4563 (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
# Maintainer: João Vitor S. Anjos <jvanjos at protonmail dot com>

pkgname=stybulate
pkgver=1.1.2
pkgrel=1
pkgdesc='Tabulate with Style'
arch=('x86_64')
url="https://github.com/guigui64/stybulate"
license=('MIT' 'APACHE')
depends=('gcc-libs')
makedepends=('cargo')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('81dea03fee7e184b93243f94823edf856b3b54ce60540853206afacfd50320a6')

prepare() {
  cd ${pkgname}-${pkgver}
  cargo fetch --target $CARCH-unknown-linux-gnu
}

build() {
  cd ${pkgname}-${pkgver}
  cargo build --release --frozen --features cli
}

check() {
  cd ${pkgname}-${pkgver}
  cargo test --frozen --all-features
}

package() {
  cd ${pkgname}-${pkgver}
  install -Dm 755 target/release/${pkgname} -t "${pkgdir}/usr/bin"
  install -Dm 644 LICENSE* -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.md CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

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