%global with_zenmap 0 Summary: Network exploration tool and security scanner Name: nmap Version: 6.00 Release: 2 Epoch: 1 Copyright: GPL Group: Applications/System Source0: http://nmap.org/dist/%{name}-%{version}.tar.bz2 # patch taken from http://code.google.com/p/libdnet/issues/detail?id=23 Patch0: dnet-stripped.diff # necessary additional patches to successfully compile on AIX 5.1 Patch1:%{name}-%{version}-aix.patch URL: http://www.nmap.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: patch, make BuildRequires: gcc >= 4.5.4-1, gcc-c++ >= 4.5.4-1 BuildRequires: libpcap-devel >= 1.7.4-1 BuildRequires: libstdc++-devel >= 4.5.4-1 BuildRequires: lua-devel >= 5.3.2-1 BuildRequires: openssl-devel >= 1.0.1s-1 BuildRequires: pcre-devel >= 8.38-1 BuildRequires: python-devel >= 2.6.2-2 Requires: libgcc >= 4.5.4-1 Requires: libpcap >= 1.7.4-1 Requires: libstdc++ >= 4.5.4-1 Requires: lua >= 5.3.2-1 Requires: openssl >= 1.0.1s-1 Requires: pcre >= 8.38-1 Requires: python >= 2.6.2-2 %description Nmap is a utility for network exploration or security auditing. It supports ping scanning (determine which hosts are up), many port scanning techniques (determine what services the hosts are offering), and TCP/IP fingerprinting (remote host operating system identification). Nmap also offers flexible target and port specification, decoy scanning, determination of TCP sequence predictability characteristics, reverse-identd scanning, and more. In addition to the classic command-line nmap executable, the Nmap suite includes a flexible data transfer, redirection, and debugging tool (netcat utility ncat), a utility for comparing scan results (ndiff), and a packet generation and response analysis tool (nping). %if %with_zenmap %package frontend Summary: The GTK+ front end for nmap Group: Applications/System BuildRequires: gtk2-devel >= 2.18.5 BuildRequires: pygtk2-devel >= 2.6.2 Requires: %{name} = %{version} Requires: gtk2 >= 2.18.5 Requires: pygtk2 %description frontend This package includes zenmap, a GTK+ front end for nmap. The nmap package must be installed before installing nmap front end. %endif %prep %setup -q export PATH=/opt/freeware/bin:$PATH %patch0 -p0 %patch1 %build export CC="gcc -D_LARGE_FILES=1" export CXX="g++ -D_LARGE_FILES=1" export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" export CXXFLAGS="$CFLAGS" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --with-ndiff \ %if %with_zenmap --with-zenmap \ %else --without-zenmap \ %endif --with-nping \ --with-openssl=%{_prefix} \ --with-libpcap=%{_prefix} \ --with-libpcre=%{_prefix} \ --with-libdnet=included \ --with-liblua=%{_prefix} \ --with-ncat gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake install DESTDIR=${RPM_BUILD_ROOT} /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : %if %with_zenmap mkdir -p ${RPM_BUILD_ROOT}/etc/X11/applnk/Applications mv ${RPM_BUILD_ROOT}%{_datadir}/applications/zenmap*.desktop ${RPM_BUILD_ROOT}/etc/X11/applnk/Applications/ chmod 0644 ${RPM_BUILD_ROOT}/etc/X11/applnk/Applications/* %endif mv ${RPM_BUILD_ROOT}%{_datadir}/man/man1/* ${RPM_BUILD_ROOT}%{_mandir}/man1/ cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -s ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc COPYING %doc docs/README %doc docs/nmap.usage.txt %{_bindir}/ncat %{_bindir}/ndiff %{_bindir}/%{name} %{_bindir}/nping %{_mandir}/man1/n* %{_mandir}/*/man1/n* %{_datadir}/ncat %{_datadir}/%{name} /usr/bin/ncat /usr/bin/ndiff /usr/bin/%{name} /usr/bin/nping %if %with_zenmap %files frontend %defattr(-,root,system) %{_bindir}/nmapfe %{_bindir}/uninstall_zenmap %{_bindir}/xnmap %{_bindir}/zenmap %{_mandir}/man1/zenmap* %{_datadir}/zenmap %attr(0644,root,system) /etc/X11/applnk/Applications/zenmap*.desktop /usr/bin/xnmap /usr/bin/zenmap %endif %changelog * Fri Mar 04 2016 Michael Perzl - 6.00-2 - recompiled against latest versions * Tue May 29 2012 Michael Perzl - 6.00-1 - updated to version 6.00 * Thu Dec 15 2011 Michael Perzl - 5.51-1 - updated to version 5.51 * Fri May 28 2010 Michael Perzl - 3.81-1 - first version for AIX V5.1 and higher