Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / lang / python / micropython / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=micropython
11 PKG_VERSION=1.8.6-$(PKG_SOURCE_VERSION)
12 PKG_RELEASE:=1
13
14 PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
15 PKG_LICENSE:=MIT
16 PKG_LICENSE_FILES:=LICENSE
17
18 PKG_SOURCE_PROTO:=git
19 PKG_SOURCE_URL:=https://github.com/micropython/micropython.git
20 PKG_SOURCE_VERSION:=5a1d63fc14dae788f705403a43c2d8639b7dd9cd
21
22 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
23 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
24 PKG_MIRROR_HASH:=cd431a94664277ac3f80a25b3f6ebc415b281c9265faad154bd0b3fbe638167e
25 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
26 PKG_BUILD_PARALLEL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/micropython
31 SUBMENU:=Python
32 SECTION:=lang
33 CATEGORY:=Languages
34 TITLE:=Micro Python
35 URL:=http://micropython.org
36 DEPENDS:=+libffi
37 endef
38
39 define Package/micropython/description
40 This package contains Micro Python, a lean and fast implementation of the Python 3.4 programming language
41 that is optimised to run on a microcontroller (and low power computers).
42 endef
43
44
45 MAKE_FLAGS += -C $(PKG_BUILD_DIR)/unix
46
47 define Build/Compile
48 $(call Build/Compile/Default,axtls)
49 $(call Build/Compile/Default)
50
51 endef
52
53 define Package/micropython/install
54 $(INSTALL_DIR) $(1)/usr/bin
55 $(INSTALL_BIN) $(PKG_BUILD_DIR)/unix/micropython $(1)/usr/bin/micropython
56 endef
57
58 $(eval $(call BuildPackage,micropython))