"Fossies" - the Fresh Open Source Software Archive

Member "nmap-7.91/nmap-7.91-1.spec" (10 Oct 2020, 5059 Bytes) of package /linux/misc/nmap-7.91.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) RPM Spec source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # To build a static RPM, add
    2 #     --define "static 1"
    3 # to the rpmbuild command line. To build without Ncat, add
    4 #     --define "buildncat 0"
    5 # To build without Nping, add
    6 #     --define "buildnping 0"
    7 #
    8 # To specify openssl dir, add something like:
    9 #     --define "openssl /usr/local/ssl"
   10 
   11 %define name nmap
   12 %define version 7.91
   13 %define release 1
   14 %define _prefix /usr
   15 
   16 # Find where Python modules are installed. See
   17 # http://fedoraproject.org/wiki/Packaging/Python.
   18 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
   19 
   20 Summary: Network exploration tool and security scanner
   21 Name: %{name}
   22 Version: %{version}
   23 Release: %{release}
   24 Epoch: 2
   25 License: https://nmap.org/man/man-legal.html
   26 Group: Applications/System
   27 Source0: https://nmap.org/dist/%{name}-%{version}.tgz
   28 URL: https://nmap.org
   29 
   30 # Disable automatic dependency calculation because we want to provide
   31 # packages for more than one version of Python. Without this, RPM will
   32 # grep through the installed files and automatically add things like
   33 #   Requires: python(abi) = 2.4
   34 # setup.py takes care of adjusting sys.path to point to wherever the
   35 # modules were installed so it's not dependent on any particular ABI.
   36 AutoReqProv: no
   37 # For Ndiff.
   38 Requires: python >= 2.4
   39 
   40 # RPM can't be relocatable until I stop storing path info in the binary.
   41 # Prefix: %{_prefix}
   42 BuildRoot: %{_tmppath}/%{name}-root
   43 
   44 %description
   45 
   46 Nmap ("Network Mapper") is a free and open source utility
   47 for network exploration or security auditing. Many systems and network
   48 administrators also find it useful for tasks such as network
   49 inventory, managing service upgrade schedules, and monitoring host or
   50 service uptime. Nmap uses raw IP packets in novel ways to determine
   51 what hosts are available on the network, what services (application
   52 name and version) those hosts are offering, what operating systems
   53 (and OS versions) they are running, what type of packet
   54 filters/firewalls are in use, and dozens of other characteristics. It
   55 was designed to rapidly scan large networks, but works fine against
   56 single hosts. Nmap runs on all major computer operating systems, and
   57 both console and graphical versions are available.
   58 
   59 %prep
   60 %setup -q
   61 
   62 %build
   63 
   64 %configure --with-openssl=%{openssl} --without-zenmap --with-ndiff --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included --with-libz=included
   65 %if "%{buildncat}" == "0"
   66 %configure --without-ncat
   67 %endif
   68 %if "%{buildnping}" == "0"
   69 %configure --without-nping
   70 %endif
   71 %if "%{static}" == "1"
   72 make static
   73 %else
   74 make
   75 %endif
   76 
   77 %install
   78 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
   79 make install DESTDIR=$RPM_BUILD_ROOT
   80 # Don't package the Ndiff uninstaller with the RPM.
   81 rm -f $RPM_BUILD_ROOT%{_bindir}/uninstall_ndiff
   82 strip $RPM_BUILD_ROOT%{_bindir}/* || :
   83 gzip $RPM_BUILD_ROOT%{_mandir}/man1/* || :
   84 
   85 %clean
   86 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
   87 
   88 %files
   89 %defattr(-,root,root)
   90 %doc LICENSE
   91 %doc docs/README
   92 %doc docs/nmap.usage.txt
   93 %doc %{_prefix}/share/man/man1/nmap.1.gz
   94 %doc %{_prefix}/share/man/*/man1/nmap.1.gz
   95 %{_bindir}/nmap
   96 %{_datadir}/nmap
   97 
   98 %{_bindir}/ndiff
   99 # Ndiff is now a module and has e.g. /usr/lib/python2.4/site-packages/ndiff.py, /usr/lib/python2.4/site-packages/ndiff.pyc
  100 %{python_sitelib}/ndiff*
  101 %doc %{_prefix}/share/man/man1/ndiff.1.gz
  102 
  103 # Ncat subpackage
  104 %if "%{buildncat}" != "0"
  105 %package -n ncat
  106 Summary: Nmap's Netcat replacement
  107 Group: Applications/System
  108 
  109 %description -n ncat
  110 Ncat is a feature packed networking utility which will read and
  111 write data across a network from the command line.  It uses both
  112 TCP and UDP for communication and is designed to be a reliable
  113 back-end tool to instantly provide network connectivity to other
  114 applications and users. Ncat will not only work with IPv4 and IPv6
  115 but provides the user with a virtually limitless number of potential
  116 uses.
  117 
  118 %files -n ncat
  119 %defattr(-,root,root)
  120 %doc %{_prefix}/share/man/man1/ncat.1.gz
  121 %{_bindir}/ncat
  122 %{_datadir}/ncat
  123 
  124 %endif
  125 
  126 # Nping subpackage
  127 %if "%{buildnping}" != "0"
  128 %package -n nping
  129 # If this 0. prefix is removed it must also be removed from Makefile.in.
  130 Version: 0.%{version}
  131 Summary: Nping packet generator
  132 Group: Applications/System
  133 
  134 %description -n nping
  135 Nping is an open source tool for network packet generation, response
  136 analysis and response time measurement. Nping allows to generate network
  137 packets of a wide range of protocols, letting users to tune virtually
  138 any field of the protocol headers. While Nping can be used as a simple
  139 ping utility to detect active hosts, it can also be used as a raw packet
  140 generator for network stack stress tests, ARP poisoning, Denial of
  141 Service attacks, route tracing, etc.
  142 
  143 %files -n nping
  144 %defattr(-,root,root)
  145 %doc %{_prefix}/share/man/man1/nping.1.gz
  146 %{_bindir}/nping
  147 
  148 %endif
  149 
  150 %changelog
  151 
  152 * Sat Jun 06 2009 Fyodor (fyodor(a)insecure.org)
  153 - Removed changelog entries as SVN is a more authoritative source. Execute:
  154 - svn log --username guest --password "" https://svn.nmap.org/nmap/nmap.spec.in
  155