Merge pull request #18472 from sotux/master
[feed/packages.git] / lang / python / micropython-lib / 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-lib
11 PKG_RELEASE:=1
12
13 PKG_SOURCE_PROTO:=git
14 PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git
15 PKG_SOURCE_VERSION:=0c31e0b3d712fcd21982daec8bfca48ad5527a72
16 PKG_SOURCE_DATE:=20220324
17 PKG_MIRROR_HASH:=fb796c6d648e555e3e5233a3aec84be1692199b2cbae1efd7c22caf2a8c3f8f7
18
19 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
20 PKG_LICENSE:=MIT PSF-2.0
21 PKG_LICENSE_FILES:=LICENSE
22
23 PKG_BUILD_PARALLEL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/micropython-lib
28 SUBMENU:=Python
29 SECTION:=lang
30 CATEGORY:=Languages
31 TITLE:=micropython-lib
32 URL:=https://github.com/micropython/micropython-lib
33 DEPENDS:=+micropython
34 endef
35
36 define Package/micropython-lib/description
37 This is a repository of libraries designed to be useful for writing
38 MicroPython applications.
39 endef
40
41 Build/Compile:=:
42
43 define Package/micropython-lib/install
44 for dir in micropython python-ecosys python-stdlib unix-ffi; do \
45 $(INSTALL_DIR) $(1)/usr/lib/micropython/$$$$dir ; \
46 $(CP) $(PKG_BUILD_DIR)/$$$$dir/* $(1)/usr/lib/micropython/$$$$dir/ ; \
47 done
48 $(FIND) $(1)/usr/lib/micropython \
49 -not -type d \( -not -name '*.py' -o -name 'test_*' -o -name 'setup.py' \) -delete
50 $(FIND) $(1)/usr/lib/micropython -mindepth 1 -empty -type d -delete
51 endef
52
53 $(eval $(call BuildPackage,micropython-lib))