d187c65
%define _default_patch_fuzz 2
fa49311
Name: pads
fa49311
Version: 1.2
77e944f
Release: 5%{?dist}
fa49311
Summary: Passive Asset Detection System
fa49311
Group: Applications/System
fa49311
License: GPLv2+
fa49311
URL: http://passive.sourceforge.net/
fa49311
Source0: http://prdownloads.sourceforge.net/passive/%{name}-%{version}.tar.gz
fa49311
Source1: pads.init
fa49311
Source2: pads.sysconfig
fa49311
Patch1: pads-1.2-cleanup.patch
fa49311
Patch2: pads-1.2-memleak.patch
fa49311
Patch3: pads-1.2-overrun.patch
fa49311
Patch4: pads-1.2-disable-debug.patch
fa49311
Patch5: pads-1.2-daemonize.patch
fa49311
Patch6: pads-1.2-ether-codes-update.patch
fa49311
Patch7: pads-1.2-misc.patch
fa49311
Patch8: pads-1.2-arp.patch
fa49311
Patch9: pads-1.2-prelude.patch
fa49311
Patch10: pads+vlan.patch
fa49311
Patch11: pads-1.2-prelude-cleanup.patch
fa49311
Patch12: pads-1.2-readonly.patch
fa49311
Patch13: pads-1.2-bstring.patch
fa49311
Patch14: pads-1.2-leak.patch
fa49311
Patch15: pads-1.2-perf.patch
fa49311
Patch16: pads-1.2-daemon.patch
a2cb05a
Patch17: pads-1.2-pthreads.patch
fa49311
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
fa49311
BuildRequires: automake autoconf
fa49311
BuildRequires: pcre-devel libpcap-devel
a2cb05a
BuildRequires: libprelude-devel >= 0.9.21
fa49311
Requires(post)  : /sbin/chkconfig
fa49311
Requires(preun) : /sbin/chkconfig
fa49311
Requires(preun) : /sbin/service
fa49311
Requires(postun): /sbin/service
fa49311
fa49311
%description
fa49311
PADS is a libpcap based detection engine used to passively 
fa49311
detect network assets.  It is designed to complement IDS 
fa49311
technology by providing context to IDS alerts. When new assets
fa49311
are found, it can send IDMEF alerts via prelude.
fa49311
fa49311
%prep
fa49311
%setup -q
fa49311
%patch1 -p1
fa49311
%patch2 -p1
fa49311
%patch3 -p1
fa49311
%patch4 -p1
fa49311
%patch5 -p1
fa49311
%patch6 -p1
fa49311
%patch7 -p1
fa49311
%patch8 -p1
fa49311
%patch9 -p1
fa49311
%patch10 -p1
fa49311
%patch11 -p1
fa49311
%patch12 -p1
fa49311
%patch13 -p1
fa49311
%patch14 -p1
fa49311
%patch15 -p1
fa49311
%patch16 -p1
a2cb05a
%patch17 -p1
fa49311
fa49311
%build
fa49311
autoreconf -fv --install
fa49311
%configure --with-prelude
fa49311
make %{?_smp_mflags}
fa49311
fa49311
%install
fa49311
rm -rf %{buildroot}
fa49311
mkdir -p %{buildroot}%{_initrddir}
fa49311
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
fa49311
make install DESTDIR=%{buildroot}
fa49311
install -m 755 %SOURCE1 %{buildroot}%{_initrddir}/%{name}
fa49311
install -m 640 %SOURCE2 %{buildroot}%{_sysconfdir}/sysconfig/%{name}
fa49311
# Remove installed docs since we pick this up another way
fa49311
rm -rf $RPM_BUILD_ROOT/usr/share/pads/
fa49311
fa49311
%clean
fa49311
rm -rf %{buildroot}
fa49311
fa49311
%post
fa49311
/sbin/chkconfig --add %{name}
fa49311
fa49311
%preun
fa49311
if [ $1 = 0 ]; then
fa49311
        /sbin/service %{name} stop > /dev/null 2>&1 || :
fa49311
        /sbin/chkconfig --del %{name}
fa49311
fi
fa49311
fa49311
%postun
fa49311
if [ "$1" -ge "1" ]; then
fa49311
        /sbin/service %{name} condrestart >/dev/null 2>&1 || :
fa49311
fi
fa49311
fa49311
%files
fa49311
%defattr(-,root,root,-)
fa49311
%doc doc/AUTHORS doc/COPYING doc/README doc/ChangeLog
fa49311
%{_sysconfdir}/pads-ether-codes
fa49311
%{_sysconfdir}/pads-signature-list
fa49311
%config(noreplace) %attr(0640,root,root) %{_sysconfdir}/pads.conf
fa49311
%config(noreplace) %attr(0640,root,root) %{_sysconfdir}/sysconfig/%{name}
fa49311
%attr(0755,root,root) %{_initrddir}/%{name}
fa49311
%{_bindir}/pads
fa49311
%{_bindir}/pads-report
fa49311
%{_mandir}/*/*
fa49311
fa49311
%changelog
77e944f
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-5
77e944f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
77e944f
fcb477b
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-4
fcb477b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
fcb477b
758410f
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-3
758410f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
758410f
a2cb05a
* Tue Oct 28 2008 Steve Grubb <sgrubb@redhat.com> 1.2-2
221fa0f
- Update CFLAGS for newer libprelude (#465964)
a2cb05a
fa49311
* Tue Aug 12 2008 Steve Grubb <sgrubb@redhat.com> 1.2-1
fa49311
 Initial rpm build with many bug fixes