2 # Copyright (C) 2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_VERSION
:=2014-08-13
12 PKG_RELEASE
=$(PKG_SOURCE_VERSION
)
15 PKG_SOURCE_URL
:=https
://github.com
/credosemi
/smartsnmp.git
16 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_SOURCE_VERSION
:=fb93473d895f058b2d8975d3cfa280ae2a8ae98d
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.gz
22 PKG_MAINTAINER
:=Xiongfei Guo
<xfguo@credosemi.com
>
24 PKG_LICENSE_FILES
:=LICENSE
27 include $(INCLUDE_DIR
)/package.mk
28 include $(INCLUDE_DIR
)/scons.mk
30 define Package
/smartsnmpd
33 DEPENDS
+=+lua
+liblua
+libubox
+libuci-lua
+libubus-lua
34 TITLE
:=Smart-SNMP
(Agent
)
35 URL
:=https
://github.com
/credosemi
/smartsnmp
38 define Package
/smartsnmpd
/description
39 smartsnmpd is an implementation of SNMP Agent. Its goal is
"Easily
40 writing boring SNMP MIB with Lua". This package add native support
41 for OpenWrt. Include using ubus and uci to
get system
info/status.
42 And
, it use libubox
/uloop
as low level event-driven library.
45 SCONS_OPTIONS
+= --transport
=uloop
47 define Build
/Configure
48 (cd
$(PKG_BUILD_DIR
); \
56 define Package
/smartsnmpd
/install
57 $(INSTALL_DIR
) $(1)/usr
/sbin
58 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/bin
/smartsnmpd
$(1)/usr
/sbin
/smartsnmpd
60 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/smartsnmp
61 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/build
/smartsnmp
/core.so
$(1)/usr
/lib
/lua
/smartsnmp
/core.so
62 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lualib
/smartsnmp
/*.lua
$(1)/usr
/lib
/lua
/smartsnmp
/
64 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/smartsnmp
/mibs
65 $(INSTALL_BIN
) .
/files
/mibs
/*.lua
$(1)/usr
/lib
/lua
/smartsnmp
/mibs
/
67 $(INSTALL_DIR
) $(1)/etc
/config
68 $(INSTALL_DATA
) .
/files
/smartsnmpd.conf
$(1)/etc
/config
/smartsnmpd
70 $(INSTALL_DIR
) $(1)/etc
/init.d
71 $(INSTALL_BIN
) .
/files
/smartsnmpd.init
$(1)/etc
/init.d
/smartsnmpd
74 $(eval
$(call BuildPackage
,smartsnmpd
))