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.

98 lines
2.6 KiB

  1. #
  2. # Copyright (C) 2017 Hauke Mehrtens <hauke@hauke-m.de>
  3. # Copyright (C) 2016 - 2017 Stijn Tintel <stijn@linux-ipv6.be>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=openzwave
  10. PKG_REV:=164
  11. PKG_VERSION:=1.4.$(PKG_REV)
  12. PKG_RELEASE:=2
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=http://old.openzwave.com/downloads
  15. PKG_HASH:=4ecf39787aaf278c203764069b581dbc26094ce57cafeab4a0c1f012d2c0ac69
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/openzwave/default
  20. URL:=http://openzwave.com
  21. MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
  22. DEPENDS:=+libpthread +libstdcpp
  23. endef
  24. define Package/openzwave/description
  25. Open-ZWave is a library that interfaces with selected Z-Wave PC controllers
  26. endef
  27. define Package/libopenzwave
  28. $(call Package/openzwave/default)
  29. SECTION:=libs
  30. CATEGORY:=Libraries
  31. TITLE:=Open-ZWave Library
  32. endef
  33. define Package/openzwave
  34. $(call Package/openzwave/default)
  35. SECTION:=utils
  36. CATEGORY:=Utilities
  37. TITLE:=Open-ZWave MinOZW test utility
  38. DEPENDS:=+libopenzwave +openzwave-config
  39. endef
  40. define Package/openzwave-config
  41. $(call Package/openzwave/default)
  42. SECTION:=utils
  43. CATEGORY:=Utilities
  44. TITLE:=Open-ZWave Device Configs
  45. endef
  46. TARGET_CPPFLAGS+=-Wno-format -Wno-format-security
  47. MAKE_FLAGS += \
  48. LD="$(TARGET_CROSS)g++" \
  49. LIBDIR="$(PKG_BUILD_DIR)" \
  50. PREFIX=$(CONFIGURE_PREFIX) \
  51. instlibdir=/usr/lib \
  52. pkgconfigdir=/usr/lib/pkgconfig \
  53. sysconfdir=/etc/openzwave
  54. define Build/Prepare
  55. $(call Build/Prepare/Default)
  56. rm $(PKG_BUILD_DIR)/cpp/src/platform/HidController.*
  57. sed -i -e '/hidapi/d;/HidController/d' $(PKG_BUILD_DIR)/distfiles.mk
  58. endef
  59. define Package/libopenzwave/install
  60. $(INSTALL_DIR) $(1)/usr/lib
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopenzwave.so* $(1)/usr/lib/
  62. endef
  63. define Package/openzwave/install
  64. $(INSTALL_DIR) $(1)/usr/bin
  65. $(CP) $(PKG_INSTALL_DIR)/usr/bin/MinOZW $(1)/usr/bin/
  66. endef
  67. define Package/openzwave-config/install
  68. $(INSTALL_DIR) $(1)/etc/
  69. $(CP) $(PKG_INSTALL_DIR)/etc/openzwave $(1)/etc/
  70. endef
  71. define Build/InstallDev
  72. $(INSTALL_DIR) $(1)/usr/include
  73. $(CP) $(PKG_INSTALL_DIR)/usr/include/openzwave $(1)/usr/include/
  74. $(INSTALL_DIR) $(1)/usr/lib
  75. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopenzwave.* $(1)/usr/lib/
  76. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  77. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libopenzwave.pc $(1)/usr/lib/pkgconfig/
  78. endef
  79. $(eval $(call BuildPackage,libopenzwave))
  80. $(eval $(call BuildPackage,openzwave))
  81. $(eval $(call BuildPackage,openzwave-config))