# Contributor: fossdd <fossdd@pwned.life>
# Maintainer: fossdd <fossdd@pwned.life>
pkgname=edu-sync
pkgver=0.3.2
pkgrel=0
pkgdesc="Moodle synchronization utility"
url="https://github.com/mkroening/edu-sync"
arch="all"
license="GPL-3.0-only"
makedepends="cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/mkroening/edu-sync/archive/refs/tags/v$pkgver.tar.gz"
options="net" # downloading rust crates

prepare() {
	default_prepare

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

build() {
	cargo auditable build --frozen --release --bin edu-sync-cli
}

check() {
	cargo test --frozen --release
}

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

sha512sums="
1524f87606d3cfc6192b1e36e4903e67e38a5d04c2d205786c7ca6ffee2a2d8b8b2e84dfd9fe753ba9667ef61df9f40b0d1031d41e88dd252d660d31cad581c1  edu-sync-0.3.2.tar.gz
"
