2 # Copyright (C) 2015-2018 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://codeload.github.com
/eclipse
/mraa
/tar.gz
/v
$(PKG_VERSION
)?
16 PKG_HASH
:=076669bee8423ffef3065735b293a329020be86630fea457174dbfcc67a0554a
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/mraa-
$(PKG_VERSION
)
19 PKG_MAINTAINER
:=John Crispin
<blogic@openwrt.org
>, Hirokazu MORIKAWA
<morikw2@gmail.com
>
21 PKG_LICENSE_FILES
:=COPYING
23 PKG_BUILD_DEPENDS
:=swig
/host node
/host PACKAGE_node
:node
28 include $(INCLUDE_DIR
)/package.mk
29 include ..
/..
/devel
/ninja
/ninja-cmake.mk
30 include ..
/..
/lang
/python
/python3-package.mk
34 -DBUILDSWIGNODE
=$(if
$(CONFIG_PACKAGE_libmraa-node
),ON
,OFF
) \
37 define Package
/libmraa
/Default
41 TITLE
:=Eclipse MRAA lowlevel IO library
42 URL
:=https
://projects.eclipse.org
/projects
/iot.mraa
45 define Package
/libmraa
/Default
/description
46 Libmraa is a C
/C
++ library with bindings to Java
, Python and JavaScript to interface
47 with the IO on Galileo
, Edison
& other platforms
, with a structured and sane API where
48 port names
/numbering matches the board that you are on. Use of libmraa does not tie you
49 to specific hardware with board detection done at runtime you can create portable code
50 that will work across the supported platforms.
53 define Package
/libmraa
54 $(call Package
/libmraa
/Default
)
55 TITLE
:=Eclipse MRAA lowlevel IO C
/C
++ library
56 DEPENDS
:=+libstdcpp
+libjson-c @
!arc @
!armeb @
!powerpc
59 define Package
/libmraa
/description
60 $(call Package
/libmraa
/Default
/description
)
62 This package contains the C
/C
++ libraries.
65 define Package
/libmraa-node
66 $(call Package
/libmraa
/Default
)
67 TITLE
:=Eclipse MRAA lowlevel IO Node.js library
68 DEPENDS
:=+libmraa @PACKAGE_node
71 define Package
/libmraa-node
/description
72 $(call Package
/libmraa
/Default
/description
)
74 This package contains the Node.js libraries.
77 define Package
/libmraa-python3
78 $(call Package
/libmraa
/Default
)
79 TITLE
:=Eclipse MRAA lowlevel IO Python3 library
80 DEPENDS
:=+libmraa
+python3-light
83 define Package
/libmraa-python3
/description
84 $(call Package
/libmraa
/Default
/description
)
86 This package contains the Python3 libraries.
89 define Package
/libmraa
/install
90 $(INSTALL_DIR
) $(1)/usr
/lib
91 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libmraa.so
* $(1)/usr
/lib
/
92 $(INSTALL_DIR
) $(1)/usr
/bin
93 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/mraa-
* $(1)/usr
/bin
/
96 define Package
/libmraa-node
/install
97 $(INSTALL_DIR
) $(1)/usr
/lib
/node
/mraa
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/node_modules
/mraa
/* $(1)/usr
/lib
/node
/mraa
/
101 define Package
/libmraa-python3
/install
102 $(INSTALL_DIR
) $(1)/usr
/lib
/python
$(PYTHON3_VERSION
)/site-packages
103 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/python
$(PYTHON3_VERSION
)/site-packages
/* \
104 $(1)/usr
/lib
/python
$(PYTHON3_VERSION
)/site-packages
/
107 $(eval
$(call BuildPackage
,libmraa
))
108 $(eval
$(call BuildPackage
,libmraa-node
))
109 $(eval
$(call BuildPackage
,libmraa-python3
))