mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
83 lines
2.3 KiB
Makefile
83 lines
2.3 KiB
Makefile
#
|
|
# Copyright (C) 2023 IOPSYS
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=timemngr
|
|
PKG_VERSION:=1.1.0
|
|
|
|
LOCAL_DEV:=0
|
|
ifneq ($(LOCAL_DEV),1)
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/timemngr.git
|
|
PKG_SOURCE_VERSION:=524495fc46987eab80eacdd5f2349b2fbd5efb23
|
|
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 $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
|
|
|
|
#RSTRIP:=:
|
|
|
|
define Package/$(PKG_NAME)
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
SUBMENU:=TRx69
|
|
TITLE:=Time manager daemon based on ntpd
|
|
DEPENDS:=+bbfdmd +ntpd +libuci +libubox +ubus +libbbfdm-api +libbbfdm-ubus +@BUSYBOX_CONFIG_PGREP
|
|
MENU:=1
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/config
|
|
source "$(SOURCE)/Config.in"
|
|
endef
|
|
|
|
MAKE_PATH:=src
|
|
|
|
define Package/$(PKG_NAME)/description
|
|
Manage device time with ntpd and provides Device.Time. datamodel object based on TR181-2.16
|
|
endef
|
|
|
|
ifeq ($(LOCAL_DEV),1)
|
|
define Build/Prepare
|
|
$(CP) -rf ~/git/timemngr/* $(PKG_BUILD_DIR)/
|
|
endef
|
|
endif
|
|
|
|
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
|
|
|
|
define Package/$(PKG_NAME)/install
|
|
$(INSTALL_DIR) $(1)/etc/timemngr/
|
|
$(INSTALL_DIR) $(1)/etc/config/
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/ntp
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
|
ifeq ($(CONFIG_TIMEMNGR_LEGACY_DM),y)
|
|
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/dm_time_legacy.so $(1) $(PKG_NAME)
|
|
else
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/timemngr $(1)/usr/sbin/timemngr
|
|
ifeq ($(CONFIG_TIMEMNGR_MIGRATE_SYSTEM),y)
|
|
$(INSTALL_BIN) ./files/etc/uci-defaults/96-system-ntp-migrate $(1)/etc/uci-defaults/
|
|
endif
|
|
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/21-timemngr $(1)/etc/hotplug.d/iface/
|
|
$(INSTALL_BIN) ./files/etc/hotplug.d/ntp/40-firstUseDate $(1)/etc/hotplug.d/ntp/
|
|
$(INSTALL_BIN) ./files/etc/init.d/timemngr $(1)/etc/init.d/
|
|
$(INSTALL_DATA) ./files/etc/config/time $(1)/etc/config/
|
|
ifeq ($(CONFIG_TIMEMNGR_NTPD),y)
|
|
$(CP) ./files/etc/timemngr/ntpd_config.sh $(1)/etc/timemngr/time.sh
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(CONFIG_TIMEMNGR_VENDOR_EXTENSIONS),y)
|
|
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libtimeext.so $(1) $(PKG_NAME)
|
|
endif
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,$(PKG_NAME)))
|