openzwave.mk 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ################################################################################
  2. #
  3. # openzwave
  4. #
  5. ################################################################################
  6. OPENZWAVE_VERSION = 62444b0f979c337d2091d77d89cf63c2ae9775cf
  7. OPENZWAVE_SITE = $(call github,OpenZWave,open-zwave,$(OPENZWAVE_VERSION))
  8. OPENZWAVE_LICENSE = LGPL-3.0+, GPL-3.0 (examples), Apache-2.0 (sh2ju.sh)
  9. OPENZWAVE_LICENSE_FILES = LICENSE licenses/license.txt licenses/lgpl.txt \
  10. licenses/gpl.txt licenses/Apache-License-2.0.txt
  11. OPENZWAVE_DEPENDENCIES = tinyxml
  12. OPENZWAVE_INSTALL_STAGING = YES
  13. # Set instlibdir to install libopenzwave.so* in the correct directory
  14. # otherwise openzwave will check that /lib64 exists (on the host) to
  15. # know if the library should be installed in $(PREFIX)/lib or $(PREFIX)/lib64.
  16. # Set pkgconfigdir to /lib/pkgconfig to install libopenzwave.pc in the
  17. # correct directory otherwise openzwave will call
  18. # "pkg-config --variable pc_path pkg-config" which returns an incorrect value.
  19. # Set sysconfdir to /etc/openzwave to install openzwave configuration files in
  20. # the correct directory otherwise openzwave will install configuration files in
  21. # $(PREFIX)/etc/openzwave.
  22. # Disable doxygen documentation.
  23. OPENZWAVE_MAKE_OPTS = \
  24. CROSS_COMPILE="$(TARGET_CROSS)" \
  25. PREFIX=/usr \
  26. instlibdir=/usr/lib \
  27. pkgconfigdir=/usr/lib/pkgconfig \
  28. sysconfdir=/etc/openzwave \
  29. DOXYGEN= \
  30. USE_BI_TXML=0
  31. ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
  32. OPENZWAVE_DEPENDENCIES += host-pkgconf udev
  33. OPENZWAVE_MAKE_OPTS += USE_HID=1
  34. else
  35. OPENZWAVE_MAKE_OPTS += USE_HID=0
  36. endif
  37. define OPENZWAVE_BUILD_CMDS
  38. $(TARGET_MAKE_ENV) $(MAKE) $(OPENZWAVE_MAKE_OPTS) -C $(@D)
  39. endef
  40. define OPENZWAVE_INSTALL_STAGING_CMDS
  41. $(TARGET_MAKE_ENV) $(MAKE) $(OPENZWAVE_MAKE_OPTS) -C $(@D) \
  42. DESTDIR=$(STAGING_DIR) install
  43. endef
  44. # Delete unneeded ozw_config binary from target directory as this is an utility
  45. # application used to get the openzwave build configuration.
  46. define OPENZWAVE_INSTALL_TARGET_CMDS
  47. $(TARGET_MAKE_ENV) $(MAKE) $(OPENZWAVE_MAKE_OPTS) -C $(@D) \
  48. DESTDIR=$(TARGET_DIR) install
  49. rm -f $(TARGET_DIR)/usr/bin/ozw_config
  50. endef
  51. $(eval $(generic-package))