aboutsummaryrefslogtreecommitdiffstats
path: root/main/zmap/APKBUILD
blob: 61ebe83b924032d7ae18d9c90307f80b9a07f498 (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=zmap
pkgver=1.2.0
pkgrel=0
pkgdesc="high performance internet scanner"
url="http://www.zmap.io/"
arch="all"
license="Apache-2"
depends=""
depends_dev="gengetopt-dev libpcap-dev"
makedepends="$depends_dev cmake flex byacc"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="zmap-$pkgver.tar.gz::https://github.com/zmap/zmap/archive/v$pkgver.tar.gz
	byacc.patch"

_srcdir="$srcdir"/zmap-$pkgver
_builddir="$srcdir"/_build
prepare() {
	local i
	mkdir "$_builddir"
	cd "$_srcdir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	cmake -DCMAKE_INSTALL_PREFIX=/usr "$_srcdir" || return 1
	make || return 1
}

package() {
	cd "$_builddir"/src
	install -D zmap "$pkgdir"/usr/bin/zmap

	cd "$_srcdir"
	install -Dm644 src/zmap.1 "$pkgdir"/usr/share/man/man1/zmap.1
	install -d "$pkgdir"/etc/zmap
	install -m644 conf/* "$pkgdir"/etc/zmap

	for file in AUTHORS CHANGELOG INSTALL README; do
		install -Dm644 "$file" "$pkgdir"/usr/share/doc/zmap/"$file"
	done

	cp -a examples "$pkgdir"/usr/share/doc/zmap
}

md5sums="d21d0fc65b585e0711adc4df6fcdf724  zmap-1.2.0.tar.gz
32db538a125a3b38c14960c87cfdcf60  byacc.patch"
sha256sums="7658aef8338c592bebef82336f58598b2fa305d56779f6c81bffeef8c90472b0  zmap-1.2.0.tar.gz
c143c2569293a934daadbb60d65896a10ececec2b54f78761c456e01350c671a  byacc.patch"
sha512sums="68fa49647444f18adfc86b4ee85ed3e93945611ca75687eedc259504e0d66edcded267b4fba9a975299984551c88193feacb850f46432d3f3f22f1430ed7c9bd  zmap-1.2.0.tar.gz
b83e8c6f94c3782da82d4eec2a5f25092067684254cd9f93ac1b7dbc8b2128dbeb63a67fc4329722d48c3628f2d5b3efd4c75335c440754c76776504aeb05700  byacc.patch"