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.

59 lines
1.6 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-gateway
  6. PKG_VERSION:=1.16.2
  7. PKG_RELEASE:=1
  8. PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-gateway/tar.gz/v$(PKG_VERSION)?
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_HASH:=9d3208bf4cffec507d992485104fcbba2b9bc02cf7b290dfe13f98e5916ee1ca
  11. PKG_LICENSE:=MIT
  12. PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
  13. PKG_BUILD_DIR:=$(BUILD_DIR)/bch-gateway-$(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-gateway
  21. TITLE:=BigCLown gateway
  22. DEPENDS:= \
  23. +kmod-usb-serial-ftdi \
  24. +kmod-usb-acm \
  25. +python3-click-log \
  26. +python3-paho-mqtt \
  27. +python3-pyserial \
  28. +python3-yaml \
  29. +python3-simplejson \
  30. +python3-schema \
  31. +python3-appdirs
  32. endef
  33. define Py3Package/$(PKG_NAME)/install
  34. $(INSTALL_DIR) $(1)/usr/bin
  35. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  36. $(INSTALL_DIR) $(1)/etc/config
  37. $(INSTALL_CONF) ./files/config $(1)/etc/config/bigclown-gateway
  38. $(INSTALL_DIR) $(1)/etc/init.d
  39. $(INSTALL_BIN) ./files/init $(1)/etc/init.d/bigclown-gateway
  40. endef
  41. define Package/$(PKG_NAME)/conffiles
  42. /etc/config/bigclown-gateway
  43. endef
  44. define Build/Compile
  45. sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
  46. $(call Py3Build/Compile/Default)
  47. endef
  48. $(eval $(call Py3Package,$(PKG_NAME)))
  49. $(eval $(call BuildPackage,$(PKG_NAME)))