Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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.8.0
  10. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  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:=70600dece4138b0c0dbaff42f57828f1559cd840
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  16. PKG_BUILD_DEPENDS:=node python/host swig/host node/host
  17. CMAKE_INSTALL:=1
  18. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
  19. PKG_LICENSE:=LGPL-2.1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
  23. -DENABLEEXAMPLES=0 \
  24. -DNODE_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/node \
  25. -DSWIG_DIR=$(STAGING_DIR_HOSTPKG)/bin
  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))