shairplay: remove
[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.2.0
12 PKG_RELEASE:=3
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:=076669bee8423ffef3065735b293a329020be86630fea457174dbfcc67a0554a
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:=swig/host
24 CMAKE_INSTALL:=1
25 PKG_BUILD_FLAGS:=no-mips16
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 += \
33 -DENABLEEXAMPLES=0 \
34 -DBUILDSWIGNODE=OFF \
35 -DBUILDTESTS=OFF \
36 -DFIRMATA=ON
37
38 define Package/libmraa/Default
39 SECTION:=libs
40 CATEGORY:=Libraries
41 SUBMENU:=IoT
42 TITLE:=Eclipse MRAA lowlevel IO library
43 URL:=https://projects.eclipse.org/projects/iot.mraa
44 endef
45
46 define Package/libmraa/Default/description
47 Libmraa is a C/C++ library with bindings to Java, Python and JavaScript to interface
48 with the IO on Galileo, Edison & other platforms, with a structured and sane API where
49 port names/numbering matches the board that you are on. Use of libmraa does not tie you
50 to specific hardware with board detection done at runtime you can create portable code
51 that will work across the supported platforms.
52 endef
53
54 define Package/libmraa
55 $(call Package/libmraa/Default)
56 TITLE:=Eclipse MRAA lowlevel IO C/C++ library
57 DEPENDS:=+libstdcpp +libjson-c @!arc @!armeb @!powerpc @!riscv64
58 endef
59
60 define Package/libmraa/description
61 $(call Package/libmraa/Default/description)
62
63 This package contains the C/C++ libraries.
64 endef
65
66 define Package/libmraa-python3
67 $(call Package/libmraa/Default)
68 TITLE:=Eclipse MRAA lowlevel IO Python3 library
69 DEPENDS:=+libmraa +python3-light
70 endef
71
72 define Package/libmraa-python3/description
73 $(call Package/libmraa/Default/description)
74
75 This package contains the Python3 libraries.
76 endef
77
78 define Package/libmraa/install
79 $(INSTALL_DIR) $(1)/usr/lib
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmraa.so* $(1)/usr/lib/
81 $(INSTALL_DIR) $(1)/usr/bin
82 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mraa-* $(1)/usr/bin/
83 endef
84
85 define Package/libmraa-python3/install
86 $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/site-packages/* \
88 $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/
89 endef
90
91 $(eval $(call BuildPackage,libmraa))
92 $(eval $(call BuildPackage,libmraa-python3))