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.

100 lines
2.7 KiB

  1. #
  2. # Copyright (C) 2017 Hauke Mehrtens <hauke@hauke-m.de>
  3. # Copyright (C) 2016 - 2020 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_VERSION:=1.6.1149
  11. PKG_RELEASE:=3
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=http://old.openzwave.com/downloads
  14. PKG_HASH:=dc747c24cae11e4aa121252cc38ea92d1fbc587dc514737dd0e2b24191521c48
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/openzwave/default
  18. URL:=http://openzwave.com
  19. MAINTAINER:=David Woodhouse <dwmw2@infradead.org>
  20. DEPENDS:=+libpthread +libstdcpp
  21. endef
  22. define Package/openzwave/description
  23. Open-ZWave is a library that interfaces with selected Z-Wave PC controllers
  24. endef
  25. define Package/libopenzwave
  26. $(call Package/openzwave/default)
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. TITLE:=Open-ZWave Library
  30. endef
  31. define Package/openzwave
  32. $(call Package/openzwave/default)
  33. SECTION:=utils
  34. CATEGORY:=Utilities
  35. TITLE:=Open-ZWave MinOZW test utility
  36. DEPENDS:=+libopenzwave +openzwave-config
  37. endef
  38. define Package/openzwave-config
  39. $(call Package/openzwave/default)
  40. SECTION:=utils
  41. CATEGORY:=Utilities
  42. TITLE:=Open-ZWave Device Configs
  43. endef
  44. TARGET_CPPFLAGS+=-Wno-format -Wno-format-security
  45. MAKE_FLAGS += \
  46. LD="$(TARGET_CROSS)g++" \
  47. LIBDIR="$(PKG_BUILD_DIR)" \
  48. PREFIX=$(CONFIGURE_PREFIX) \
  49. UNAME="Linux" \
  50. USE_HID="no" \
  51. ar_option="q" \
  52. instlibdir=/usr/lib \
  53. pkgconfigdir=/usr/lib/pkgconfig \
  54. sysconfdir=/etc/openzwave
  55. define Build/Prepare
  56. $(call Build/Prepare/Default)
  57. sed -i -e 's/-O3 //;s/-Werror //' $(PKG_BUILD_DIR)/cpp/build/Makefile
  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. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libopenzwave.pc
  79. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libopenzwave.pc
  80. endef
  81. $(eval $(call BuildPackage,libopenzwave))
  82. $(eval $(call BuildPackage,openzwave))
  83. $(eval $(call BuildPackage,openzwave-config))