diff --git a/security/scanlogd/Makefile b/security/scanlogd/Makefile deleted file mode 100644 index d8bb772cf..000000000 --- a/security/scanlogd/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# --- T2-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# T2 SDE: package/.../scanlogd/Makefile -# Copyright (C) 2004 - 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. A copy of the -# GNU General Public License can be found in the file COPYING. -# --- T2-COPYRIGHT-NOTE-END --- -CC = gcc -LD = gcc -RM = rm -f -CFLAGS = -c -Wall -O2 -fomit-frame-pointer -LDFLAGS = -s - -PCAP_H = -I/usr/include/pcap -PCAP_L = -lpcap - -NIDS_H = -I/usr/local/include -NIDS_L = -L/usr/local/lib -lnids -lnet -lpcap - -PROJ = scanlogd - -OBJS_COMMON = scanlogd.o -OBJS = $(OBJS_COMMON) in_linux.o in_nids.o in_pcap.o - -default: libnids - -install: default - cp -f scanlogd $(ROOT)/$(PREFIX)/sbin/ - -linux: $(OBJS_COMMON) in_linux.o - $(LD) $(LDFLAGS) $(OBJS_COMMON) in_linux.o -o scanlogd - -libnids: $(OBJS_COMMON) in_nids.o - $(LD) $(LDFLAGS) $(OBJS_COMMON) in_nids.o $(NIDS_L) -o scanlogd - -libpcap: $(OBJS_COMMON) in_pcap.o - $(LD) $(LDFLAGS) $(OBJS_COMMON) in_pcap.o $(PCAP_L) -o scanlogd - -in_pcap.o: params.h in.h - $(CC) $(CFLAGS) $(PCAP_H) in_pcap.c - -in_nids.o: params.h in.h - $(CC) $(CFLAGS) $(NIDS_H) in_nids.c - -scanlogd.o: params.h in.h -in_linux.o: params.h in.h - -.c.o: - $(CC) $(CFLAGS) $*.c - -clean: - $(RM) $(PROJ) $(OBJS) diff --git a/security/scanlogd/makefile.patch b/security/scanlogd/makefile.patch new file mode 100644 index 000000000..0b3ede7ba --- /dev/null +++ b/security/scanlogd/makefile.patch @@ -0,0 +1,27 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../scanlogd/makefile.patch +# Copyright (C) 2007 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +--- ./Makefile.orig 2006-03-05 11:03:15.000000000 +0100 ++++ ./Makefile 2007-08-08 15:18:50.000000000 +0200 +@@ -1,8 +1,6 @@ + CC = gcc + LD = $(CC) + RM = rm -f +-CFLAGS = -Wall -O2 -fomit-frame-pointer +-LDFLAGS = -s + + PCAP_H = -I/usr/include/pcap + PCAP_L = -lpcap diff --git a/security/scanlogd/scanlogd.conf b/security/scanlogd/scanlogd.conf index 4f97d5d07..ebdd0b862 100644 --- a/security/scanlogd/scanlogd.conf +++ b/security/scanlogd/scanlogd.conf @@ -1,7 +1,8 @@ -# --- T2-COPYRIGHT-NOTE-BEGIN --- +# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # -# T2 SDE: package/.../scanlogd/scanlogd.conf +# Filename: package/.../scanlogd/scanlogd.conf +# Copyright (C) 2007 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 1998 - 2004 Clifford Wolf # @@ -11,8 +12,38 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. A copy of the # GNU General Public License can be found in the file COPYING. -# --- T2-COPYRIGHT-NOTE-END --- +# --- SDE-COPYRIGHT-NOTE-END --- -hook_add premake 5 "echo PREFIX=$prefix > $builddir/scanlogd-$ver/Makefile" -hook_add premake 5 "echo ROOT=$root >> $builddir/scanlogd-$ver/Makefile" -hook_add premake 5 "cat $confdir/Makefile >> $builddir/scanlogd-$ver/Makefile" +makeinstopt="" + +echo_warning "To monitor the traffic of an entire network, and for" +echo_warning "being able to handle fragmented IP packets use libnids" +echo_warning "for packet capturing!" + +if pkginstalled libpcap ; then + pkgprefix -t libpcap + var_append makeopt ' ' "PCAP_H=-I$root$( pkgprefix includedir libpcap )" + + if pkginstalled libnids ; then + pkgprefix -t libnids + var_append makeopt ' ' "NIDS_H=-I$root$( pkgprefix includedir libnids )" + var_append makeopt ' ' 'NIDS_L="-L$root$( pkgprefix libdir libnids ) -lnids -lnet -lpcap"' + + var_append makeopt ' ' "libnids" + echo_status "scanlogd packet capture interface: libnids" + else + var_append makeopt ' ' "libpcap" + echo_status "scanlogd packet capture interface: libpcap" + echo_warning "The use of libpcap alone is discouraged!" + fi +else + # OpenSDE currently just supports linux kernels + var_append makeopt ' ' "linux" + echo_status "scanlogd packet capture interface: linux raw socket" +fi + +pkg_scanlogd_install() { + cp -vf scanlogd $root$sbindir + cp -vf scanlogd.8 $root$mandir +} +hook_add postmake 5 "pkg_scanlogd_install"