summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 733d1f06a7257b12fa2f0e75aaa9cb9fd5372294 (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
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Jens Adam <jra@byte.cx>
# Contributor: Arch3y <arch3y[at]archstrike[dot]org>

pkgname=zmap-git
pkgver=2.1.1.1031.369bff3
pkgrel=1
pkgdesc='Fast network scanner designed for Internet-wide network surveys'
url='https://zmap.io/'
arch=('i686' 'x86_64')
license=('Apache')
depends=('gmp' 'hiredis' 'json-c' 'libpcap' 'libmongoc')
makedepends=('git' 'byacc' 'cmake' 'gengetopt' 'pkg-config')
provides=('zmap')
conflicts=('zmap')
backup=('etc/zmap/blacklist.conf' 'etc/zmap/zmap.conf')
source=(${pkgname}::git+https://github.com/zmap/zmap.git)
sha512sums=('SKIP')

pkgver() {
  cd ${pkgname}
  printf "%s.%s.%s" \
    "$(git tag -l|cut -d- -f1|sort -V -r|head -n1|cut -dv -f2)" \
    "$(git rev-list --count HEAD)" \
    "$(git rev-parse --short HEAD)"
}

build() {
  cd ${pkgname}
  cmake -DWITH_JSON=ON -DWITH_REDIS=ON -DWITH_MONGO=ON
  make
}

package() {
  cd ${pkgname}
  install -Dm 755 src/{zmap,ztee,zblacklist} -t "${pkgdir}/usr/bin"
  install -Dm 644 src/*.1 -t "${pkgdir}/usr/share/man/man1"
  install -Dm 644 conf/* -t "${pkgdir}/etc/zmap"
  install -Dm 644 AUTHORS CHANGELOG.md INSTALL.md README.md \
    -t "${pkgdir}/usr/share/doc/zmap"
  cp -a examples "${pkgdir}/usr/share/doc/zmap"
}

# vim: ts=2 sw=2 et: