# Maintainer: Leonardo Arena pkgname=nmap pkgver=7.01 pkgrel=1 pkgdesc="A network exploration tool and security/port scanner" url="http://nmap.org" arch="all" license="custom" depends="" makedepends="libpcap-dev openssl-dev lua-dev linux-headers" install="" subpackages=" $pkgname-doc $pkgname-scripts $pkgname-nselibs $pkgname-nping $pkgname-ncat" source="http://nmap.org/dist/$pkgname-$pkgver.tar.bz2" _builddir="$srcdir"/$pkgname-$pkgver 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 || return 1 install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE } scripts() { depends="$pkgname-nselibs" pkgdesc="$pkgdesc (scripts)" arch="noarch" mkdir -p "$subpkgdir"/usr/share/nmap/ mv "$pkgdir"/usr/share/nmap/scripts \ "$subpkgdir"/usr/share/nmap/ || return 1 } nselibs() { pkgdesc="$pkgdesc (nselibs)" arch="noarch" mkdir -p "$subpkgdir"/usr/share/nmap/ mv "$pkgdir"/usr/share/nmap/nse_main.lua \ "$pkgdir"/usr/share/nmap/nselib \ "$subpkgdir"/usr/share/nmap/ || return 1 } ncat() { pkgdesc="$pkgdesc (ncat tool)" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/ncat "$subpkgdir"/usr/bin || return 1 } nping() { pkgdesc="$pkgdesc (nping tool)" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/nping "$subpkgdir"/usr/bin || return 1 } md5sums="7fa4edc592184c7addc14f5acb3fe6f7 nmap-7.01.tar.bz2" sha256sums="cf1fcd2643ba2ef52f47acb3c18e52fa12a4ae4b722804da0e54560704627705 nmap-7.01.tar.bz2" sha512sums="8b37616c2af2134a5a3bb292f25f2bc0232e20e08405620734c07d84bbc9070a87db4d4b14e8a10c67a3684960035ed202be5dd6feddfb613c134208fc62a2a7 nmap-7.01.tar.bz2"