aboutsummaryrefslogtreecommitdiffstats
path: root/main/sshguard/APKBUILD
blob: d6066ab3cd6b7554ad9c95edfd9e1ab0a15a8c34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sshguard
pkgver=1.6.2
pkgrel=0
pkgdesc="Log monitor that blocks with iptables on bad behaviour"
url="http://www.sshguard.net/"
arch="all"
license="BSD"
depends="iptables"
depends_dev=""
makedepends="$depends_dev flex bison autoconf automake libtool"
install=""
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/project/sshguard/sshguard/$pkgver/sshguard-$pkgver.tar.xz
	sshguard.initd
	sshguard.confd
	"

_builddir="$srcdir"/sshguard-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-firewall=iptables \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -Dm755 "$srcdir"/sshguard.initd \
		"$pkgdir"/etc/init.d/sshguard || return 1
	install -Dm755 "$srcdir"/sshguard.confd \
		"$pkgdir"/etc/conf.d/sshguard || return 1
}

md5sums="88f435bd81e6b6fb238a802f9b30d4dc  sshguard-1.6.2.tar.xz
a6d13584b6919a7ebb431e48efa30ab2  sshguard.initd
02dc914d310ea759a66ebb136f495e4e  sshguard.confd"
sha256sums="57f56724f475e81bbe5fc75dfcb573213bf7e446d7dd039dcf5ba8fa5bc2cb2b  sshguard-1.6.2.tar.xz
dfdd53abae3c94a9390a21cfe14ed12ddaff5c74d275336705de74d05d2beeca  sshguard.initd
c48cfe8ad166133d99ddc44ba4dd9abbb64718eda6c6bbced931d8a97bf9cddc  sshguard.confd"
sha512sums="2819ef9270474c8b3f1d4c997818cf654aaf06089f3112a24a840df7708822a3d66189f5c7a4e4dba06d7c25bf011c43377f3f9aa97de4f9e664fe97464a5c57  sshguard-1.6.2.tar.xz
3827bc437cf9e8281e12ce9a7e74e1186fd509aa971934d0f190215889a1eff83455e87f87812abfa3209b3d4fcf8b184e6aa778d753b9da5e778ac79d39c729  sshguard.initd
fc59e273e481dc7256a33114fc3b113f8b85406401a7d7113d0daba012dfd413c7bf85a0106539b859d90442976fe265355ccdf943a455f37c8ad7e5891e4b26  sshguard.confd"