mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-17 22:52:40 +01:00
- properly require openssl (status quo, just use a correct parameter) - explicitly require system libpcap (status quo) - explicitly require system libpcre [1] - explicitly require zlib (status quo) - explicitly require system libssh2 [2] - explicitly require system lua5.3 [3] - adjust makedepends accordingly [1] System pcre is newer and properly configured for mips*. [2] This is the ./configure default, just make sure the choice is stable. [3] This is the ./configure default, just let it find the system version. check() passes on x86_64 and mipseln8hf at least, however this commit does not re-enable it due to unclear aarch64 / arm* status.
89 lines
2.0 KiB
Plaintext
89 lines
2.0 KiB
Plaintext
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
|
|
pkgname=nmap
|
|
pkgver=7.70
|
|
pkgrel=3
|
|
pkgdesc="A network exploration tool and security/port scanner"
|
|
url="http://nmap.org"
|
|
arch="all"
|
|
license="custom"
|
|
depends=""
|
|
makedepends="linux-headers openssl-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/$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-openssl=yes \
|
|
--with-libpcap=yes \
|
|
--with-libpcre=yes \
|
|
--with-libz=yes \
|
|
--with-libssh2=yes \
|
|
--with-liblua=/usr/lua5.3
|
|
make
|
|
}
|
|
|
|
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="084c148b022ff6550e269d976d0077f7932a10e2ef218236fe13aa3a70b4eb6506df03329868fc68cb3ce78e4360b200f5a7a491d3145028fed679ef1c9ecae5 nmap-7.70.tar.bz2
|
|
2d1f6e290723ac643f456a0e1ac95c4c966106cf2ab743839d25c835bf0141dc2d6bfee19285c3518d4c5f553b0505dabe5a496b769ba47b7adb03e791f05b8d fortify-source.patch"
|