summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f4ddcec91f90f56ab326512a5adfcabf034c24b8 (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
40
41
42
43
44
45
46
47
48
49
# Maintainer: Adam Harvey <adam@adamharvey.name>
pkgname=tuc
pkgver=1.0.0
pkgrel=1
epoch=
pkgdesc="A more powerful alternative to cut"
arch=("x86_64" "aarch64")
url="https://github.com/riquito/tuc"
license=('GPL3')
groups=()
depends=()
makedepends=("cargo")
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("https://github.com/riquito/$pkgname/archive/refs/tags/v$pkgver.tar.gz")
noextract=()
sha256sums=('ea4d1adb1949b8f564c375cbd7e0569de5dcc1fcabd57d56174748091102eec2')
validpgpkeys=()

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

build() {
	cd "$pkgname-$pkgver"
  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cargo build --frozen --release --all-features
}

check() {
	cd "$pkgname-$pkgver"
  export RUSTUP_TOOLCHAIN=stable
  cargo test --frozen --all-features
}

package() {
	cd "$pkgname-$pkgver"
  install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
  install -Dm0644 -t "$pkgdir/usr/share/man/man1/" "doc/tuc.1"
}