457aea6
%bcond_with     pfring
457aea6
%bcond_without  hiredis
457aea6
%bcond_with     mongodb
457aea6
%bcond_without  debug
457aea6
Christopher Meng 7c36610
Name:           zmap
Fabio Alessandro Locati f79b585
Version:        2.1.1
Fabio Alessandro Locati f79b585
Release:        1%{?dist}
Christopher Meng 7c36610
Summary:        Network scanner for Internet-wide network studies
Christopher Meng 7c36610
License:        ASL 2.0
Christopher Meng 7c36610
URL:            https://zmap.io
7ddb444
Source0:        https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Christopher Meng 7c36610
BuildRequires:  byacc
Christopher Meng 7c36610
BuildRequires:  cmake
Christopher Meng 7c36610
BuildRequires:  flex
Christopher Meng 7c36610
BuildRequires:  gengetopt
Christopher Meng 7c36610
BuildRequires:  gmp-devel
457aea6
%if %{with hiredis}
Christopher Meng 7c36610
BuildRequires:  hiredis-devel
457aea6
%endif
Christopher Meng 7c36610
BuildRequires:  json-c-devel
Christopher Meng 7c36610
BuildRequires:  libpcap-devel
457aea6
%if %{with mongodb}
457aea6
BuildRequires:  pkgconfig(libmongoc-1.0)
457aea6
%endif
Christopher Meng 7c36610
Christopher Meng 7c36610
%description
Christopher Meng 7c36610
ZMap is an open-source network scanner that enables researchers to easily 
Christopher Meng 7c36610
perform Internet-wide network studies. With a single machine and a well 
Christopher Meng 7c36610
provisioned network uplink, ZMap is capable of performing a complete scan of 
7ddb444
the IPv4 address space in under 45 minutes, approaching the theoretical limit
7ddb444
of gigabit Ethernet.
Christopher Meng 7c36610
Christopher Meng 7c36610
ZMap can be used to study protocol adoption over time, monitor service 
Christopher Meng 7c36610
availability, and help us better understand large systems distributed across 
Christopher Meng 7c36610
the Internet.
Christopher Meng 7c36610
Christopher Meng 7c36610
========== WARNING ==========
Christopher Meng 7c36610
While ZMap is a powerful tool for researchers, please keep in mind that by 
Christopher Meng 7c36610
running ZMap, you are potentially scanning the ENTIRE IPv4 address space and 
Christopher Meng 7c36610
some users may not appreciate your scanning. We encourage ZMap users to 
Christopher Meng 7c36610
respect requests to stop scanning and to exclude these networks from ongoing 
Christopher Meng 7c36610
scanning.
Christopher Meng 7c36610
Christopher Meng 7c36610
%prep
Christopher Meng 7c36610
%setup -q
Fabio Alessandro Locati f79b585
# https://github.com/zmap/zmap/pull/332
457aea6
sed -i 's|${CMAKE_C_FLAGS} ${GCCWARNINGS}|${GCCWARNINGS} ${CMAKE_C_FLAGS}|g;s|${CMAKE_EXE_LINKER_FLAGS} ${LDHARDENING}|${LDHARDENING} ${CMAKE_EXE_LINKER_FLAGS}|g' CMakeLists.txt
Christopher Meng 7c36610
Christopher Meng 7c36610
%build
457aea6
%cmake -DWITH_JSON=ON     \
457aea6
%if %{with mongodb}
457aea6
       -DWITH_MONGO=ON    \
457aea6
%endif
457aea6
%if %{with hiredis}
457aea6
       -DWITH_REDIS=ON    \
457aea6
%endif
457aea6
       -DWITH_PFRING=OFF
457aea6
083667f
%make_build
083667f
Christopher Meng 7c36610
chmod 644 -v examples/udp-probes/*
457aea6
find ./examples/ -type f -exec sed -i 's/\r$//' {} \+
Christopher Meng 7c36610
Christopher Meng 7c36610
%install
083667f
%make_install
Christopher Meng 7c36610
Christopher Meng 7c36610
%files
Fabio Alessandro Locati f79b585
%doc AUTHORS CHANGELOG.md README.md examples/
877d704
%license LICENSE
Christopher Meng 7c36610
%dir %{_sysconfdir}/%{name}
Christopher Meng 7c36610
%config(noreplace) %{_sysconfdir}/%{name}/*
457aea6
%{_sbindir}/zmap
457aea6
%{_sbindir}/zblacklist
457aea6
%{_sbindir}/ztee
457aea6
%{_mandir}/man1/zmap.1*
457aea6
%{_mandir}/man1/zblacklist.1*
457aea6
%{_mandir}/man1/ztee.1*
Christopher Meng 7c36610
Christopher Meng 7c36610
%changelog
Fabio Alessandro Locati bec9502
* Wed Mar 02 2016 Fabio Alessandro Locati <fabio@locati.cc> - 2.1.1-1
Fabio Alessandro Locati f79b585
- Update to 2.1.1
Fabio Alessandro Locati f79b585
- Clean the spec a little bit
Fabio Alessandro Locati f79b585
ff100aa
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-3
ff100aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ff100aa
7c10a72
* Tue Sep 29 2015 Peter Robinson <pbrobinson@fedoraproject.org> 2.1.0-2
7c10a72
- rebuild (hiredis)
7c10a72
457aea6
* Thu Sep 03 2015 Christopher Meng <rpm@cicku.me> - 2.1.0-1
457aea6
- Update to 2.1.0
457aea6
785fdc2
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-4
785fdc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
785fdc2
877d704
* Sun Feb 22 2015 Christopher Meng <rpm@cicku.me> - 1.2.1-3
877d704
- Rebuilt for hiredis 0.12.1
877d704
a5ea401
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
a5ea401
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
a5ea401
083667f
* Sun Jul 20 2014 Christopher Meng <rpm@cicku.me> - 1.2.1-1
083667f
- Update to 1.2.1
083667f
9a80248
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
9a80248
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9a80248
7ddb444
* Wed Mar 12 2014 Christopher Meng <rpm@cicku.me> - 1.2.0-1
7ddb444
- Update to 1.2.0
7ddb444
e69f763
* Mon Jan 27 2014 Christopher Meng <rpm@cicku.me> - 1.1.2-1
ed5a4a1
- Update to 1.1.2
ed5a4a1
a062410
* Thu Dec 19 2013 Christopher Meng <rpm@cicku.me> - 1.1.1-1
a062410
- Update to 1.1.1
a062410
Christopher Meng 7c36610
* Fri Nov 22 2013 Christopher Meng <rpm@cicku.me> - 1.1.0-2
Christopher Meng 7c36610
- Set 644 to examples.
Christopher Meng 7c36610
- Fix wrong line endings.
Christopher Meng 7c36610
Christopher Meng 7c36610
* Tue Nov 19 2013 Christopher Meng <rpm@cicku.me> - 1.1.0-1
a062410
- Update to 1.1.0
Christopher Meng 7c36610
- Enable harden building.
Christopher Meng 7c36610
Christopher Meng 7c36610
* Mon Aug 26 2013 Christopher Meng <rpm@cicku.me> - 1.0.3-2
Christopher Meng 7c36610
- Correct the license and summary.
Christopher Meng 7c36610
Christopher Meng 7c36610
* Mon Aug 19 2013 Christopher Meng <rpm@cicku.me> - 1.0.3-1
Christopher Meng 7c36610
- Initial Package.