blob: 530b1fabe0afb62be40d16213b1e372befc39dc7 [file] [log] [blame]
#
# Copyright (C) 2007-2021 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk
PKG_NAME:=mbtk-rootfs
PKG_VERSION:=1.0
PKG_RELEASE:=1
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
SVC_SOURCE_DIR:=$(TOPDIR)/mbtk/rootfs
PKG_SOURCE_DIR:=$(SVC_SOURCE_DIR) $(STAGING_DIR)/usr/include $(STAGING_DIR)/usr/lib
ROOTFS_DIR:=$(BUILD_DIR)/root-mmp
PKG_BUILD_PARALLEL:=0
include $(INCLUDE_DIR)/package.mk
define Package/mbtk-rootfs
SECTION:=mbtk-rootfs
CATEGORY:=service
TITLE:=MBTK rootfs solution
DEPENDS:= +liblog +libubox +libubus +audio_if +libjson-c +zlib +libopenssl +libblobmsg-json
endef
define Package/$(PKG_NAME)/extra_provides
echo "libc.so"; \
echo "libdnet.so.1"; \
echo "cfg80211.ko"; \
echo "libhttpclient.so"; \
echo "libc.so.6"; \
echo "librt.so.1";
endef
define Package/mbtk-rootfs/description
mbtk-rootfs
endef
define Build/Compile
@echo "Do nothing."
endef
define Build/Clean
@echo "Do nothing."
endef
define Build/InstallDev
@echo "InstallDev-1 $(1)"
@echo "InstallDev-2 $(PKG_BUILD_DIR)"
@echo "InstallDev-3 $(PKG_SOURCE_DIR)"
@echo "InstallDev-4 $(SVC_SOURCE_DIR)"
@echo "InstallDev-5 $(STAGING_DIR)"
@echo "InstallDev-6 $(ROOTFS_DIR)"
$(INSTALL_DIR) $(ROOTFS_DIR)/lib
$(INSTALL_DIR) $(ROOTFS_DIR)/bin
$(INSTALL_DIR) $(ROOTFS_DIR)/etc
$(INSTALL_DIR) $(ROOTFS_DIR)/usr
$(CP) -rf $(PKG_BUILD_DIR)/ipkg-asr*/$(PKG_NAME)/* $(ROOTFS_DIR)/
#$(CP) -rf $(PKG_BUILD_DIR)/ipkg-asr1806/$(PKG_NAME)/lib/* $(ROOTFS_DIR)/lib/
#$(CP) -rf $(PKG_BUILD_DIR)/ipkg-asr1806/$(PKG_NAME)/bin/* $(ROOTFS_DIR)/bin/
#$(CP) -rf $(PKG_BUILD_DIR)/ipkg-asr1806/$(PKG_NAME)/etc/* $(ROOTFS_DIR)/etc/
endef
define Package/mbtk-rootfs/install
@echo "install-1 $(1)"
@echo "install-2 $(PKG_BUILD_DIR)"
@echo "install-3 $(PKG_SOURCE_DIR)"
@echo "install-4 $(SVC_SOURCE_DIR)"
@echo "install-5 $(STAGING_DIR)"
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/bin
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/usr
$(CP) -rf $(SVC_SOURCE_DIR)/* $(1)/
#$(CP) -rf $(SVC_SOURCE_DIR)/lib/* $(1)/lib/
#$(CP) -rf $(SVC_SOURCE_DIR)/bin/* $(1)/bin/
#$(CP) -rf $(SVC_SOURCE_DIR)/etc/* $(1)/etc/
endef
$(eval $(call BuildPackage,mbtk-rootfs))