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.

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