# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=hashcash
pkgver=1.22
pkgrel=0
pkgdesc="Proof-of-work algorithm for denial-of-service counter measures"
url="http://www.hashcash.org/"
arch="all"
license="Public-Domain"
subpackages="$pkgname-doc"
source="http://www.hashcash.org/source/hashcash-$pkgver.tgz"

build() {
	CFLAGS="$CFLAGS -std=gnu89" make
}

check() {
	./test.sh
}

package() {
	make \
		INSTALL_PATH="$pkgdir/usr/bin" \
		MAN_INSTALL_PATH="$pkgdir/usr/share/man/man1" \
		DOC_INSTALL_PATH="$pkgdir/usr/share/doc/hashcash" \
		install
}

sha512sums="
b803c27df2acdce70c587d15d4158ca8841328fd89d90213a00be35f7c9f1905db728a785ee70fa43a4262dabe20c3f0a9fff381e3db0d44c3175ca22da5d5c2  hashcash-1.22.tgz
"
