summaryrefslogtreecommitdiff
path: root/community/sshguard/PKGBUILD
blob: 63c7ba59ba158be8b63813433dd8b0eb35a79afe (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
# $Id: PKGBUILD 99653 2013-10-30 18:22:33Z mtorromeo $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>

pkgname=sshguard
pkgver=1.5
pkgrel=16
pkgdesc="Brute force detector for SSH, Exim, VSFTPD and more. Blocks by ip with iptables"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.sshguard.net/"
license=('GPL')
depends=('iptables')
options=(zipman)
install=sshguard.install
source=("http://downloads.sourceforge.net/sourceforge/sshguard/sshguard-$pkgver.tar.bz2"
	sshguard.service
	sshguard-journalctl)

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  sed -i 's|^DAYNO.*|DAYNO       [0-9]?[1-9]|' src/parser/attack_scanner.l
}

build() {
  cd "$srcdir/$pkgname-$pkgver"
  ./configure --prefix=/usr --sbindir=/usr/bin --with-firewall=iptables
  make
}

check() {
  cd "$srcdir/$pkgname-$pkgver"
  strings src/sshguard | grep -E "^`which iptables`[[:space:]]" >/dev/null
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
  install -Dm0644 "$srcdir/sshguard.service" "$pkgdir/usr/lib/systemd/system/sshguard.service"
  install -Dm0755 "$srcdir/sshguard-journalctl" "$pkgdir/usr/lib/systemd/scripts/sshguard-journalctl"
}

sha256sums=('b537f8765455fdf8424f87d4bd695e5b675b88e5d164865452137947093e7e19'
            '24be7918dcba37805dea2fd1d9e4c1c139e3ea840773aea49574d4c6a7056507'
            'a8f315d163128d4e8458c1d50c90082581092476937921cba2afb167f51cbe3f')