mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
ieee1905: Added new package
This commit is contained in:
parent
6fe9ad271e
commit
b2fce09a7f
2 changed files with 69 additions and 0 deletions
45
ieee1905/Makefile
Normal file
45
ieee1905/Makefile
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# Copyright (C) 2019 Iopsys
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ieee1905
|
||||
PKG_VERSION:=1.0.0
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=0f32eabc1a79c6c41dd9e6ae7c231ae73071dc39
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ieee1905
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=IEEE1905 parser
|
||||
DEPENDS:=+libubox +libubus
|
||||
endef
|
||||
|
||||
define Package/ieee1905/description
|
||||
Listens to ieee1905 messages, parse and expose them over ubus.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
#define Build/Prepare
|
||||
# $(CP) -rf ./ieee1905/* $(PKG_BUILD_DIR)/
|
||||
#endef
|
||||
|
||||
define Package/ieee1905/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/etc/init.d/ieee1905 $(1)/etc/init.d/ieee1905
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ieee1905 $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ieee1905))
|
||||
24
ieee1905/files/etc/init.d/ieee1905
Normal file
24
ieee1905/files/etc/init.d/ieee1905
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/ieee1905
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_config_trigger "config.change" "ieee1905" /etc/init.d/ieee1905 restart
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue