# Contributor: fossdd <fossdd@pwned.life>
# Maintainer: fossdd <fossdd@pwned.life>
pkgname=edu-sync
pkgver=0.2.3
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="
2549bdb938dd6ecb3765e19ae760fe19263b992894be3fac143c75f5ab9a30775573a5b7c763eef95b7d1072f6e5bab3a78fda423f3f251e634152a7c25e924d  edu-sync-0.2.3.tar.gz
"
