# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=monolith
pkgver=2.8.1
pkgrel=1
pkgdesc="CLI tool for saving complete web pages as a single HTML file"
url="https://github.com/Y2Z/monolith"
# riscv64: rust is broken on this arch
arch="all !riscv64"
license="CC0-1.0"
makedepends="
	cargo
	cargo-auditable
	openssl-dev
	"
source="
	https://github.com/Y2Z/monolith/archive/v$pkgver/monolith-$pkgver.tar.gz
	cargo-update.patch
	"


prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

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

check() {
	cargo test --frozen
}

package() {
	install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
31bc8c82393ddd3e55d2fd1f13f60fcf2591b1718a077668e240853ee782c8ebbb3b32c88e89ae2d8bb5958277d4619919e596e815df42dbca51f1e0477eb7f5  monolith-2.8.1.tar.gz
50e7b4a8510f8563de9f3b355a241c303e02dca3cd972ab8c404985ec3236ac5c9dd2c5c098fc71f8f43487e9d9f6071c67c3f4b4d692af73f806ffae2c0607c  cargo-update.patch
"
