# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
pkgname=mailtutan
pkgver=0.3.0
pkgrel=2
pkgdesc="An SMTP server for test and development environments written in Rust"
url="https://github.com/mailtutan/mailtutan"
arch="all !s390x !riscv64 !ppc64le !loongarch64" # builds fail due to ring (dependency), see issues 986, 1612 and 1630 respectively at https://github.com/briansmith/ring
license="MIT"
makedepends="
	cargo
	cargo-auditable
"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/mailtutan/mailtutan/archive/refs/tags/v$pkgver.tar.gz
	bump-wasm-bindgen.patch
	yewdux-anymap3.patch
"
options="!check" # no tests

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

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

package() {
	install -Dm 755 target/release/mailtutan "$pkgdir"/usr/bin/mailtutan
}

sha512sums="
5193a5a946a50e865de0b60930c4ba2d227e3c418d4f6d90a9eba7a184c7c09441be459e09160bf76ee943703d41a8db7986901b2a098f56a9db030c4fc342c1  mailtutan-0.3.0.tar.gz
9b0c466670bdc9461ca17921f195861027ce7500aa2ddc81c20e6dee468a45b41c0269b957236f1a20a048d70dc16564b5c9cff8e6759a650c90273ff6b415e5  bump-wasm-bindgen.patch
d249888fe3c08de56614030941d8d325bff8829cc8ca14f0dfc95de12d43bf6eb483cd1cce7c840e0515d6476cc266093a0c3e41edfa6eea213f8d4fa4a09c27  yewdux-anymap3.patch
"
