prometheus-node-exporter-lua: add dawn exporter
[feed/packages.git] / libs / libmraa / Makefile
1 #
2 # Copyright (C) 2015-2018 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:=libmraa
11 PKG_VERSION:=2.1.0
12 PKG_RELEASE:=1
13
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:=5351ce9eb654014d8ea7f43bdb2d17e6d1955536938a2ea0d467f4008e614345
17 PKG_BUILD_DIR:=$(BUILD_DIR)/mraa-$(PKG_VERSION)
18
19 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>, Hirokazu MORIKAWA <morikw2@gmail.com>
20 PKG_LICENSE:=MIT
21 PKG_LICENSE_FILES:=COPYING
22
23 PKG_BUILD_DEPENDS:=node swig/host node/host
24 CMAKE_INSTALL:=1
25 PKG_USE_MIPS16:=0
26 PYTHON3_PKG_BUILD:=0
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/cmake.mk
30 include ../../lang/python/python3-package.mk
31
32 CMAKE_OPTIONS=-DENABLEEXAMPLES=0 \
33 -DFIRMATA=ON
34
35 TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/node
36
37 define Package/libmraa/Default
38 SECTION:=libs
39 CATEGORY:=Libraries
40 SUBMENU:=IoT
41 TITLE:=Eclipse MRAA lowlevel IO library
42 URL:=https://projects.eclipse.org/projects/iot.mraa
43 endef
44
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.
51 endef
52
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
57 endef
58
59 define Package/libmraa/description
60 $(call Package/libmraa/Default/description)
61
62 This package contains the C/C++ libraries.
63 endef
64
65 define Package/libmraa-node
66 $(call Package/libmraa/Default)
67 TITLE:=Eclipse MRAA lowlevel IO Node.js library
68 DEPENDS:=+libmraa +node
69 endef
70
71 define Package/libmraa-node/description
72 $(call Package/libmraa/Default/description)
73
74 This package contains the Node.js libraries.
75 endef
76
77 define Package/libmraa-python3
78 $(call Package/libmraa/Default)
79 TITLE:=Eclipse MRAA lowlevel IO Python3 library
80 DEPENDS:=+libmraa +python3-light
81 endef
82
83 define Package/libmraa-python3/description
84 $(call Package/libmraa/Default/description)
85
86 This package contains the Python3 libraries.
87 endef
88
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/
94 endef
95
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/
99 endef
100
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/
105 endef
106
107 $(eval $(call BuildPackage,libmraa))
108 $(eval $(call BuildPackage,libmraa-node))
109 $(eval $(call BuildPackage,libmraa-python3))