poco: moved to github
[packages.git] / net / snortsam / Makefile
1 #
2 # Copyright (C) 2012 OpenWrt
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:=snortsam
11 PKG_VERSION:=2.70
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL:=http://val.bmstu.ru/unix/snort/
15 PKG_SOURCE:=$(PKG_NAME)-src-$(PKG_VERSION).tar.gz
16 PKG_MD5SUM:=8ffa32056152e089fbacd601090f941d
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
18 MAKE_PATH:=src
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/snortsam
23   SUBMENU:=Firewall
24   SECTION:=net
25   CATEGORY:=Network
26   TITLE:=Snortsam
27   URL:=https://www.snortsam.net/
28   DEPENDS:=+libpthread +snort
29 endef
30
31 define Package/snortsam/description
32  SnortSam is a plugin for Snort, an Intrusion Detection System (IDS). The plugin allows automated blocking of IP addresses.
33 endef
34
35 define Build/Compile
36         $(MAKE) -C $(PKG_BUILD_DIR)/src \
37                 DESTDIR="$(PKG_INSTALL_DIR)" \
38                 $(MAKE_FLAGS) \
39                 all
40         $(MAKE) -C $(PKG_BUILD_DIR)/src \
41                 DESTDIR="$(PKG_INSTALL_DIR)" \
42                 $(MAKE_FLAGS) \
43                 samtool
44 endef
45
46 define Package/snortsam/install
47         $(INSTALL_DIR) $(1)/usr/sbin
48         $(CP) $(PKG_BUILD_DIR)/snortsam $(PKG_BUILD_DIR)/samtool $(1)/usr/sbin/
49         $(INSTALL_DIR) $(1)/etc
50         $(CP) $(PKG_BUILD_DIR)/conf/* $(1)/etc/
51         $(CP) $(PKG_BUILD_DIR)/conf/snortsam.conf.sample $(1)/etc/snortsam.conf
52         $(INSTALL_DIR) $(1)/etc/init.d
53         $(INSTALL_BIN) ./files/snortsam.init $(1)/etc/init.d/snortsam
54 endef
55
56 $(eval $(call BuildPackage,snortsam))