summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e0cb365e89dbc0b40c1aed50b3a85604c192db9f (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
# Maintainer: Tony Lambiris <tony@criticalstack.com>
pkgname=hexyl-git
pkgdesc="A command-line hex viewer"
pkgrel=1
pkgver=0.4.0.71
arch=('i686' 'x86_64')
conflicts=("hexyl")
provides=("hexyl")
url="https://github.com/sharkdp/hexyl"
license=('Apache' 'MIT')
depends=('rust' 'cargo')
makedepends=('rust' 'cargo')
optdepends=('rust-src: rust std source code')
source=("${pkgname}::git+https://github.com/sharkdp/hexyl")
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/${pkgname}"

	echo "$(grep -m1 '^version =' Cargo.toml | cut -d\" -f2).$(git rev-list --count HEAD)"
}

build() {
	cd "${srcdir}/${pkgname}"

	env CARGO_INCREMENTAL=0 cargo build --release
}

package() {
	cd "${srcdir}/${pkgname}"

	install -D -m755 "${srcdir}/${pkgname}/target/release/hexyl" "${pkgdir}/usr/bin/hexyl"
}