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.

51 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2015 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:=0.9.0
  10. PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/intel-iot-devkit/mraa.git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=049ba5fa9f2d18ac0ec6729c46916b34998d3c5f
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  16. PKG_MIRROR_HASH:=0c81cff6dcfe401ead0d8976c6f9a6a86b75ab38413a45a40b7eb20b639d78e4
  17. PKG_BUILD_DEPENDS:=node python/host swig/host node/host
  18. CMAKE_INSTALL:=1
  19. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
  20. PKG_LICENSE:=LGPL-2.1
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/cmake.mk
  23. CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
  24. -DENABLEEXAMPLES=0 \
  25. -DNODE_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/node
  26. TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/node
  27. define Package/libmraa
  28. SECTION:=libs
  29. CATEGORY:=Libraries
  30. DEPENDS:=+python +libstdcpp
  31. TITLE:=Intel IoT lowlevel IO library
  32. endef
  33. define Package/libmraa/install
  34. $(INSTALL_DIR) $(1)/usr/lib/{node/mraa,python2.7/site-packages} $(1)/usr/bin
  35. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libmraa.so* $(1)/usr/lib/
  36. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/node_modules/mraa/* $(1)/usr/lib/node/mraa/
  37. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/* $(1)/usr/lib/python2.7/site-packages/
  38. # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mraa/examples/python/blink-io8.py $(1)/usr/bin/
  39. endef
  40. $(eval $(call BuildPackage,libmraa))