summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: defd5d2e03de53c5a8bf688441b7a10f82f7ab3c (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
# Maintainer: Markus Hartung <mail@hartmark.se>
_pkgname=catp
pkgname=catp-git
pkgver=r22.14c5e5b
pkgrel=1
pkgdesc='Print the output of a running process'
arch=('x86_64')
url="https://github.com/rapiz1/catp"
license=('GPL')
makedepends=('rust')
source=("${pkgname}-${arch}::git+https://github.com/rapiz1/catp.git")
sha512sums=('SKIP')
conflicts=('catp')
provides=("$_pkgname")

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

build() {
    cd "${pkgname}-${arch}"
    cargo build --release --locked
}

check() {
    cd "${pkgname}-${arch}"
    cargo test --release --locked
}

package() {
    cd "${pkgname}-${arch}"
    install -Dm 755 -t "${pkgdir}/usr/bin" ./target/release/${_pkgname}
}