Advertisement
rszasz

Untitled

Dec 9th, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  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.  
  8. include $(TOPDIR)/rules.mk
  9.  
  10. PKG_NAME:=libmraa
  11. PKG_VERSION:=1.5.1
  12.  
  13. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  14.  
  15. PKG_SOURCE_PROTO:=git
  16. PKG_SOURCE_URL:=https://github.com/intel-iot-devkit/mraa.git
  17. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_SOURCE_VERSION:=70600dece4138b0c0dbaff42f57828f1559cd840
  19. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  20. PKG_BUILD_DEPENDS:=node python/host swig/host node/host
  21. CMAKE_INSTALL:=1
  22.  
  23. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
  24. PKG_LICENSE:=LGPL-2.1
  25.  
  26. include $(INCLUDE_DIR)/package.mk
  27. include $(INCLUDE_DIR)/cmake.mk
  28.  
  29. CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
  30. -DENABLEEXAMPLES=0 \
  31. -DNODE_EXECUTABLE=$(STAGING_DIR)/host/bin/node \
  32. -DSWIG_DIR=$(STAGING_DIR)/host/bin
  33.  
  34. TARGET_CFLAGS+=-std=gnu++11 -I$(STAGING_DIR)/usr/include/node
  35.  
  36. define Package/libmraa
  37. SECTION:=libs
  38. CATEGORY:=Libraries
  39. DEPENDS:=+python +libstdcpp
  40. TITLE:=Intel IoT lowlevel IO library
  41. endef
  42.  
  43. define Package/libmraa/install
  44. $(INSTALL_DIR) $(1)/usr/lib/{node/mraa,python2.7/site-packages} $(1)/usr/bin
  45. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libmraa.so* $(1)/usr/lib/
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/node_modules/mraa/* $(1)/usr/lib/node/mraa/
  47. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/* $(1)/usr/lib/python2.7/site-packages/
  48. # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mraa/examples/python/blink-io8.py $(1)/usr/bin/
  49. endef
  50.  
  51. $(eval $(call BuildPackage,libmraa))
  52. ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement