aboutsummaryrefslogtreecommitdiffstats
path: root/main/sshguard/APKBUILD
blob: 30cc2aed63bc361d422538c62eef7ab48f1c6a70 (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.1
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="522c5e7d507105b050584b7646418844  sshguard-1.6.1.tar.xz
a6d13584b6919a7ebb431e48efa30ab2  sshguard.initd
02dc914d310ea759a66ebb136f495e4e  sshguard.confd"
sha256sums="f431899c20fa2f41fa293605af96ff97d44823b84db41c914ee60da44f1ff6c8  sshguard-1.6.1.tar.xz
dfdd53abae3c94a9390a21cfe14ed12ddaff5c74d275336705de74d05d2beeca  sshguard.initd
c48cfe8ad166133d99ddc44ba4dd9abbb64718eda6c6bbced931d8a97bf9cddc  sshguard.confd"
sha512sums="a21c28e2efcadeff514c8a5b1ed938ba466f9116b40ee4283ad411fe6248bfa7186d9add9a136399f659a74fb2b517c6033027ec546dae9bec5b47edf32db3ed  sshguard-1.6.1.tar.xz
3827bc437cf9e8281e12ce9a7e74e1186fd509aa971934d0f190215889a1eff83455e87f87812abfa3209b3d4fcf8b184e6aa778d753b9da5e778ac79d39c729  sshguard.initd
fc59e273e481dc7256a33114fc3b113f8b85406401a7d7113d0daba012dfd413c7bf85a0106539b859d90442976fe265355ccdf943a455f37c8ad7e5891e4b26  sshguard.confd"