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 $(INCLUDE_DIR
)/cmake.mk
30 include ..
/..
/lang
/python
/python3-package.mk
32 CMAKE_OPTIONS
=-DENABLEEXAMPLES
=0 \
33 -DBUILDSWIGNODE
=$(if
$(CONFIG_PACKAGE_libmraa-node
),ON
,OFF
) \
36 define Package
/libmraa
/Default
40 TITLE
:=Eclipse MRAA lowlevel IO library
41 URL
:=https
://projects.eclipse.org
/projects
/iot.mraa
44 define Package
/libmraa
/Default
/description
45 Libmraa is a C
/C
++ library with bindings to Java
, Python and JavaScript to interface
46 with the IO on Galileo
, Edison
& other platforms
, with a structured and sane API where
47 port names
/numbering matches the board that you are on. Use of libmraa does not tie you
48 to specific hardware with board detection done at runtime you can create portable code
49 that will work across the supported platforms.
52 define Package
/libmraa
53 $(call Package
/libmraa
/Default
)
54 TITLE
:=Eclipse MRAA lowlevel IO C
/C
++ library
55 DEPENDS
:=+libstdcpp
+libjson-c @
!arc @
!armeb @
!powerpc
58 define Package
/libmraa
/description
59 $(call Package
/libmraa
/Default
/description
)
61 This package contains the C
/C
++ libraries.
64 define Package
/libmraa-node
65 $(call Package
/libmraa
/Default
)
66 TITLE
:=Eclipse MRAA lowlevel IO Node.js library
67 DEPENDS
:=+libmraa @PACKAGE_node
70 define Package
/libmraa-node
/description
71 $(call Package
/libmraa
/Default
/description
)
73 This package contains the Node.js libraries.
76 define Package
/libmraa-python3
77 $(call Package
/libmraa
/Default
)
78 TITLE
:=Eclipse MRAA lowlevel IO Python3 library
79 DEPENDS
:=+libmraa
+python3-light
82 define Package
/libmraa-python3
/description
83 $(call Package
/libmraa
/Default
/description
)
85 This package contains the Python3 libraries.
88 define Package
/libmraa
/install
89 $(INSTALL_DIR
) $(1)/usr
/lib
90 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libmraa.so
* $(1)/usr
/lib
/
91 $(INSTALL_DIR
) $(1)/usr
/bin
92 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/mraa-
* $(1)/usr
/bin
/
95 define Package
/libmraa-node
/install
96 $(INSTALL_DIR
) $(1)/usr
/lib
/node
/mraa
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/node_modules
/mraa
/* $(1)/usr
/lib
/node
/mraa
/
100 define Package
/libmraa-python3
/install
101 $(INSTALL_DIR
) $(1)/usr
/lib
/python
$(PYTHON3_VERSION
)/site-packages
102 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/python
$(PYTHON3_VERSION
)/site-packages
/* \
103 $(1)/usr
/lib
/python
$(PYTHON3_VERSION
)/site-packages
/
106 $(eval
$(call BuildPackage
,libmraa
))
107 $(eval
$(call BuildPackage
,libmraa-node
))
108 $(eval
$(call BuildPackage
,libmraa-python3
))