aboutsummaryrefslogtreecommitdiffstats
path: root/main/sshguard/APKBUILD
blob: a00b9e1f550eb9aaf6c5a67253bb7f5a05eb7b92 (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
60
61
62
63
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sshguard
pkgver=1.5
pkgrel=2
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"
install=""
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/project/sshguard/sshguard/sshguard-$pkgver/sshguard-$pkgver.tar.bz2
	sshguard.initd
	sshguard.confd
	parser.patch"

_builddir="$srcdir"/sshguard-$pkgver
prepare() {
	local i
	cd "$_builddir"
	update_config_sub || return 1
	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="11b9f47f9051e25bdfe84a365c961ec1  sshguard-1.5.tar.bz2
a6d13584b6919a7ebb431e48efa30ab2  sshguard.initd
02dc914d310ea759a66ebb136f495e4e  sshguard.confd
84ff8858abb8d5a673037cf592bb6794  parser.patch"
sha256sums="b537f8765455fdf8424f87d4bd695e5b675b88e5d164865452137947093e7e19  sshguard-1.5.tar.bz2
dfdd53abae3c94a9390a21cfe14ed12ddaff5c74d275336705de74d05d2beeca  sshguard.initd
c48cfe8ad166133d99ddc44ba4dd9abbb64718eda6c6bbced931d8a97bf9cddc  sshguard.confd
c008d91ad83ff14c552998ba9d92f043f4993bb194eee51ae03e6556394dc40d  parser.patch"
sha512sums="6d17abccd94af9e7fb04a54477ff5686caa64dc36e2f2cbc4a8cd7bc293923daf2fee87fa7f2e247eba1b310abe68549e652ab3224c2d19822d2e8a0306e49e6  sshguard-1.5.tar.bz2
3827bc437cf9e8281e12ce9a7e74e1186fd509aa971934d0f190215889a1eff83455e87f87812abfa3209b3d4fcf8b184e6aa778d753b9da5e778ac79d39c729  sshguard.initd
fc59e273e481dc7256a33114fc3b113f8b85406401a7d7113d0daba012dfd413c7bf85a0106539b859d90442976fe265355ccdf943a455f37c8ad7e5891e4b26  sshguard.confd
c1fa0d3393ec0022b4c64ef98d20266167e67f9526dce474a069b09008be2efd640d8e599c7f2270d9a0f3071f4aa9c2ab04f61eed62a5e7f5ffa127f31e9dcb  parser.patch"