You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.6 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libmraa
  9. PKG_VERSION:=2.2.0
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/eclipse/mraa/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=076669bee8423ffef3065735b293a329020be86630fea457174dbfcc67a0554a
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/mraa-$(PKG_VERSION)
  15. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>, Hirokazu MORIKAWA <morikw2@gmail.com>
  16. PKG_LICENSE:=MIT
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_BUILD_DEPENDS:=swig/host
  19. CMAKE_INSTALL:=1
  20. PKG_USE_MIPS16:=0
  21. PYTHON3_PKG_BUILD:=0
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/cmake.mk
  24. include ../../lang/python/python3-package.mk
  25. CMAKE_OPTIONS += \
  26. -DENABLEEXAMPLES=0 \
  27. -DBUILDSWIGNODE=OFF \
  28. -DBUILDTESTS=OFF \
  29. -DFIRMATA=ON
  30. define Package/libmraa/Default
  31. SECTION:=libs
  32. CATEGORY:=Libraries
  33. SUBMENU:=IoT
  34. TITLE:=Eclipse MRAA lowlevel IO library
  35. URL:=https://projects.eclipse.org/projects/iot.mraa
  36. endef
  37. define Package/libmraa/Default/description
  38. Libmraa is a C/C++ library with bindings to Java, Python and JavaScript to interface
  39. with the IO on Galileo, Edison & other platforms, with a structured and sane API where
  40. port names/numbering matches the board that you are on. Use of libmraa does not tie you
  41. to specific hardware with board detection done at runtime you can create portable code
  42. that will work across the supported platforms.
  43. endef
  44. define Package/libmraa
  45. $(call Package/libmraa/Default)
  46. TITLE:=Eclipse MRAA lowlevel IO C/C++ library
  47. DEPENDS:=+libstdcpp +libjson-c @!arc @!armeb @!powerpc
  48. endef
  49. define Package/libmraa/description
  50. $(call Package/libmraa/Default/description)
  51. This package contains the C/C++ libraries.
  52. endef
  53. define Package/libmraa-python3
  54. $(call Package/libmraa/Default)
  55. TITLE:=Eclipse MRAA lowlevel IO Python3 library
  56. DEPENDS:=+libmraa +python3-light
  57. endef
  58. define Package/libmraa-python3/description
  59. $(call Package/libmraa/Default/description)
  60. This package contains the Python3 libraries.
  61. endef
  62. define Package/libmraa/install
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmraa.so* $(1)/usr/lib/
  65. $(INSTALL_DIR) $(1)/usr/bin
  66. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mraa-* $(1)/usr/bin/
  67. endef
  68. define Package/libmraa-python3/install
  69. $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/site-packages/* \
  71. $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/
  72. endef
  73. $(eval $(call BuildPackage,libmraa))
  74. $(eval $(call BuildPackage,libmraa-python3))