summaryrefslogtreecommitdiffstats
path: root/main/nmap/APKBUILD
blob: 9bea3e4147f7af321f5c6e682e291f2b7f081773 (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
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=nmap 
pkgver=6.40
pkgrel=0
pkgdesc="A network exploration tool and security/port scanner"
url="http:/nmap.org"
arch="all"
license="custom:GPL"
depends=
makedepends="libpcap-dev openssl-dev lua-dev"
install=
subpackages="$pkgname-doc"
replaces="nmap-nse"
source="http://nmap.org/dist/$pkgname-$pkgver.tgz"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
}

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 \
		|| return 1
	# fix LUA libs linking order
	make "LUA_LIBS=../liblua/liblua.a -ldl -lm" || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install

	# install custom GPL2 license
	install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
 
md5sums="df4a22c283574ff970b60e822661e286  nmap-6.40.tgz"
sha256sums="ceb8bfd138006719443689787d71b3323b126491f6abda1d0a0d7f3d4f037b4b  nmap-6.40.tgz"
sha512sums="9a43813187c1b635d6b64e154d8c2f1567faaeaaf3d7dd521adc8ac917dadce0987223de9c4320990aace4ef97c21d9b3d9c634cef898ec7ffc5b77f20496b79  nmap-6.40.tgz"