mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
dnsmngr: add Makefile and files for dnsmngr package
This commit is contained in:
parent
63fd69ad75
commit
1700c3fa19
3 changed files with 78 additions and 0 deletions
50
dnsmngr/Makefile
Normal file
50
dnsmngr/Makefile
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
#
|
||||
# Copyright (C) 2022-2024 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dnsmngr
|
||||
PKG_VERSION:=1.0.0
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dnsmngr.git
|
||||
PKG_SOURCE_VERSION:=3abb2b026c697b63f574bdc619e912e85ea55115
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../bbfdm/bbfdm.mk
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/dnsmngr
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +dnsmasq +umdns
|
||||
TITLE:=Package to add Device.DNS. datamodel support
|
||||
endef
|
||||
|
||||
define Package/dnsmngr/description
|
||||
Package to add Device.DNS. datamodel support.
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/dnsmngr/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/dnsmngr/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/etc/dnsmngr
|
||||
$(CP) $(PKG_BUILD_DIR)/src/libdnsmngr.so $(1)/etc/dnsmngr
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dnsmngr))
|
||||
15
dnsmngr/files/etc/dnsmngr/input.json
Executable file
15
dnsmngr/files/etc/dnsmngr/input.json
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"daemon": {
|
||||
"input": {
|
||||
"type": "DotSo",
|
||||
"name": "/etc/dnsmngr/libdnsmngr.so"
|
||||
},
|
||||
"output": {
|
||||
"type": "UBUS",
|
||||
"name": "bbfdm.dns.",
|
||||
"parent_dm": "Device.",
|
||||
"object": "DNS",
|
||||
"root_obj": "bbfdm"
|
||||
}
|
||||
}
|
||||
}
|
||||
13
dnsmngr/files/etc/init.d/dnsmngr
Executable file
13
dnsmngr/files/etc/init.d/dnsmngr
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=61
|
||||
STOP=01
|
||||
|
||||
. /etc/bbfdm/bbfdm_services.sh
|
||||
|
||||
USE_PROCD=1
|
||||
DNSMNGR_JSON_INPUT="/etc/dnsmngr/input.json"
|
||||
|
||||
start_service() {
|
||||
bbfdm_add_service "bbfdm.dnsmngr" "${DNSMNGR_JSON_INPUT}"
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue