Fix/clean several hundred package makefiles
[openwrt/svn-archive/archive.git] / net / scanlogd / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=scanlogd
12 PKG_VERSION:=2.2.6
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=7b8187ea718ebe47f22805b921b909ab
15
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_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20 PKG_CAT:=zcat
21
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/scanlogd
28 SECTION:=net
29 CATEGORY:=Network
30 DEPENDS:=+libpcap +libnet +libnids
31 TITLE:=a port scan detection tool
32 DESCRIPTION:=Scanlogd is a TCP port scan detection tool, originally designed\\\
33 to illustrate various attacks an IDS developer has to deal with.\\\
34 Thus, unlike some of the other port scan detection tools out there,\\\
35 scanlogd is designed to be totally safe to use.\\\
36 URL:=http://www.openwall.com/scanlogd
37 endef
38
39 define Build/Configure
40 $(SED) "s,/var/empty,/tmp/.scanlogd," $(PKG_BUILD_DIR)/params.h
41 $(SED) "s,#undef SCANLOGD_DEVICE,#define SCANLOGD_DEVICE \"all\"," $(PKG_BUILD_DIR)/params.h
42 endef
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 $(TARGET_CONFIGURE_OPTS) \
47 CC="$(TARGET_CC)" LD="$(TARGET_CC)" CFLAGS="-c $(TARGET_CFLAGS)" \
48 LDFLAGS= \
49 PCAP_H="-I$(STAGING_DIR)/usr/include" \
50 NIDS_H="-I$(STAGING_DIR)/usr/include" \
51 NIDS_L="-L$(STAGING_DIR)/usr/lib -lnids -lnet -lpcap" \
52 libnids
53 endef
54
55 define Package/scanlogd/install
56 install -d -m0755 $(1)/etc/init.d
57 install -m0755 ./files/scanlogd.init $(1)/etc/init.d/S60scanlogd
58 install -d -m0755 $(1)/usr/sbin
59 install -m0755 $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
60 endef
61
62 $(eval $(call BuildPackage,scanlogd))