# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=scanssh
pkgver=2.1.2
pkgrel=0
pkgdesc="Fast SSH server and open proxy scanner"
url="https://github.com/ofalk/scanssh"
arch="all"
license="BSD"
makedepends="libpcap-dev libevent-dev libdnet-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ofalk/scanssh/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare || return 1

	cd "$builddir"
	update_config_guess && update_config_sub
}

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

sha512sums="af4e705c43156b907d6864b12f5832bb4e43d0ff284e34e96b32bbe7986299954d1175880ffe7588f91a939d140b45592fc72dc2bf397f140aed929dbe44a453  scanssh-2.1.2.tar.gz"
