nmap/nmap.spec

changeset 0
4f133201e207
child 1
4667f24fe848
equal deleted inserted replaced
-1:000000000000 0:b91402f28f46
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"
8
9 %define name nmap
10 %define version 5.21
11 %define release 1
12 %define _prefix /usr
13
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
23
24 # For Ndiff.
25 Requires: python >= 2.4
26
27 # RPM can't be relocatable until I stop storing path info in the binary.
28 # Prefix: %{_prefix}
29 BuildRoot: %{_tmppath}/%{name}-root
30
31 %description
32
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.
45
46 %prep
47 %setup -q
48
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
59
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/* || :
65
66 %clean
67 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
68
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
78
79 %{_bindir}/ndiff
80 %doc %{_prefix}/share/man/man1/ndiff.1.gz
81
82 # Ncat subpackage
83 %if "%{buildncat}" != "0"
84 %package -n ncat
85 Summary: Nmap's Netcat replacement
86 Group: Applications/System
87
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.
96
97 %files -n ncat
98 %defattr(-,root,root)
99 %doc %{_prefix}/share/man/man1/ncat.1.gz
100 %{_bindir}/ncat
101 %{_datadir}/ncat
102
103 %endif
104
105 %changelog
106
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
110

mercurial