57 lines
1.3 KiB
Makefile
57 lines
1.3 KiB
Makefile
include $(TOPDIR)/rules.mk
|
|
|
|
# Name and release number of this package
|
|
PKG_NAME:=libmijia
|
|
PKG_VERSION:=3.3.11
|
|
|
|
PKG_BUILD_DIR:=$(COMPILE_DIR)/$(PKG_NAME)
|
|
|
|
include $(BUILD_DIR)/package.mk
|
|
|
|
define Package/$(PKG_NAME)
|
|
SECTION:=libs
|
|
CATEGORY:=Libraries
|
|
TITLE:=MIJIA IOT Library
|
|
DEPENDS:=
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/config
|
|
source "$(SOURCE)/Config.in"
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/description
|
|
This is MIJIA IoT Support
|
|
endef
|
|
|
|
define Build/Prepare
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
$(CP) -d ./lib/* $(PKG_BUILD_DIR)/
|
|
endef
|
|
|
|
define Build/Compile
|
|
endef
|
|
|
|
ifeq ('$(CONFIG_LIBMIJIA_SOCKET)', 'y')
|
|
define Package/$(PKG_NAME)/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_DIR) $(1)/etc/miio
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/socket/usr/lib/* $(1)/usr/lib
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/socket/usr/bin/* $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/socket/etc/miio/* $(1)/etc/miio
|
|
endef
|
|
endif
|
|
|
|
ifeq ('$(CONFIG_LIBMIJIA_MQTT)', 'y')
|
|
define Package/$(PKG_NAME)/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_DIR) $(1)/etc/miio
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/mosquitto/usr/lib/* $(1)/usr/lib
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mosquitto/usr/bin/* $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mosquitto/etc/miio/* $(1)/etc/miio
|
|
endef
|
|
endif
|
|
|
|
$(eval $(call BuildPackage,$(PKG_NAME)))
|