|
| 1 | +include $(TOPDIR)/rules.mk |
| 2 | + |
| 3 | +PKG_NAME:=micropython-drcom |
| 4 | +PKG_RELEASE:=1 |
| 5 | +PKG_LICENSE:=AGPL-3.0 |
| 6 | +PKG_LICENSE_FILE:=LICENSE.md |
| 7 | +PKG_MAINTAINER:=Hagb <hagb_green@qq.com> |
| 8 | + |
| 9 | +include $(INCLUDE_DIR)/package.mk |
| 10 | + |
| 11 | +define Package/micropython-drcom |
| 12 | + SECTION:=net |
| 13 | + CATEGORY:=Network |
| 14 | + TITLE:=DrCOM unofficial client for micropython |
| 15 | + URL:=https://github.com/Hagb/micropython-drcom |
| 16 | + DEPENDS:=+micropython +micropython-lib |
| 17 | + PKGARCH:=all |
| 18 | +endef |
| 19 | + |
| 20 | +define Package/micropython-drcom/description |
| 21 | +DrCOM unofficial client modified from drcom-generic project to run in |
| 22 | +micropython. For smaller size, you can use micropython-drcom-with-lib package |
| 23 | +but not micropython-drcom package with tailored micropython-lib, which can be |
| 24 | +installed without large micropython-lib package. |
| 25 | +endef |
| 26 | + |
| 27 | +define Package/micropython-drcom-with-lib |
| 28 | + SECTION:=net |
| 29 | + CATEGORY:=Network |
| 30 | + TITLE:=DrCOM unofficial client for micropython, with tailored micropython-lib |
| 31 | + URL:=https://github.com/Hagb/micropython-drcom |
| 32 | + DEPENDS:=+micropython |
| 33 | + PKGARCH:=all |
| 34 | +endef |
| 35 | + |
| 36 | +define Package/micropython-drcom-with-lib/description |
| 37 | +DrCOM unofficial client modified from drcom-generic project to run in |
| 38 | +micropython. This package with tailored micropython-lib, can be installed |
| 39 | +without large micropython-lib package. |
| 40 | +endef |
| 41 | + |
| 42 | +define Build/Compile |
| 43 | + true |
| 44 | +endef |
| 45 | + |
| 46 | +define Build/Configure |
| 47 | + true |
| 48 | +endef |
| 49 | + |
| 50 | +define Build/Install |
| 51 | + true |
| 52 | +endef |
| 53 | + |
| 54 | +define Package/micropython-drcom/install |
| 55 | + $(INSTALL_DIR) $(1)/usr/bin/ $(1)/etc/ $(1)/usr/lib/micropython-drcom/ |
| 56 | + $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/drcom-wired $(1)/usr/bin/drcom-wired |
| 57 | + $(INSTALL_CONF) $(PKG_BUILD_DIR)/drcom_wired.conf $(1)/etc/drcom_wired.conf |
| 58 | + $(INSTALL_DATA) $(PKG_BUILD_DIR)/*.py $(1)/usr/lib/micropython-drcom/ |
| 59 | +endef |
| 60 | + |
| 61 | +define Package/micropython-drcom-with-lib/install |
| 62 | + $(call Package/micropython-drcom/install,$(1)) |
| 63 | + $(INSTALL_DIR) $(1)/usr/lib/micropython-drcom/ |
| 64 | + $(CP) -ar $(PKG_BUILD_DIR)/micropython/* $(1)/usr/lib/micropython-drcom/ |
| 65 | +endef |
| 66 | + |
| 67 | +$(eval $(call BuildPackage,micropython-drcom)) |
| 68 | +$(eval $(call BuildPackage,micropython-drcom-with-lib)) |
0 commit comments