nmap/nmap.spec

Fri, 11 Mar 2011 21:30:26 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 11 Mar 2011 21:30:26 +0100
changeset 0
4f133201e207
child 1
4667f24fe848
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

     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 #
     6 # To specify openssl dir, add something like:
     7 #     --define "openssl /usr/local/ssl"
     9 %define name nmap
    10 %define version 5.21
    11 %define release 1
    12 %define _prefix /usr
    14 Summary: Network exploration tool and security scanner
    15 Name: %{name}
    16 Version: %{version}
    17 Release: %{release}
    18 Epoch: 2
    19 License: http://nmap.org/man/man-legal.html
    20 Group: Applications/System
    21 Source0: http://nmap.org/dist/%{name}-%{version}.tgz
    22 URL: http://nmap.org
    24 # For Ndiff.
    25 Requires: python >= 2.4
    27 # RPM can't be relocatable until I stop storing path info in the binary.
    28 # Prefix: %{_prefix}
    29 BuildRoot: %{_tmppath}/%{name}-root
    31 %description
    33 Nmap ("Network Mapper") is a free and open source utility
    34 for network exploration or security auditing. Many systems and network
    35 administrators also find it useful for tasks such as network
    36 inventory, managing service upgrade schedules, and monitoring host or
    37 service uptime. Nmap uses raw IP packets in novel ways to determine
    38 what hosts are available on the network, what services (application
    39 name and version) those hosts are offering, what operating systems
    40 (and OS versions) they are running, what type of packet
    41 filters/firewalls are in use, and dozens of other characteristics. It
    42 was designed to rapidly scan large networks, but works fine against
    43 single hosts. Nmap runs on all major computer operating systems, and
    44 both console and graphical versions are available.
    46 %prep
    47 %setup -q
    49 %build
    50 %configure --with-openssl=%{openssl} --without-zenmap --with-ndiff --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included
    51 %if "%{buildncat}" == "0"
    52 %configure --without-ncat
    53 %endif
    54 %if "%{static}" == "1"
    55 make static
    56 %else
    57 make
    58 %endif
    60 %install
    61 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
    62 make install DESTDIR=$RPM_BUILD_ROOT
    63 strip $RPM_BUILD_ROOT%{_bindir}/* || :
    64 gzip $RPM_BUILD_ROOT%{_mandir}/man1/* || :
    66 %clean
    67 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
    69 %files 
    70 %defattr(-,root,root)
    71 %doc COPYING
    72 %doc docs/README
    73 %doc docs/nmap.usage.txt
    74 %doc %{_prefix}/share/man/man1/nmap.1.gz
    75 %doc %{_prefix}/share/man/*/man1/nmap.1.gz
    76 %{_bindir}/nmap
    77 %{_datadir}/nmap
    79 %{_bindir}/ndiff
    80 %doc %{_prefix}/share/man/man1/ndiff.1.gz
    82 # Ncat subpackage
    83 %if "%{buildncat}" != "0"
    84 %package -n ncat
    85 Summary: Nmap's Netcat replacement
    86 Group: Applications/System
    88 %description -n ncat
    89 Ncat is a feature packed networking utility which will read and
    90 write data across a network from the command line.  It uses both
    91 TCP and UDP for communication and is designed to be a reliable
    92 back-end tool to instantly provide network connectivity to other
    93 applications and users. Ncat will not only work with IPv4 and IPv6
    94 but provides the user with a virtually limitless number of potential
    95 uses.
    97 %files -n ncat
    98 %defattr(-,root,root)
    99 %doc %{_prefix}/share/man/man1/ncat.1.gz
   100 %{_bindir}/ncat
   101 %{_datadir}/ncat
   103 %endif
   105 %changelog
   107 * Sat Jun 06 2009 Fyodor (fyodor(a)insecure.org)
   108 - Removed changelog entries as SVN is a more authoritative source. Execute:
   109 - svn log --username guest --password "" svn://svn.insecure.org/nmap/nmap.spec.in

mercurial