[package] opennhrp: update to 0.12.3
[packages.git] / net / scanlogd / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=scanlogd
11 PKG_VERSION:=2.2.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.openwall.com/scanlogd/ \
16         ftp://ftp.wiretapped.net/pub/openwall/ \
17         http://distro.ibiblio.org/pub/linux/distributions/openwall/
18 PKG_MD5SUM:=7b8187ea718ebe47f22805b921b909ab
19
20 PKG_INIT_PRIO:=60
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/scanlogd
25   SECTION:=net
26   CATEGORY:=Network
27   SUBMENU:=Firewall
28   DEPENDS:=+libpcap +libnet0 +libnids
29   TITLE:=Port scan detection tool
30   URL:=http://www.openwall.com/scanlogd
31 endef
32
33 define Package/scanlogd/description
34         Scanlogd is a TCP port scan detection tool, originally designed 
35         to illustrate various attacks an IDS developer has to deal with.
36         Thus, unlike some of the other port scan detection tools out there, 
37         scanlogd is designed to be totally safe to use.
38 endef
39
40 define Build/Configure  
41         $(SED) "s,/var/empty,/tmp/.scanlogd," $(PKG_BUILD_DIR)/params.h
42         $(SED) "s,#undef SCANLOGD_DEVICE,#define SCANLOGD_DEVICE \"all\"," $(PKG_BUILD_DIR)/params.h
43 endef
44
45 define Build/Compile    
46         $(MAKE) -C $(PKG_BUILD_DIR) \
47                 $(TARGET_CONFIGURE_OPTS) \
48                 CC="$(TARGET_CC)" LD="$(TARGET_CC)" CFLAGS="-c $(TARGET_CFLAGS)" \
49                 LDFLAGS= \
50                 PCAP_H="$(TARGET_CPPFLAGS)" \
51                 NIDS_H="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libnet-1.0.x/include" \
52                 NIDS_L="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib -lnids -lnet -lpcap" \
53                 libnids
54 endef
55
56 define Package/scanlogd/install 
57         $(INSTALL_DIR) $(1)/usr/sbin
58         $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
59         $(INSTALL_DIR) $(1)/etc/init.d
60         $(INSTALL_BIN) ./files/scanlogd.init $(1)/etc/init.d/scanlogd
61 endef
62
63 $(eval $(call BuildPackage,scanlogd))