updated on Thu Jan 5 13:17:10 UTC 2012
[aur-mirror.git] / nmap-svn / PKGBUILD
blobf832f8b177d16d11d09c981befb467457b08876a
1 # Author: Ermenegildo Fiorito <fiorito.g@gmail.com>
2 # Maintainer: Rickey Visinski <rickeyvisinski at gmail.com>
4 pkgname=nmap-svn
5 pkgver=27488
6 pkgrel=1
7 pkgdesc="A network exploration tool and security/port scanner"
8 arch=('i686' 'x86_64')
9 url="http://nmap.org"
10 license=('custom:GPL')
11 depends=('pcre' 'openssl' 'libpcap>=1.0.0' 'lua')
12 # python is needed for zenmap
13 makedepends=('python2' 'subversion')
14 optdepends=('pygtk: gui for nmap')
15 options=('!makeflags')
16 source=()
17 md5sums=()
19 _svntrunk=https://svn.nmap.org/nmap/
20 _svnmod=nmap
22 build() {
23   cd "$srcdir"
24   if [ -d $_svnmod/.svn ]; then
25     (cd $_svnmod && svn up -r $pkgver)
26   else
27 svn co --username guest --password "" --no-auth-cache $_svntrunk --config-dir ./ -r $pkgver $_svnmod
28   fi
29   msg "SVN checkout done or server timeout"
30   msg "Starting make..."
32   rm -rf "$srcdir/$_svnmod-build"
33   cp -r $_svnmod $_svnmod-build
34   cd $_svnmod-build/
35   #sed -i 's#Mozilla/5.0 (compatible; Nmap Scripting Engine; http://nmap.org/book/nse.html)#Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15#' nselib/http.lua
36   echo "TryExec=/usr/bin/pygtk-demo" >> zenmap/install_scripts/unix/zenmap.desktop || return 1
37   echo "TryExec=/usr/bin/pygtk-demo" >> zenmap/install_scripts/unix/zenmap-root.desktop || return 1
38   sed -i 's# @LIBS@# @LIBS@ -lnl#' ncat/Makefile.in
40   ./configure --prefix=/usr --mandir=/usr/share/man PYTHON="python2" \
41     --libexecdir=/usr/lib --with-openssl=/usr
42   make 
43   make DESTDIR="${pkgdir}" install
45   # remove zenmap uninstall script
46   rm "${pkgdir}/usr/bin/uninstall_zenmap"
48   # install custom GPL2 license
49   install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE