1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 10:29:03 +00:00
Files
nmap/nmap.spec.in
david e94746493f Fix the Zenmap build on 64-bit architectures (where %{_libdir} is "/usr/lib64"
but Python modules may not be installed there) and make it work with different
versions of Python.
2007-11-06 17:25:09 +00:00

167 lines
5.7 KiB
RPMSpec

# This spec file defines two packages. nmap is Nmap itself and zenmap is
# the Zenmap frontend. Both packages are built by default. To keep from
# building the zenmap package, add
# --define "buildzenmap 0"
# to the rpmbuild command. To build a static RPM, add
# --define "static 1"
# By default, Zenmap will be built using whatever version of Python is
# the default on your system. To change this, use something like
# --define "__python /usr/bin/python2.5"
%define name nmap
%define version @VERSION@
%define release 1
%define _prefix /usr
Summary: Network exploration tool and security scanner
Name: %{name}
Version: %{version}
Release: %{release}
Epoch: 2
License: http://www.insecure.org/nmap/man/man-legal.html
Group: Applications/System
Source0: http://www.insecure.org/nmap/dist/%{name}-%{version}.tgz
URL: http://www.insecure.org/nmap/
# RPM can't be relocatable until I stop storing path info in the binary.
# Prefix: %{_prefix}
BuildRoot: %{_tmppath}/%{name}-root
%description
Nmap is a utility for network exploration or security auditing. It
supports ping scanning (determine which hosts are up), many port
scanning techniques, version detection (determine service protocols
and application versions listening behind ports), and TCP/IP
fingerprinting (remote host OS or device identification). Nmap also
offers flexible target and port specification, decoy/stealth scanning,
sunRPC scanning, and more. Most Unix and Windows platforms are
supported in both GUI and commandline modes. Several popular handheld
devices are also supported, including the Sharp Zaurus and the iPAQ.
%prep
%setup -q
%define makeflags %{?__python:PYTHON="%{__python}"}
%build
%if "%{buildzenmap}" != "0"
%configure --without-openssl
%else
%configure --without-openssl --without-zenmap
%endif
%if "%{static}" == "1"
make %{makeflags} static
%else
make %{makeflags}
%endif
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
make %{makeflags} install DESTDIR=$RPM_BUILD_ROOT
# Don't package the uninstaller with the RPM.
rm -f $RPM_BUILD_ROOT%{_bindir}/uninstall_zenmap
strip $RPM_BUILD_ROOT%{_bindir}/* || :
gzip $RPM_BUILD_ROOT%{_mandir}/man1/* || :
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc COPYING
%doc docs/README
%doc docs/nmap.usage.txt
%doc %{_prefix}/share/man/man1/nmap.1.gz
%{_bindir}/nmap
%{_datadir}/nmap
%{_libexecdir}/nmap
# zenmap subpackage.
%if "%{buildzenmap}" != "0"
%package -n zenmap
Summary: Multi-platform graphical Nmap frontend and results viewer.
Group: Applications/System
# The python dependency is filled in automatically.
Requires: nmap, gtk2
# Zenmap should really have a BuildArch of "noarch" but the arch of a
# subpackage can't be different from that of the rest of the spec.
%description -n zenmap
Zenmap is an Nmap frontend. It is meant to be useful for advanced users
and to make Nmap easy to use by beginners. It was originally derived
from Umit, an Nmap GUI created as part of the Google Summer of Code.
# Find where Python modules are installed. See
# http://fedoraproject.org/wiki/Packaging/Python.
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%files -n zenmap
%defattr(-,root,root)
%{_bindir}/zenmap
# This gets the modules and the .egg-info file if it was installed.
%{python_sitelib}/*
%{_datadir}/icons/*
%{_datadir}/pixmaps/*
%{_datadir}/umit
%endif
%changelog
* Tue Nov 06 2007 David Fifield (david(a)bamsoftware.com)
- Fix the Zenmap build on 64-bit architectures (where %{_libdir} is
"/usr/lib64" but Python modules may not be installed there) and make
it work with different versions of Python.
* Sun Nov 04 2007 David Fifield (david(a)bamsoftware.com)
- Add a zenmap subpackage.
* Wed Oct 31 2007 David Fifield (david(a)bamsoftware.com)
- Remove references to buildfe (build the NmapFE frontend).
* Sat Sep 01 2004 Stephane Loeuillet (stephane.loeuillet(a)tiscali.fr)
- Place .desktop file under ${prefix}/share/applications rather than
${prefix}/share/gnome/apps/Utilities
* Mon Dec 16 2002 Matthieu Verbert (mve(a)zurich.ibm.com)
- Place man pages under ${prefix}/share/man rather than ${prefix}/man
* Fri Jun 01 2001 GOMEZ Henri (hgomez(a)slib.fr)
- Patch which checks that $RPM_BUILD_ROOT is not "/" before rm'ing it.
* Tue Mar 06 2001 Ben Reed <ben(a)opennms.org>
- changed spec to handle not building the frontend
* Thu Dec 30 1999 Fyodor (fyodor(a)insecure.org)
- Updated description
- Eliminated source1 (nmapfe.desktop) directive and simply packaged it with Nmap
- Fixed nmap distribution URL (source0)
- Added this .rpm to base Nmap distribution
* Mon Dec 13 1999 Tim Powers <timp(a)redhat.com>
- based on origional spec file from
http://www.insecure.org/nmap/index.html#download
- general cleanups, removed lots of commenrts since it made the spec hard to
read
- changed group to Applications/System
- quiet setup
- no need to create dirs in the install section, "make
prefix=$RPM_BUILD_ROOT&{prefix} install" does this.
- using defined %{prefix}, %{version} etc. for easier/quicker maint.
- added docs
- gzip man pages
- strip after files have been installed into buildroot
- created separate package for the frontend so that Gtk+ isn't needed for the
CLI nmap
- not using -f in files section anymore, no need for it since there aren't that
many files/dirs
- added desktop entry for gnome
* Sun Jan 10 1999 Fyodor (fyodor(a)insecure.org)
- Merged in spec file sent in by Ian Macdonald <ianmacd(a)xs4all.nl>
* Tue Dec 29 1998 Fyodor (fyodor(a)insecure.org)
- Made some changes, and merged in another .spec file sent in
by Oren Tirosh <oren(a)hishome.net>
* Mon Dec 21 1998 Riku Meskanen (mesrik(a)cc.jyu.fi)
- initial build for RH 5.x