# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=gomaildrop
pkgver=0.1.2
pkgrel=9
pkgdesc="deliver e-mail to local maildirs based on filters"
url="https://gitlab.alpinelinux.org/kdaudt/gomaildrop"
arch="all"
license="MIT"
makedepends="go redo gettext"
source="https://gitlab.alpinelinux.org/kdaudt/gomaildrop/-/archive/v$pkgver/gomaildrop-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

export GOFLAGS="$GOFLAGS -modcacherw -mod=readonly"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	./configure --prefix /usr
	redo build
}

check() {
	redo check
}

package() {
	DESTDIR="$pkgdir" redo install
}

sha512sums="
bdd9c3464fb6e5fa29e2079b894fd8e33455d3034716b8293a474d05f396b885bfafc3bc6fb0e60492168c3c77e0719a67e2c8e6ac2143fc493dd69ec0a60c26  gomaildrop-v0.1.2.tar.gz
"
