From 5dd4c869a5ec48ea6ec8b9538f28ae0de1544790 Mon Sep 17 00:00:00 2001 From: Omar Kallel Date: Thu, 30 Nov 2017 16:25:46 +0100 Subject: [PATCH] Makefile and Config files of new icwmp version --- icwmp/{Config.in => Config_cwmp.in} | 24 ++---------- icwmp/Config_datamodel.in | 31 ++++++++++++++++ icwmp/Makefile | 57 +++++++++++++++++++++++------ 3 files changed, 81 insertions(+), 31 deletions(-) rename icwmp/{Config.in => Config_cwmp.in} (64%) mode change 100644 => 100755 create mode 100755 icwmp/Config_datamodel.in diff --git a/icwmp/Config.in b/icwmp/Config_cwmp.in old mode 100644 new mode 100755 similarity index 64% rename from icwmp/Config.in rename to icwmp/Config_cwmp.in index ee340617f..7c5478f6d --- a/icwmp/Config.in +++ b/icwmp/Config_cwmp.in @@ -15,33 +15,17 @@ config CWMP_ACS_HDM bool "HDM" endchoice -choice - prompt "Select Data Model" - default tr098 - -config DATAMODEL_TR098 - bool "TR-098" - -config DATAMODEL_TR181 - bool "TR-181" -endchoice - config CWMP_DEBUG bool "Compile with debug options" default y -choice - prompt "enable xmpp feature" - default disable - -config XMPP_DISABLE - bool "disable" - config XMPP_ENABLE - bool "enable" -endchoice + bool "enable xmpp feature" + default n + config CWMP_DEVEL_DEBUG bool "Compile with development debug options" default n endif + diff --git a/icwmp/Config_datamodel.in b/icwmp/Config_datamodel.in new file mode 100755 index 000000000..7c5478f6d --- /dev/null +++ b/icwmp/Config_datamodel.in @@ -0,0 +1,31 @@ +if PACKAGE_icwmp-curl || PACKAGE_icwmp-zstream + +config CWMP_SCRIPTS_FULL + bool "Install all icwmp scripts" + default y + +choice + prompt "Select ACS sever" + default CWMP_ACS_MULTI + +config CWMP_ACS_MULTI + bool "No specific ACS, follow standard" + +config CWMP_ACS_HDM + bool "HDM" +endchoice + +config CWMP_DEBUG + bool "Compile with debug options" + default y + +config XMPP_ENABLE + bool "enable xmpp feature" + default n + +config CWMP_DEVEL_DEBUG + bool "Compile with development debug options" + default n + +endif + diff --git a/icwmp/Makefile b/icwmp/Makefile index 7e6de5275..a33f1b62b 100755 --- a/icwmp/Makefile +++ b/icwmp/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=icwmp -PKG_VERSION:=3.0-2017-11-24 +PKG_VERSION:=3.0-2017-01-30 PKG_FIXUP:=autoreconf PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=d74b88913f676ebf9a210c4674555d080e57ff52 +PKG_SOURCE_VERSION:=3cd337122a6f66355ca973aea2be305db1621bdb PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) @@ -30,11 +30,19 @@ CWMP_REVISION=$(shell svnversion ./src/ -n|cut -f2 -d:) include $(INCLUDE_DIR)/package.mk +define Package/libdatamodel + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Library for broadband-forum data model + DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +endef + + define Package/icwmp/Default SECTION:=utils CATEGORY:=Utilities TITLE:=CWMP client - DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +libexpat +libstrophe +curl +libtrace + DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +libexpat +libstrophe +curl +libtrace +libdatamodel endef define Package/icwmp/description @@ -56,7 +64,11 @@ define Package/icwmp-zstream endef define Package/icwmp-zstream/config - source "$(SOURCE)/Config.in" + source "$(SOURCE)/Config_cwmp.in" +endef + +define Package/libdatamodel/config + source "$(SOURCE)/Config_datamodel.in" endef USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1) @@ -89,9 +101,18 @@ CONFIGURE_ARGS += \ --with-uci-include-path=$(STAGING_DIR)/usr/include \ --with-libubox-include-path=$(STAGING_DIR)/usr/include \ --with-libubus-include-path=$(STAGING_DIR)/usr/include + +ifeq ($(CONFIG_UPNP_TR064),y) +CONFIGURE_ARGS += \ + --enable-upnptr064 +endif + +ifeq ($(CONFIG_XMPP_ENABLE),y) +CONFIGURE_ARGS += \ + --enable-xmpp +endif CONFIGURE_ARGS += $(if $(CONFIG_DATAMODEL_TR181),--enable-datamodel=tr181,--enable-datamodel=tr098) -CONFIGURE_ARGS += $(if $(CONFIG_XMPP_ENABLE),--enable-xmpp=enable,--enable-xmpp=disable) ifeq ($(BUILD_VARIANT),zstream) CONFIGURE_ARGS += \ @@ -124,30 +145,43 @@ CONFIGURE_ARGS += \ --enable-devel endif +define Package/libdatamodel/install + $(INSTALL_DIR) $(1)/lib + $(CP) $(PKG_BUILD_DIR)/bin/.libs/libdatamodel.so* $(1)/lib/ +endef + define Package/icwmp-$(BUILD_VARIANT)/install $(INSTALL_DIR) $(1)/etc/icwmpd - $(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/icwmpd $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/bin/icwmpd $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/bin/.libs/icwmpd $(1)/usr/sbin $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp $(1)/etc/config + $(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/icwmpd $(INSTALL_CONF) $(PKG_BUILD_DIR)/config/firewall.cwmp $(1)/etc/firewall.cwmp $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmpd.init $(1)/etc/init.d/icwmpd $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmpd.init $(1)/etc/init.d/icwmpd $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/90-cwmpfirewall - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(CP) ./files/icwmp.hotplug $(1)/etc/hotplug.d/iface/90-icwmp ifeq ($(CONFIG_CWMP_SCRIPTS_FULL),y) $(INSTALL_DIR) $(1)/usr/share/icwmp $(CP) $(PKG_BUILD_DIR)/scripts/defaults $(1)/usr/share/icwmp $(CP) $(PKG_BUILD_DIR)/scripts/functions $(1)/usr/share/icwmp $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/icwmp.sh $(1)/usr/sbin/icwmp - $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/iwepkeygen $(1)/usr/sbin/iwepkeygen endif endef +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_DIR) $(1)/usr/include/libdatamodel + $(CP) $(PKG_BUILD_DIR)/dm/*.h $(1)/usr/include/libdatamodel + $(CP) $(PKG_BUILD_DIR)/dm/dmtree/common/root.h $(1)/usr/include/libdatamodel + $(INSTALL_DIR) $(1)/lib + $(CP) $(PKG_BUILD_DIR)/bin/.libs/libdatamodel.so* $(1)/lib + $(CP) $(PKG_BUILD_DIR)/bin/.libs/libdatamodel.a $(1)/lib +endef + + define Package/icwmp-$(BUILD_VARIANT)/postinst #!/bin/sh echo "$(CWMP_BKP_FILE)" >> $${IPKG_INSTROOT}/etc/sysupgrade.conf @@ -169,4 +203,5 @@ endef $(eval $(call BuildPackage,icwmp-curl)) +$(eval $(call BuildPackage,libdatamodel)) $(eval $(call BuildPackage,icwmp-zstream))