blob: fffa2083b3a431d5cf987fd0ff932c520d4bc8ad (
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=nmap
pkgver=7.60
pkgrel=1
pkgdesc="A network exploration tool and security/port scanner"
url="http://nmap.org"
arch="all"
license="custom"
depends=""
makedepends="libpcap-dev libressl-dev lua-dev linux-headers"
options="!check" #FIXME: fails on armhf and aarch64
subpackages="
$pkgname-doc
$pkgname-scripts::noarch
$pkgname-nselibs::noarch
$pkgname-nping
$pkgname-ncat"
source="http://nmap.org/dist/$pkgname-$pkgver.tar.bz2
fortify-source.patch"
builddir="$srcdir"/$pkgname-$pkgver
prepare() {
default_prepare
update_config_sub
}
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--without-zenmap \
--with-liblua=/usr/include \
--with-openssl=/usr/lib
# fix LUA libs linking order
make "LUA_LIBS=../liblua/liblua.a -ldl -lm"
}
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
scripts() {
depends="$pkgname-nselibs"
pkgdesc="$pkgdesc (scripts)"
mkdir -p "$subpkgdir"/usr/share/nmap/
mv "$pkgdir"/usr/share/nmap/scripts \
"$subpkgdir"/usr/share/nmap/
}
nselibs() {
pkgdesc="$pkgdesc (nselibs)"
mkdir -p "$subpkgdir"/usr/share/nmap/
mv "$pkgdir"/usr/share/nmap/nse_main.lua \
"$pkgdir"/usr/share/nmap/nselib \
"$subpkgdir"/usr/share/nmap/
}
ncat() {
pkgdesc="$pkgdesc (ncat tool)"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/ncat "$subpkgdir"/usr/bin
}
nping() {
pkgdesc="$pkgdesc (nping tool)"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/nping "$subpkgdir"/usr/bin
}
sha512sums="74ba8f6de026ade9ee6bb2252bee18a57210f8207977df7f1c04556629dcdc1e6127f33febc8a52ef88a1dac876116d590564dee4f1c23798c3ac37529991aa4 nmap-7.60.tar.bz2
2d1f6e290723ac643f456a0e1ac95c4c966106cf2ab743839d25c835bf0141dc2d6bfee19285c3518d4c5f553b0505dabe5a496b769ba47b7adb03e791f05b8d fortify-source.patch"
|