# FIXME: fix out of tree builds Name: ndpmon Version: 2.0.0 Release: 0.1%{?dist} Summary: IPv6 Neighbor Discovery Protocol Monitor Group: Applications/Internet License: LGPLv2+ URL: http://ndpmon.sourceforge.net Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz Source1: ndpmon.init Source2: ndpmon.sysconfig Patch1: ndpmon_packaging_and_fixes.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: cmake BuildRequires: libpcap-devel BuildRequires: libxml2-devel BuildRequires: openssl-devel # wireshark for manuf file duplicated in ndpmon source... Requires: wireshark # python xml stuff for the alerts_to_xml.py script Requires: python-4Suite-XML Requires(post): chkconfig Requires(preun): chkconfig # This is for /sbin/service Requires(preun): initscripts Requires(postun): initscripts %description NDPMon, Neighbor Discovery Protocol Monitor, is a tool working with ICMPv6 packets. NDPMon observes the local network to see if nodes using neighbor discovery messages behave properly. When it detects a suspicious Neighbor Discovery message, it notifies the administrator by writing in the syslog and in some cases by sending an email report. %prep %setup -q %patch1 -p0 %build %cmake . -DSHARED_STATE_INSTALL_DIR=%{_sharedstatedir} \ -DENABLE_MACRESOLUTION=TRUE \ -DENABLE_COUNTERMEASURES=FALSE \ -DMANUF_FILE_LOCATION=%{_datadir}/wireshark/manuf make VERBOSE=0 %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT # install the init script install -d -m 755 $RPM_BUILD_ROOT%{_initddir} install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -c -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/ndpmon install -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ndpmon %clean rm -rf $RPM_BUILD_ROOT %post # This adds the proper /etc/rc*.d links for the script /sbin/chkconfig --add ndpmon %preun if [ $1 = 0 ] ; then /sbin/service ndpmon stop >/dev/null 2>&1 /sbin/chkconfig --del ndpmon fi %postun if [ "$1" -ge "1" ] ; then /sbin/service ndpmon condrestart >/dev/null 2>&1 || : fi %files %defattr(-,root,root,-) %doc README CHANGES COPYING %{_sbindir}/%{name} %{_mandir}/man8/* %config(noreplace) %{_sysconfdir}/ndpmon %dir %{_datadir}/ndpmon %{_datadir}/ndpmon/*.dtd %attr(0755,root,root) %{_datadir}/ndpmon/*.py* %attr(0755,root,root) %{_initddir}/ndpmon %config(noreplace) %{_sysconfdir}/sysconfig/ndpmon %config(noreplace) %{_sharedstatedir}/ndpmon %changelog * Tue Jan 11 2011 F. Kooman - 2.0.0-0.1 - rebuilt