# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer:
pkgname=mblaze
pkgver=0.2
pkgrel=2
pkgdesc="Unix utilities to deal with Maildir"
url="https://github.com/chneukirchen/mblaze"
arch="all"
license="Public-Domain"
depends=""
depends_dev=""
makedepends=""
install=""
subpackages="$pkgname-doc"
options="!check"
source="https://github.com/chneukirchen/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz
	0001-mgenmid-printb36-fix-off-by-one.patch
	0002-mquote-make-sed-expression-to-strip-signature-work-w.patch"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	make CFLAGS="$CFLAGS" -C "$builddir"
}

package() {
	cd "$builddir"
	make PREFIX="/usr" DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/examples/
	install -m644 *.example "$pkgdir"/usr/share/doc/$pkgname/examples/
	install -m644 NEWS.md VIOLATIONS.md README \
		"$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="7bbe8285cd1453e5b79e0b4af7ef38e0a4d24aa3317530480be2a89554cae0afa47f18e159ee976930dcea95fd92e07ab534a57c98f8cef42c37f5dce709fa12  mblaze-0.2.tar.gz
60625a0be19b401a9329246f827903fe32a8cffa82e3b1b9ce68dc1faf54aa0620fa9f0355396a6053b48fe22bd8b8bcd178795cfc813f4231b08db5aa9e0baf  0001-mgenmid-printb36-fix-off-by-one.patch
2dba93430e2c855c12e19faace111404d07dda495012296896068d07347bd9bff018c102e2d4fbdf5fd9fc49b2748c8fdbdb722aab5ef36b050f89c4475d962c  0002-mquote-make-sed-expression-to-strip-signature-work-w.patch"
