mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-01 17:34:40 +01:00
100 lines
2.8 KiB
Makefile
Executable file
100 lines
2.8 KiB
Makefile
Executable file
#
|
|
# Copyright (C) 2021 Iopsys Software Solutions AB
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=icwmp
|
|
PKG_VERSION:=8.2.4-2021-10-13
|
|
PKG_FIXUP:=autoreconf
|
|
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_VERSION:=dd51b8e7706c7f4eaf9e59d09259d218ab1bcb96
|
|
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
|
PKG_MIRROR_HASH:=skip
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_LICENSE:=GPLv2
|
|
PKG_LICENSE_FILES:=COPYING
|
|
|
|
PKG_CONFIG_DEPENDS:= \
|
|
CONFIG_CWMP_ACS_MULTI \
|
|
CONFIG_CWMP_ACS_HDM \
|
|
CONFIG_CWMP_DEBUG \
|
|
CONFIG_CWMP_DEVEL_DEBUG
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/$(PKG_NAME)
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
SUBMENU:=TRx69
|
|
TITLE:=CWMP client
|
|
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +curl +libcurl
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/description
|
|
A free client implementation of CWMP (TR-069) protocol
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/config
|
|
source "$(SOURCE)/Config_cwmp.in"
|
|
endef
|
|
|
|
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
|
|
ifneq ($(USE_LOCAL),)
|
|
define Build/Prepare
|
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
|
endef
|
|
endif
|
|
|
|
TARGET_CFLAGS += \
|
|
-D_GNU_SOURCE \
|
|
"-DCWMP_REVISION=\\\"$(PKG_SOURCE_VERSION)\\\""
|
|
|
|
ifeq ($(CONFIG_CWMP_ACS_MULTI),y)
|
|
CONFIGURE_ARGS += \
|
|
--enable-acs=multi
|
|
endif
|
|
|
|
ifeq ($(CONFIG_CWMP_ACS_HDM),y)
|
|
CONFIGURE_ARGS += \
|
|
--enable-acs=hdm
|
|
endif
|
|
|
|
ifeq ($(CONFIG_CWMP_DEBUG),y)
|
|
CONFIGURE_ARGS += \
|
|
--enable-debug
|
|
endif
|
|
|
|
ifeq ($(CONFIG_CWMP_DEVEL_DEBUG),y)
|
|
CONFIGURE_ARGS += \
|
|
--enable-devel
|
|
endif
|
|
|
|
define Package/$(PKG_NAME)/install
|
|
$(INSTALL_DIR) $(1)/etc/icwmpd
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
|
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/icwmpd $(1)/usr/sbin/icwmpd
|
|
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
|
|
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
|
|
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/90-icwmp $(1)/etc/hotplug.d/iface/90-icwmp
|
|
$(INSTALL_BIN) ./files/etc/init.d/icwmpd $(1)/etc/init.d/icwmpd
|
|
$(INSTALL_BIN) ./files/etc/uci-defaults/85-cwmp-set-userid $(1)/etc/uci-defaults/
|
|
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
|
|
$(INSTALL_BIN) ./files/etc/uci-defaults/90-icwmp-set-dhcp-reqopts $(1)/etc/uci-defaults/
|
|
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,$(PKG_NAME)))
|