You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.5 KiB

  1. # This is free software, licensed under the GNU General Public License v2.
  2. # See /LICENSE for more information.
  3. #
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=bigclown-mqtt2influxdb
  6. PKG_VERSION:=1.1.0
  7. PKG_RELEASE:=1
  8. PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-mqtt2influxdb/tar.gz/v$(PKG_VERSION)?
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_HASH:=5be14132311e85215abbfd732fe6cd652522ea0a343ee8ba7abab3ec7578eb99
  11. PKG_LICENSE:=MIT
  12. PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
  13. PKG_BUILD_DIR:=$(BUILD_DIR)/bch-mqtt2influxdb-$(PKG_VERSION)
  14. include $(INCLUDE_DIR)/package.mk
  15. include ../../../lang/python/python3-package.mk
  16. define Package/$(PKG_NAME)
  17. SECTION:=utils
  18. CATEGORY:=Utilities
  19. SUBMENU:=BigClown
  20. URL:=https://github.com/bigclownlabs/bch-mqtt2influxdb
  21. TITLE:=BigCLown MQTT to Influxdb bridge
  22. DEPENDS:=+python3-paho-mqtt +python3-yaml +python3-influxdb +python3-jsonpath-ng +python3-schema
  23. endef
  24. define Py3Package/$(PKG_NAME)/install
  25. $(INSTALL_DIR) $(1)/usr/bin
  26. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  27. $(INSTALL_DIR) $(1)/etc/init.d
  28. $(INSTALL_BIN) ./files/init $(1)/etc/init.d/bigclown-mqtt2influxdb
  29. $(INSTALL_DATA) ./files/config.yml $(1)/etc/bigclown-mqtt2influxdb.yml
  30. endef
  31. define Package/$(PKG_NAME)/conffiles
  32. /etc/bigclown-mqtt2influxdb.yml
  33. endef
  34. define Build/Compile
  35. sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
  36. $(call Py3Build/Compile/Default)
  37. endef
  38. $(eval $(call Py3Package,$(PKG_NAME)))
  39. $(eval $(call BuildPackage,$(PKG_NAME)))