From 9340d58d98a09f8f9222705e1a467b995a256700 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 8 Aug 2006 09:33:51 +0000 Subject: [PATCH] Port scanlogd to -ng SVN-Revision: 4523 --- net/scanlogd/Makefile | 62 ++++++++++++++++++++++++++++++++ net/scanlogd/files/scanlogd.init | 3 ++ 2 files changed, 65 insertions(+) create mode 100644 net/scanlogd/Makefile create mode 100755 net/scanlogd/files/scanlogd.init diff --git a/net/scanlogd/Makefile b/net/scanlogd/Makefile new file mode 100644 index 0000000000..ca255a2b26 --- /dev/null +++ b/net/scanlogd/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=scanlogd +PKG_VERSION:=2.2.6 +PKG_RELEASE:=1 +PKG_MD5SUM:=7b8187ea718ebe47f22805b921b909ab + +PKG_SOURCE_URL:=http://www.openwall.com/scanlogd/ \ + ftp://ftp.wiretapped.net/pub/openwall/ \ + http://distro.ibiblio.org/pub/linux/distributions/openwall/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/scanlogd + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap +libnet +libnids + TITLE:=a port scan detection tool + DESCRIPTION:=Scanlogd is a TCP port scan detection tool, originally designed\\\ + to illustrate various attacks an IDS developer has to deal with.\\\ + Thus, unlike some of the other port scan detection tools out there,\\\ + scanlogd is designed to be totally safe to use.\\\ + URL:=http://www.openwall.com/scanlogd +endef + +define Build/Configure + $(SED) "s,/var/empty,/tmp/.scanlogd," $(PKG_BUILD_DIR)/params.h + $(SED) "s,#undef SCANLOGD_DEVICE,#define SCANLOGD_DEVICE \"all\"," $(PKG_BUILD_DIR)/params.h +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CC=$(TARGET_CC) LD=$(TARGET_CC) CFLAGS="-c $(TARGET_CFLAGS)" \ + LDFLAGS= \ + PCAP_H="-I$(STAGING_DIR)/usr/include" \ + NIDS_H="-I$(STAGING_DIR)/usr/include" \ + NIDS_L="-L$(STAGING_DIR)/usr/lib -lnids -lnet -lpcap" \ + libnids +endef + +define Package/scanlogd/install + install -d -m0755 $(1)/etc/init.d + install -m0755 ./files/scanlogd.init $(1)/etc/init.d/S60scanlogd + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,scanlogd)) diff --git a/net/scanlogd/files/scanlogd.init b/net/scanlogd/files/scanlogd.init new file mode 100755 index 0000000000..762d55e8cd --- /dev/null +++ b/net/scanlogd/files/scanlogd.init @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir -p `grep "^scanlogd:" /etc/passwd | cut -d: -f6` +/usr/sbin/scanlogd -- 2.30.2