1 # To build a static RPM, add 2 # --define "static 1" 3 # to the rpmbuild command line. 4 5 %define name nmap 6 %define version 4.75 7 %define release 1 8 %define _prefix /usr 9 10 Summary: Network exploration tool and security scanner 11 Name: %{name} 12 Version: %{version} 13 Release: %{release} 14 Epoch: 2 15 License: http://nmap.org/man/man-legal.html 16 Group: Applications/System 17 Source0: http://nmap.org/dist/%{name}-%{version}.tgz 18 URL: http://nmap.org 19 20 # RPM can't be relocatable until I stop storing path info in the binary. 21 # Prefix: %{_prefix} 22 BuildRoot: %{_tmppath}/%{name}-root 23 24 %description 25 Nmap is a utility for network exploration or security auditing. It 26 supports ping scanning (determine which hosts are up), many port 27 scanning techniques, version detection (determine service protocols 28 and application versions listening behind ports), and TCP/IP 29 fingerprinting (remote host OS or device identification). Nmap also 30 offers flexible target and port specification, decoy/stealth scanning, 31 sunRPC scanning, and more. Most Unix and Windows platforms are 32 supported in both GUI and commandline modes. Several popular handheld 33 devices are also supported, including the Sharp Zaurus and the iPAQ. 34 35 %prep 36 %setup -q 37 38 %build 39 %configure --without-openssl --without-zenmap --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included 40 %if "%{static}" == "1" 41 make static 42 %else 43 make 44 %endif 45 46 %install 47 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 48 make install DESTDIR=$RPM_BUILD_ROOT 49 strip $RPM_BUILD_ROOT%{_bindir}/* || : 50 gzip $RPM_BUILD_ROOT%{_mandir}/man1/* || : 51 52 %clean 53 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 54 55 %files 56 %defattr(-,root,root) 57 %doc COPYING 58 %doc docs/README 59 %doc docs/nmap.usage.txt 60 %doc %{_prefix}/share/man/man1/nmap.1.gz 61 %{_bindir}/nmap 62 %{_datadir}/nmap 63 64 %changelog 65 66 * Thu Nov 08 2007 David Fifield (david(a)bamsoftware.com) 67 - Split the zenmap subpackage into its own spec file. 68 69 * Tue Nov 06 2007 David Fifield (david(a)bamsoftware.com) 70 - Fix the Zenmap build on 64-bit architectures (where %{_libdir} is 71 "/usr/lib64" but Python modules may not be installed there) and make 72 it work with different versions of Python. 73 74 * Sun Nov 04 2007 David Fifield (david(a)bamsoftware.com) 75 - Add a zenmap subpackage. 76 77 * Wed Oct 31 2007 David Fifield (david(a)bamsoftware.com) 78 - Remove references to buildfe (build the NmapFE frontend). 79 80 * Sat Sep 01 2004 Stephane Loeuillet (stephane.loeuillet(a)tiscali.fr) 81 - Place .desktop file under ${prefix}/share/applications rather than 82 ${prefix}/share/gnome/apps/Utilities 83 84 * Mon Dec 16 2002 Matthieu Verbert (mve(a)zurich.ibm.com) 85 - Place man pages under ${prefix}/share/man rather than ${prefix}/man 86 87 * Fri Jun 01 2001 GOMEZ Henri (hgomez(a)slib.fr) 88 - Patch which checks that $RPM_BUILD_ROOT is not "/" before rm'ing it. 89 90 * Tue Mar 06 2001 Ben Reed <ben(a)opennms.org> 91 - changed spec to handle not building the frontend 92 93 * Thu Dec 30 1999 Fyodor (fyodor(a)insecure.org) 94 - Updated description 95 - Eliminated source1 (nmapfe.desktop) directive and simply packaged it with Nmap 96 - Fixed nmap distribution URL (source0) 97 - Added this .rpm to base Nmap distribution 98 99 * Mon Dec 13 1999 Tim Powers <timp(a)redhat.com> 100 - based on origional spec file from 101 http://nmap.org/download.html 102 - general cleanups, removed lots of commenrts since it made the spec hard to 103 read 104 - changed group to Applications/System 105 - quiet setup 106 - no need to create dirs in the install section, "make 107 prefix=$RPM_BUILD_ROOT&{prefix} install" does this. 108 - using defined %{prefix}, %{version} etc. for easier/quicker maint. 109 - added docs 110 - gzip man pages 111 - strip after files have been installed into buildroot 112 - created separate package for the frontend so that Gtk+ isn't needed for the 113 CLI nmap 114 - not using -f in files section anymore, no need for it since there aren't that 115 many files/dirs 116 - added desktop entry for gnome 117 118 * Sun Jan 10 1999 Fyodor (fyodor(a)insecure.org) 119 - Merged in spec file sent in by Ian Macdonald <ianmacd(a)xs4all.nl> 120 121 * Tue Dec 29 1998 Fyodor (fyodor(a)insecure.org) 122 - Made some changes, and merged in another .spec file sent in 123 by Oren Tirosh <oren(a)hishome.net> 124 125 * Mon Dec 21 1998 Riku Meskanen (mesrik(a)cc.jyu.fi) 126 - initial build for RH 5.x 127