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.

58 lines
1.5 KiB

  1. #
  2. # Copyright (C) 2008-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=micropython
  9. PKG_VERSION=1.9.2-$(PKG_SOURCE_VERSION)
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
  12. PKG_LICENSE:=MIT
  13. PKG_LICENSE_FILES:=LICENSE
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_URL:=https://github.com/micropython/micropython.git
  16. PKG_SOURCE_VERSION:=1f78e7a43130acfa4bedf16c1007a1b0f37c75c3
  17. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
  19. PKG_MIRROR_HASH:=18234ffd1e91ac461080b4213399a6a18d4163fe314782b2e6ffbd1bfe48537b
  20. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
  21. PKG_BUILD_PARALLEL:=1
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/micropython
  24. SUBMENU:=Python
  25. SECTION:=lang
  26. CATEGORY:=Languages
  27. TITLE:=Micro Python
  28. URL:=http://micropython.org
  29. DEPENDS:=+libffi
  30. endef
  31. define Package/micropython/description
  32. This package contains Micro Python, a lean and fast implementation of the Python 3.4 programming language
  33. that is optimised to run on a microcontroller (and low power computers).
  34. endef
  35. MAKE_FLAGS += -C $(PKG_BUILD_DIR)/unix FROZEN_MPY_DIR=
  36. define Build/Compile
  37. $(call Build/Compile/Default,axtls)
  38. $(call Build/Compile/Default)
  39. endef
  40. define Package/micropython/install
  41. $(INSTALL_DIR) $(1)/usr/bin
  42. $(INSTALL_BIN) $(PKG_BUILD_DIR)/unix/micropython $(1)/usr/bin/micropython
  43. endef
  44. $(eval $(call BuildPackage,micropython))