Importing all of DRL, including ulogd and all of its files.
[distributedratelimiting.git] / ulogd.spec
diff --git a/ulogd.spec b/ulogd.spec
new file mode 100644 (file)
index 0000000..7ab2204
--- /dev/null
@@ -0,0 +1,179 @@
+#
+# $Id$
+#
+%define url $URL$
+
+%define name ulogd
+%define version 1.24
+%define taglevel 4
+
+%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+
+Vendor: PlanetLab
+Packager: PlanetLab Central <support@planet-lab.org>
+Distribution: PlanetLab %{plrelease}
+URL: %(echo %{url} | cut -d ' ' -f 2)
+
+Summary: ulogd - The userspace logging daemon for netfilter
+Name: %{name}
+Version: %{version}
+Release: %{release}
+License: GPL
+Group: Network
+Source: ftp://ftp.netfilter.org/pub/ulogd/%{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+# prep stage will install the appropriate *-devel packages we require --mef
+#BuildRequires: kernel-devel mysql-devel libpcap-devel
+
+#%package mysql
+#Summary: MySQL output plugin for ulogd
+#Group: Network
+
+#%package sqlite3
+#Summary: SQLITE3 output plugin for ulogd
+#Group: Network
+
+%package pcap
+Summary: PCAP output plugin for ulogd
+Group: Network
+
+
+%description
+ulogd is an universal logging daemon for the ULOG target of netfilter, the
+Linux 2.4 firewalling subsystem. ulogd is able to log packets in variuos
+formats to different targets (text files, databases, etc..). It has an
+easy-to-use plugin interface to add new protocols and new output targets.
+
+#%description mysql
+#ulogd-mysql is a MySQL output plugin for ulogd. It enables logging of
+#firewall information into a MySQL database.
+
+%description pcap
+ulogd-pcap is a LibPCap output plugin for ulogd. It enables logging of
+packets to pcap-style files (like tcpdump).
+
+#%description sqlite3
+#ulogd-sqlite3 is a SQLITE3 output plugin for ulogd. It enables logging of
+#firewall information into a SQLITE3 database.
+
+%prep
+%setup
+aclocal
+autoconf
+# bootstrap to avoid BuildRequires of kernel-source, proper-devel, and proper-libs, and mysql-devel
+shopt -s nullglob
+
+%define KERNEL %(rpm -q --qf '%%{VERSION}-%%{RELEASE}-%%{ARCH}\\n' kernel-devel | tail -n 1 )
+count=$(rpm -q kernel-devel| wc -l)
+if [ $count -gt 1 ] ; then
+       echo "WARNING: choosing kernel-devel-$KERNEL"
+       echo "  but there are other kernel-devel packages installed: $(rpm -q kernel-devel)"
+fi
+       
+WITH_KERNEL="--with-kernel=/usr/src/kernels/%{KERNEL}"
+
+#%configure --with-mysql --with-proper $WITH_KERNEL
+%configure --with-proper $WITH_KERNEL
+
+%build
+make
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}/%{_sysconfdir}
+mkdir -p %{buildroot}/%{_libdir}/ulogd
+mkdir -p %{buildroot}/%{_sbindir}/sbin
+mkdir -p %{buildroot}/%{_mandir}/man8
+make DESTDIR=%{buildroot} install
+
+mkdir -p %{buildroot}/%{_sysconfdir}/rc.d/init.d
+install ulogd.init %{buildroot}/%{_sysconfdir}/rc.d/init.d/ulogd
+install ulogd.8 %{buildroot}/%{_mandir}/man8/ulogd.8
+install -D -m 644 ulogd.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/ulogd
+               
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(0644,root,root,0755)
+%attr(0755,root,root) %{_sbindir}/ulogd
+#%attr(0755,root,root) %{_bindir}/netflow-import
+%{_sysconfdir}/ulogd.conf
+%{_sysconfdir}/logrotate.d/ulogd
+%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/ulogd
+%{_mandir}/man8/*
+%dir %{_libdir}/ulogd
+%{_libdir}/ulogd/ulogd_BASE.so
+%{_libdir}/ulogd/ulogd_LOCAL.so
+%{_libdir}/ulogd/ulogd_LOGEMU.so
+#%{_libdir}/ulogd/ulogd_NETFLOW.so
+%{_libdir}/ulogd/ulogd_OPRINT.so
+%{_libdir}/ulogd/ulogd_PWSNIFF.so
+%{_libdir}/ulogd/ulogd_SYSLOG.so
+%{_libdir}/ulogd/ulogd_DRL.so
+%doc COPYING AUTHORS README
+%doc doc/ulogd.txt doc/ulogd.a4.ps doc/ulogd.html
+
+#%files mysql
+#%defattr(0644,root,root,0755)
+#%{_libdir}/ulogd/ulogd_MYSQL.so
+
+#%files pcap
+#%defattr(0644,root,root,0755)
+#%{_libdir}/ulogd/ulogd_PCAP.so
+
+#%files sqlite3
+#%defattr(0644,root,root,0755)
+#%{_libdir}/ulogd/ulogd_SQLITE3.so
+
+%changelog
+* Wed Dec  5 2007 Marc E. Fiuczynski <mef@cs.princeton.edu> 1.22-1gm.planetlab
++ ulogd-1.24-3
+- Do not include postgres & sqlite
+- update to f7 version
+
+* Tue Dec  4 2007 Marc E. Fiuczynski <mef@cs.princeton.edu> 1.22-1gm.planetlab
++ ulogd-1.22-1gm
+- updated to 1.21 release
+- integrated with planetlab build environment
+
+* Wed Feb 16 2005 Harald Welte <laforge@gnumonks.org>
++ ulogd-1.21-1gm
+- updated to 1.21 release
+- separate sqlite3 and pcap sub-pacakges
+
+* Sat Feb 12 2005 Harald Welte <laforge@gnumonks.org>
++ ulogd-1.20-1gm
+- updated to 1.20 release
+- add ulogd.8 manpage
+
+* Fri Nov 05 2004 Mark Huang <mlhuang@cs.princeton.edu> 1.02-3.planetlab
++ planetlab-3_0-rc2
+- service ulogd status: exit with appropriate error code
+
+* Sat Aug 25 2003 Harald Welte <laforge@gnumonks.org>
++ ulogd-1.00-1gm
+- updated to 1.01 release
+- add ulogd.8 manpage
+
+* Wed Mar 05 2003 Harald Welte <laforge@gnumonks.org>
++ ulogd-1.00-1gm
+- updated to 1.00 release
+
+* Mon Sep 24 2001 Harald Welte <laforge@conectiva.com>
++ ulogd-0.97-1cl
+- updatd to 0.97 release (to fix endless-one-packet-loop bug)
+
+* Sun Jun 17 2001 Harald Welte <laforge@conectiva.com>
++ ulogd-0.96-2cl
+- updated to 0.96 final release
+- use ulogd.init from within source tgz
+
+* Sun May 20 2001 Harald Welte <laforge@conectiva.com>
++ ulogd-0.96-1cl
+- Initial conectiva package
+- cleaned up SPEC file
+- created mysql subpackage
+
+* Sun Nov 19 2000 Harald Welte <laforge@gnumonks.org>
+- Initial RPM package for ulogd-0.9.