aboutsummaryrefslogtreecommitdiffstats
path: root/main/nmap/APKBUILD
blob: a0a46384c86b7089dfc16c0bc8912aff1ffea47a (plain) (blame)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=nmap
pkgver=7.92
pkgrel=2
pkgdesc="network exploration tool and security/port scanner"
url="https://nmap.org"
arch="all"
license="custom"
makedepends="linux-headers openssl1.1-compat-dev libpcap-dev pcre-dev zlib-dev libssh2-dev lua5.3-dev"
options="!check" #FIXME: fails on armhf and aarch64
subpackages="
	$pkgname-doc
	$pkgname-scripts::noarch
	$pkgname-nselibs::noarch
	$pkgname-nping
	$pkgname-ncat"
source="https://nmap.org/dist/nmap-$pkgver.tar.bz2
	fortify-source.patch"

# secfixes:
#   7.80-r0:
#     - CVE-2017-18594
#     - CVE-2018-15173

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--without-zenmap \
		--with-openssl=yes \
		--with-libpcap=yes \
		--with-libpcre=yes \
		--with-libz=yes \
		--with-libssh2=yes \
		--with-liblua=/usr/lua5.3
	make
}

check() {
	make check
}

package() {
	make -j1 DESTDIR="$pkgdir" install
}

scripts() {
	depends="$pkgname-nselibs"
	pkgdesc="$pkgdesc (scripts)"
	amove usr/share/nmap/scripts
}

nselibs() {
	pkgdesc="$pkgdesc (nselibs)"
	amove usr/share/nmap/nse_main.lua
	amove usr/share/nmap/nselib
}

ncat() {
	pkgdesc="$pkgdesc (ncat tool)"
	amove usr/bin/ncat
}

nping() {
	pkgdesc="$pkgdesc (nping tool)"
	amove usr/bin/nping
}

sha512sums="
7828367f9dc76ff4d1e8c821260e565fb0c3cb6aba0473d24759133a3006cdf2cb087574f0dd7d2ba47a63754ba4f72e0b78cdae1333a58f05c41d428b56ad59  nmap-7.92.tar.bz2
2d1f6e290723ac643f456a0e1ac95c4c966106cf2ab743839d25c835bf0141dc2d6bfee19285c3518d4c5f553b0505dabe5a496b769ba47b7adb03e791f05b8d  fortify-source.patch
"