nmap/nmap.spec

changeset 0
4f133201e207
child 1
4667f24fe848
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nmap/nmap.spec	Fri Mar 11 21:30:26 2011 +0100
     1.3 @@ -0,0 +1,110 @@
     1.4 +# To build a static RPM, add
     1.5 +#     --define "static 1"
     1.6 +# to the rpmbuild command line. To build without Ncat, add
     1.7 +#     --define "buildncat 0"
     1.8 +#
     1.9 +# To specify openssl dir, add something like:
    1.10 +#     --define "openssl /usr/local/ssl"
    1.11 +
    1.12 +%define name nmap
    1.13 +%define version 5.21
    1.14 +%define release 1
    1.15 +%define _prefix /usr
    1.16 +
    1.17 +Summary: Network exploration tool and security scanner
    1.18 +Name: %{name}
    1.19 +Version: %{version}
    1.20 +Release: %{release}
    1.21 +Epoch: 2
    1.22 +License: http://nmap.org/man/man-legal.html
    1.23 +Group: Applications/System
    1.24 +Source0: http://nmap.org/dist/%{name}-%{version}.tgz
    1.25 +URL: http://nmap.org
    1.26 +
    1.27 +# For Ndiff.
    1.28 +Requires: python >= 2.4
    1.29 +
    1.30 +# RPM can't be relocatable until I stop storing path info in the binary.
    1.31 +# Prefix: %{_prefix}
    1.32 +BuildRoot: %{_tmppath}/%{name}-root
    1.33 +
    1.34 +%description
    1.35 +
    1.36 +Nmap ("Network Mapper") is a free and open source utility
    1.37 +for network exploration or security auditing. Many systems and network
    1.38 +administrators also find it useful for tasks such as network
    1.39 +inventory, managing service upgrade schedules, and monitoring host or
    1.40 +service uptime. Nmap uses raw IP packets in novel ways to determine
    1.41 +what hosts are available on the network, what services (application
    1.42 +name and version) those hosts are offering, what operating systems
    1.43 +(and OS versions) they are running, what type of packet
    1.44 +filters/firewalls are in use, and dozens of other characteristics. It
    1.45 +was designed to rapidly scan large networks, but works fine against
    1.46 +single hosts. Nmap runs on all major computer operating systems, and
    1.47 +both console and graphical versions are available.
    1.48 +
    1.49 +%prep
    1.50 +%setup -q
    1.51 +
    1.52 +%build
    1.53 +%configure --with-openssl=%{openssl} --without-zenmap --with-ndiff --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included
    1.54 +%if "%{buildncat}" == "0"
    1.55 +%configure --without-ncat
    1.56 +%endif
    1.57 +%if "%{static}" == "1"
    1.58 +make static
    1.59 +%else
    1.60 +make
    1.61 +%endif
    1.62 +
    1.63 +%install
    1.64 +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
    1.65 +make install DESTDIR=$RPM_BUILD_ROOT
    1.66 +strip $RPM_BUILD_ROOT%{_bindir}/* || :
    1.67 +gzip $RPM_BUILD_ROOT%{_mandir}/man1/* || :
    1.68 +
    1.69 +%clean
    1.70 +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
    1.71 +
    1.72 +%files 
    1.73 +%defattr(-,root,root)
    1.74 +%doc COPYING
    1.75 +%doc docs/README
    1.76 +%doc docs/nmap.usage.txt
    1.77 +%doc %{_prefix}/share/man/man1/nmap.1.gz
    1.78 +%doc %{_prefix}/share/man/*/man1/nmap.1.gz
    1.79 +%{_bindir}/nmap
    1.80 +%{_datadir}/nmap
    1.81 +
    1.82 +%{_bindir}/ndiff
    1.83 +%doc %{_prefix}/share/man/man1/ndiff.1.gz
    1.84 +
    1.85 +# Ncat subpackage
    1.86 +%if "%{buildncat}" != "0"
    1.87 +%package -n ncat
    1.88 +Summary: Nmap's Netcat replacement
    1.89 +Group: Applications/System
    1.90 +
    1.91 +%description -n ncat
    1.92 +Ncat is a feature packed networking utility which will read and
    1.93 +write data across a network from the command line.  It uses both
    1.94 +TCP and UDP for communication and is designed to be a reliable
    1.95 +back-end tool to instantly provide network connectivity to other
    1.96 +applications and users. Ncat will not only work with IPv4 and IPv6
    1.97 +but provides the user with a virtually limitless number of potential
    1.98 +uses.
    1.99 +
   1.100 +%files -n ncat
   1.101 +%defattr(-,root,root)
   1.102 +%doc %{_prefix}/share/man/man1/ncat.1.gz
   1.103 +%{_bindir}/ncat
   1.104 +%{_datadir}/ncat
   1.105 +
   1.106 +%endif
   1.107 +
   1.108 +%changelog
   1.109 +
   1.110 +* Sat Jun 06 2009 Fyodor (fyodor(a)insecure.org)
   1.111 +- Removed changelog entries as SVN is a more authoritative source. Execute:
   1.112 +- svn log --username guest --password "" svn://svn.insecure.org/nmap/nmap.spec.in
   1.113 +

mercurial