nmap/nmap.spec

83 lines
2.6 KiB
RPMSpec
Raw Normal View History

2019-09-30 11:09:56 -04:00
%global _hardened_build 1
Name: nmap
Epoch: 2
Version: 7.70
Release: 6
License: Nmap
Summary: A tool for network discovery and security auditing.
Requires: %{name}-ncat = %{epoch}:%{version}-%{release}
URL: https://nmap.org/
Source0: https://nmap.org/dist/%{name}-%{version}%{?prerelease}.tar.bz2
Patch1: nmap-4.03-mktemp.patch
Patch2: nmap-4.52-noms.patch
Patch3: ncat_reg_stdin.patch
Patch4: nmap-6.25-displayerror.patch
Patch6000: CVE-2017-18594.patch
BuildRequires: gcc-c++ openssl-devel gtk2-devel lua-devel libpcap-devel pcre-devel desktop-file-utils
BuildRequires: dos2unix libtool automake autoconf gettext-devel libssh2-devel
Obsoletes: nmap-frontend nmap-ndiff nmap-ncat nc < 1.109.20120711-2
Obsoletes: nc6 < 1.00-22
Provides: nmap-frontend nmap-ndiff nmap-ncat nc nc6
%define pixmap_srcdir zenmap/share/pixmaps
%description
Nmap ("Network Mapper") is a free and open source (license) utility for network discovery and security \
auditing. It was designed to rapidly scan large networks, but works fine against single hosts.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
rm -rf libpcap libpcre macosx mswin32 libssh2 libz
for f in acinclude.m4 configure.ac nping/configure.ac
do
sed -i -e 's/\(AC_DEFINE([^,)]*\))/\1, 1, [Description])/' -e 's/\(AC_DEFINE([^,]*,[^,)]*\))/\1, [Description])/' $f
done
autoreconf -I . -fiv --no-recursive
cd nping; autoreconf -I .. -fiv --no-recursive; cd ..
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure --with-libpcap=yes --with-liblua=included --without-zenmap --without-ndiff --enable-dbus --with-libssh2=yes
%make_build
sed -i 's/-md/-mf/' nping/docs/nping.1
%install
make DESTDIR=%{buildroot} STRIP=true install
ln -s ncat.1.gz %{buildroot}%{_mandir}/man1/nc.1.gz
ln -s ncat %{buildroot}%{_bindir}/nc
%find_lang nmap --with-man
%files -f nmap.lang
%defattr(-,root,root)
%exclude %{_datadir}/ncat
%doc COPYING* ncat/docs/AUTHORS ncat/docs/README
%{_bindir}/n*
%{_datadir}/nmap
%files help
%defattr(-,root,root)
%doc docs/README docs/nmap.usage.txt ncat/docs/THANKS ncat/docs/examples
%{_mandir}/man1/*.1.gz
%changelog
* Wed Sep 25 2019 Li Wang<wangli221@huawei.com> - 2:7.70-6
- Type:cves
- ID:CVE-2017-18594
- SUG:restart
- DESC:fix CVE-2017-18594
* Wed Sep 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 2:7.70-5
- Package init