nmap/nmap.spec

changeset 1
4667f24fe848
parent 0
4f133201e207
equal deleted inserted replaced
0:b91402f28f46 1:f4dfbebc4369
1 # To build a static RPM, add 1 Summary: Network exploration tool and security scanner
2 # --define "static 1" 2 Vendor: Europalab Software
3 # to the rpmbuild command line. To build without Ncat, add 3 Packager: Michael Schloh von Bennewitz
4 # --define "buildncat 0" 4 Distribution: MeeGo Thirdparty
5 # 5 Name: nmap
6 # To specify openssl dir, add something like: 6 Version: 5.21
7 # --define "openssl /usr/local/ssl" 7 Release: 20101201
8 URL: http://www.nmap.org/
9 Group: Applications/System
10 License: http://nmap.org/man/man-legal.html
11 Source0: http://nmap.org/dist/%{name}-%{version}.tar.bz2
12 BuildRoot: %{_tmppath}/%{name}-root
13 BuildRequires: openssl-devel libpcap-devel pcre-devel lua-devel
8 14
9 %define name nmap 15 # for ndiff(1) only
10 %define version 5.21 16 Requires: python >= 2.4
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 17
31 %description 18 %description
32
33 Nmap ("Network Mapper") is a free and open source utility 19 Nmap ("Network Mapper") is a free and open source utility
34 for network exploration or security auditing. Many systems and network 20 for network exploration or security auditing. Many systems and network
35 administrators also find it useful for tasks such as network 21 administrators also find it useful for tasks such as network
36 inventory, managing service upgrade schedules, and monitoring host or 22 inventory, managing service upgrade schedules, and monitoring host or
37 service uptime. Nmap uses raw IP packets in novel ways to determine 23 service uptime. Nmap uses raw IP packets in novel ways to determine
44 both console and graphical versions are available. 30 both console and graphical versions are available.
45 31
46 %prep 32 %prep
47 %setup -q 33 %setup -q
48 34
35 # avoid using included copies of libraries
36 rm -rf liblua libpcap libpcre macosx mswin32
37
49 %build 38 %build
50 %configure --with-openssl=%{openssl} --without-zenmap --with-ndiff --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included 39 %configure --without-ncat --without-zenmap --with-ndiff --with-libdnet=included --with-openssl=/usr --with-libpcap=/usr --with-libpcre=/usr --with-liblua=/usr
51 %if "%{buildncat}" == "0" 40 make %{?_smp_mflags}
52 %configure --without-ncat
53 %endif
54 %if "%{static}" == "1"
55 make static
56 %else
57 make
58 %endif
59 41
60 %install 42 %install
61 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 43 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
62 make install DESTDIR=$RPM_BUILD_ROOT 44 make install DESTDIR=$RPM_BUILD_ROOT
63 strip $RPM_BUILD_ROOT%{_bindir}/* || : 45 strip $RPM_BUILD_ROOT%{_bindir}/* || :
77 %{_datadir}/nmap 59 %{_datadir}/nmap
78 60
79 %{_bindir}/ndiff 61 %{_bindir}/ndiff
80 %doc %{_prefix}/share/man/man1/ndiff.1.gz 62 %doc %{_prefix}/share/man/man1/ndiff.1.gz
81 63
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 64 %changelog
106 65 * Wed Dec 1 2010 Michael Schloh von Bennewitz <michael@schloh.com> - 5.21-20101201
66 - Repackage for MeeGo 1.1
107 * Sat Jun 06 2009 Fyodor (fyodor(a)insecure.org) 67 * Sat Jun 06 2009 Fyodor (fyodor(a)insecure.org)
108 - Removed changelog entries as SVN is a more authoritative source. Execute: 68 - 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 69 - svn log --username guest --password "" svn://svn.insecure.org/nmap/nmap.spec.in
110 70

mercurial