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.

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

mercurial