michael@0: # To build a static RPM, add michael@0: # --define "static 1" michael@0: # to the rpmbuild command line. To build without Ncat, add michael@0: # --define "buildncat 0" michael@0: # michael@0: # To specify openssl dir, add something like: michael@0: # --define "openssl /usr/local/ssl" michael@0: michael@0: %define name nmap michael@0: %define version 5.21 michael@0: %define release 1 michael@0: %define _prefix /usr michael@0: michael@0: Summary: Network exploration tool and security scanner michael@0: Name: %{name} michael@0: Version: %{version} michael@0: Release: %{release} michael@0: Epoch: 2 michael@0: License: http://nmap.org/man/man-legal.html michael@0: Group: Applications/System michael@0: Source0: http://nmap.org/dist/%{name}-%{version}.tgz michael@0: URL: http://nmap.org michael@0: michael@0: # For Ndiff. michael@0: Requires: python >= 2.4 michael@0: michael@0: # RPM can't be relocatable until I stop storing path info in the binary. michael@0: # Prefix: %{_prefix} michael@0: BuildRoot: %{_tmppath}/%{name}-root michael@0: michael@0: %description michael@0: michael@0: Nmap ("Network Mapper") is a free and open source utility michael@0: for network exploration or security auditing. Many systems and network michael@0: administrators also find it useful for tasks such as network michael@0: inventory, managing service upgrade schedules, and monitoring host or michael@0: service uptime. Nmap uses raw IP packets in novel ways to determine michael@0: what hosts are available on the network, what services (application michael@0: name and version) those hosts are offering, what operating systems michael@0: (and OS versions) they are running, what type of packet michael@0: filters/firewalls are in use, and dozens of other characteristics. It michael@0: was designed to rapidly scan large networks, but works fine against michael@0: single hosts. Nmap runs on all major computer operating systems, and michael@0: both console and graphical versions are available. michael@0: michael@0: %prep michael@0: %setup -q michael@0: michael@0: %build michael@0: %configure --with-openssl=%{openssl} --without-zenmap --with-ndiff --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included michael@0: %if "%{buildncat}" == "0" michael@0: %configure --without-ncat michael@0: %endif michael@0: %if "%{static}" == "1" michael@0: make static michael@0: %else michael@0: make michael@0: %endif michael@0: michael@0: %install michael@0: [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT michael@0: make install DESTDIR=$RPM_BUILD_ROOT michael@0: strip $RPM_BUILD_ROOT%{_bindir}/* || : michael@0: gzip $RPM_BUILD_ROOT%{_mandir}/man1/* || : michael@0: michael@0: %clean michael@0: [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT michael@0: michael@0: %files michael@0: %defattr(-,root,root) michael@0: %doc COPYING michael@0: %doc docs/README michael@0: %doc docs/nmap.usage.txt michael@0: %doc %{_prefix}/share/man/man1/nmap.1.gz michael@0: %doc %{_prefix}/share/man/*/man1/nmap.1.gz michael@0: %{_bindir}/nmap michael@0: %{_datadir}/nmap michael@0: michael@0: %{_bindir}/ndiff michael@0: %doc %{_prefix}/share/man/man1/ndiff.1.gz michael@0: michael@0: # Ncat subpackage michael@0: %if "%{buildncat}" != "0" michael@0: %package -n ncat michael@0: Summary: Nmap's Netcat replacement michael@0: Group: Applications/System michael@0: michael@0: %description -n ncat michael@0: Ncat is a feature packed networking utility which will read and michael@0: write data across a network from the command line. It uses both michael@0: TCP and UDP for communication and is designed to be a reliable michael@0: back-end tool to instantly provide network connectivity to other michael@0: applications and users. Ncat will not only work with IPv4 and IPv6 michael@0: but provides the user with a virtually limitless number of potential michael@0: uses. michael@0: michael@0: %files -n ncat michael@0: %defattr(-,root,root) michael@0: %doc %{_prefix}/share/man/man1/ncat.1.gz michael@0: %{_bindir}/ncat michael@0: %{_datadir}/ncat michael@0: michael@0: %endif michael@0: michael@0: %changelog michael@0: michael@0: * Sat Jun 06 2009 Fyodor (fyodor(a)insecure.org) michael@0: - Removed changelog entries as SVN is a more authoritative source. Execute: michael@0: - svn log --username guest --password "" svn://svn.insecure.org/nmap/nmap.spec.in michael@0: