2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.openwall.com/scanlogd/ \
17 ftp://ftp.wiretapped.net/pub/openwall/ \
18 http://distro.ibiblio.org/pub/linux/distributions/openwall/
19 PKG_MD5SUM:=7b8187ea718ebe47f22805b921b909ab
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
27 include $(INCLUDE_DIR)/package.mk
29 define Package/scanlogd
32 DEPENDS:=+libpcap +libnet0 +libnids
33 TITLE:=Port scan detection tool
34 URL:=http://www.openwall.com/scanlogd
37 define Package/scanlogd/description
38 Scanlogd is a TCP port scan detection tool, originally designed
39 to illustrate various attacks an IDS developer has to deal with.
40 Thus, unlike some of the other port scan detection tools out there,
41 scanlogd is designed to be totally safe to use.
44 define Build/Configure
45 $(SED) "s,/var/empty,/tmp/.scanlogd," $(PKG_BUILD_DIR)/params.h
46 $(SED) "s,#undef SCANLOGD_DEVICE,#define SCANLOGD_DEVICE \"all\"," $(PKG_BUILD_DIR)/params.h
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 $(TARGET_CONFIGURE_OPTS) \
52 CC="$(TARGET_CC)" LD="$(TARGET_CC)" CFLAGS="-c $(TARGET_CFLAGS)" \
54 PCAP_H="-I$(STAGING_DIR)/usr/include" \
55 NIDS_H="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/lib/libnet-1.0.x/include" \
56 NIDS_L="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib -lnids -lnet -lpcap" \
60 define Package/scanlogd/install
61 $(INSTALL_DIR) $(1)/usr/sbin
62 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
63 $(INSTALL_DIR) $(1)/etc/init.d
64 $(INSTALL_BIN) ./files/scanlogd.init $(1)/etc/init.d/scanlogd
67 $(eval $(call BuildPackage,scanlogd))