summaryrefslogtreecommitdiff
path: root/community/sshguard/PKGBUILD
blob: 7ae15b1b510022d94fd03c852ce6dad925ac098a (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
# $Id: PKGBUILD 75998 2012-09-08 15:38:53Z ebelanger $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=sshguard
pkgver=1.5
pkgrel=5
pkgdesc="brute force detector for SSH, Exim, VSFTPD and more. Blocks by ip with iptables"
arch=('i686' 'x86_64')
#url="http://sourceforge.net/projects/sshguard/"
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.rc
	sshguard.conf.d
	sshguard.service
	sshguard-journalctl)
sha256sums=('b537f8765455fdf8424f87d4bd695e5b675b88e5d164865452137947093e7e19'
            'a810da878e40be8616a93c9984e7dbd3700367d665b78b8aa2498228bb33cb6e'
            '66f28e2cc81e5686f8fd5c0d5a5015d7feecbe018a259f4032cfbacf6fe8d1c3'
            '299b5f73e4c53aac6007c87210fc862987042b9d4c088180721bae6ab2214b09'
            '385d1dea0c6f5495a7c7e5051f1354f1eab85ee5ef599f6698ab353263b8c9bb')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  ./configure --prefix=/usr --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 prefix="$pkgdir/usr" install
  install -Dm0644 "$srcdir/sshguard.service" "$pkgdir/usr/lib/systemd/system/sshguard.service"
  install -Dm0755 "$srcdir/sshguard.rc" "$pkgdir/etc/rc.d/sshguard"
  install -Dm0644 "$srcdir/sshguard.conf.d" "$pkgdir/etc/conf.d/sshguard"
  install -Dm0755 "$srcdir/sshguard-journalctl" "$pkgdir/usr/lib/systemd/scripts/sshguard-journalctl"
}