dfb243c50c46aa645790b84fb3379d36610a1d9c
[openwrt/svn-archive/archive.git] / net / iptables-snmp / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=iptables-snmp
11 PKG_VERSION:=0.1
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=8370d2f0c899461a053da491400119d1
14
15 PKG_SOURCE_URL:=http://www.nobiscuit.com/iptables-snmp
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_CAT:=zcat
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/iptables-snmp
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+snmpd
28 TITLE:=An snmpd plugin to access iptables rules
29 DESCRIPTION:=This is a plugin that makes iptables rules accessable from snmpd.
30 URL:=http://www.nobiscuit.com/iptables-snmp/
31 endef
32
33 define Build/Configure
34 $(call Build/Configure/Default)
35 endef
36
37 define Build/Compile
38 rm -rf $(PKG_INSTALL_DIR)
39 mkdir -p $(PKG_INSTALL_DIR)
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
42 all install
43 endef
44
45 define Package/iptables-snmp/install
46 install -d -m0755 $(1)/usr/lib
47 $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables-snmp.so $(1)/usr/lib
48 endef
49
50 $(eval $(call BuildPackage,iptables-snmp))