# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=difftastic
pkgver=0.60.0
pkgrel=0
pkgdesc="Diff tool that understands syntax"
url="https://difftastic.wilfred.me.uk/"
license="MIT"
arch="all"
makedepends="cargo openssl-dev cargo-auditable"
options="net"
source="https://github.com/Wilfred/difftastic/archive/$pkgver/difftastic-$pkgver.tar.gz"

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/difft -t "$pkgdir"/usr/bin/
}

sha512sums="
ad72ba1cbaa803683e682864f6289d4456cd15fd377e2c59c75d799a5e416ac2885f5fbd2dc5201143a214ce2dcf65dd357f8d844c5dbf43463eebd0ece9560e  difftastic-0.60.0.tar.gz
"
