2 # Copyright (C) 2012 OpenWrt
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
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)
20 include $(INCLUDE_DIR)/package.mk
22 define Package/snortsam
27 URL:=https://www.snortsam.net/
28 DEPENDS:=+libpthread +snort
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.
36 $(MAKE) -C $(PKG_BUILD_DIR)/src \
37 DESTDIR="$(PKG_INSTALL_DIR)" \
40 $(MAKE) -C $(PKG_BUILD_DIR)/src \
41 DESTDIR="$(PKG_INSTALL_DIR)" \
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
56 $(eval $(call BuildPackage,snortsam))