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.

83 lines
2.9 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:=libupm
  9. PKG_VERSION:=0.4.0
  10. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/intel-iot-devkit/upm.git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=04dc6df4297a7766d6f1a8fef9699d586e7e0d92
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  16. PKG_MIRROR_HASH:=26bc9c32eea0b8aa6218735e30a3d2317431518f0b2a055c0f21e78e6d92ca4f
  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. UPM_MODULES:= \
  23. a110x ad8232 adafruitss adc121c021 adis16448 adxl335 adxl345 am2315 apds9002 at42qt1070 biss0001 bmpx8x buzzer \
  24. cjq4435 ds1307 ecs1030 enc03r flex gas gp2y0a grovecircularled grovecollision groveehr groveeldriver groveelectromagnet \
  25. groveemg grovegprs grovegsr grovelinefinder grovemd grovemoisture groveo2 grovescam grove grovespeaker grovevdiv grovewater \
  26. grovewfs guvas12d h3lis331dl hcsr04 hm11 hmc5883l hmtrp hp20x ht9170 htu21d hx711 i2clcd ina132 isd1820 itg3200 joystick12 \
  27. l298 ldt0028 lm35 lol loudness lpd8806 lsm303 lsm9ds0 m24lr64e max31723 max31855 max44000 max5487 maxds3231m maxsonarez \
  28. mg811 mhz16 mic mlx90614 mma7455 mma7660 mpl3115a2 mpr121 mpu9150 mq303a my9221 nrf24l01 nrf8001 nunchuck otp538u \
  29. pn532 ppd42ns pulsensor rfr359f rgbringcoder rotaryencoder rpr220 servo si114x sm130 st7735 stepmotor sx6119 ta12200 tcs3414cs \
  30. th02 tm1637 tsl2561 ttp223 ublox6 uln200xa waterlevel wheelencoder wt5001 yg1006 zfm20
  31. CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
  32. -DNODE_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/node \
  33. -DSWIG_DIR=$(STAGING_DIR_HOSTPKG)/bin
  34. define Package/libupm/Default
  35. SECTION:=libs
  36. CATEGORY:=Libraries
  37. DEPENDS:=+libmraa +librt
  38. SUBMENU:=IoT
  39. endef
  40. define Package/libupm
  41. $(call Package/libupm/Default)
  42. TITLE:=Intel IoT sensor library - Full
  43. endef
  44. define Package/libupm/install/Default
  45. $(INSTALL_DIR) $(1)/usr/lib/{node/,python2.7/site-packages}; \
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupm-$(2).so* $(1)/usr/lib/; \
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/jsupm_$(2) $(1)/usr/lib/node/; \
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/{pyupm_$(2).py,_pyupm_$(2).so} \
  49. $(1)/usr/lib/python2.7/site-packages/ ;
  50. endef
  51. define Package/libupm/install
  52. $(foreach module, $(UPM_MODULES), \
  53. $(call Package/libupm/install/Default,$(1),$(module)))
  54. endef
  55. define UpmPackage
  56. define Package/libupm-$(1)
  57. $(call Package/libupm/Default)
  58. TITLE:=Intel IoT sensor library - $(1)
  59. endef
  60. define Package/libupm-$(1)/install
  61. $(call Package/libupm/install/Default,$$(1),$(1))
  62. endef
  63. endef
  64. $(eval $(call BuildPackage,libupm))
  65. $(foreach package, $(UPM_MODULES), \
  66. $(eval $(call UpmPackage,$(package))) \
  67. $(eval $(call BuildPackage,libupm-$(package))) \
  68. )