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.

108 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2016 - 2017 Stijn Tintel <stijn@linux-ipv6.be>
  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:=domoticz
  9. PKG_VERSION_MAJOR:=3
  10. PKG_VERSION_PATCH:=8153
  11. PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH)
  12. PKG_RELEASE:=3
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_VERSION)/$(PKG_SOURCE)
  15. PKG_HASH:=5ea8f37f2ef900e9bd17b1b5375e75bfdec4f09001e3e2e0b647a260989d014c
  16. PKG_LICENSE:=GPL-3.0
  17. PKG_LICENSE_FILES:=License.txt
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_USE_MIPS16:=0
  20. CMAKE_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/cmake.mk
  23. define Package/domoticz
  24. SECTION:=utils
  25. CATEGORY:=Utilities
  26. TITLE:=Open Source Home Automation System
  27. URL:=http://domoticz.com/
  28. MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
  29. USERID:=domoticz=6144:domoticz=6144
  30. DEPENDS:= \
  31. +boost \
  32. +boost-date_time \
  33. +boost-system \
  34. +boost-thread \
  35. +libcurl \
  36. +libmosquittopp \
  37. +libopenssl \
  38. +libopenzwave \
  39. +libsqlite3 \
  40. +libstdcpp \
  41. +zlib
  42. endef
  43. define Package/domoticz/description
  44. Domoticz is a Home Automation System that lets you monitor and configure various devices like: Lights, Switches, various sensors/meters like Temperature, Rain, Wind, UV, Electra, Gas, Water and much more. Notifications/Alerts can be sent to any mobile device.
  45. endef
  46. CMAKE_OPTIONS += \
  47. -DCMAKE_BUILD_TYPE=Release \
  48. -DUSE_BUILTIN_MQTT=no \
  49. -DUSE_BUILTIN_SQLITE=no \
  50. -DUSE_STATIC_BOOST=no \
  51. -DUSE_STATIC_LIBSTDCXX=no \
  52. -DUSE_STATIC_OPENZWAVE=no \
  53. -DUSE_PYTHON=no
  54. TARGET_CXXFLAGS+=-DWITH_GPIO
  55. define Build/Prepare
  56. $(call Build/Prepare/Default)
  57. # Fix APPVERSION to suppress update popup
  58. sed -i 's/#define APPVERSION.*/#define APPVERSION $(PKG_VERSION_PATCH)/' \
  59. $(PKG_BUILD_DIR)/appversion.default
  60. # Remove unwanted scripts
  61. cd $(PKG_BUILD_DIR)/scripts && rm -rf \
  62. buienradar_rain_example.pl \
  63. _domoticz_main* \
  64. download_update.sh \
  65. dzVents/{.gitignore,documentation,examples,generated_scripts} \
  66. dzVents/runtime/{integration-tests,misc/smoothing.xlsx,tests} \
  67. logrotate/ \
  68. lua_parsers/example* \
  69. lua/*demo.lua \
  70. python/ \
  71. readme.txt \
  72. restart_domoticz \
  73. templates/All.Python \
  74. update_domoticz
  75. # Remove *.md
  76. cd $(PKG_BUILD_DIR) && $(FIND) -name '*.md' -delete
  77. endef
  78. define Package/domoticz/install
  79. $(INSTALL_DIR) $(1)/etc/config $(1)/etc/hotplug.d/tty $(1)/etc/init.d
  80. $(INSTALL_BIN) ./files/domoticz.hotplug $(1)/etc/hotplug.d/tty/domoticz
  81. $(INSTALL_BIN) ./files/domoticz.init $(1)/etc/init.d/domoticz
  82. $(INSTALL_CONF) ./files/domoticz.config $(1)/etc/config/domoticz
  83. $(INSTALL_DIR) $(1)/usr/share/domoticz $(1)/usr/bin
  84. $(CP) $(PKG_INSTALL_DIR)/usr/Config $(1)/usr/share/domoticz/openzwave
  85. $(CP) $(PKG_INSTALL_DIR)/usr/scripts $(1)/usr/share/domoticz/
  86. $(CP) $(PKG_INSTALL_DIR)/usr/www $(1)/usr/share/domoticz/
  87. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/domoticz $(1)/usr/bin/domoticz
  88. endef
  89. define Package/domoticz/conffiles
  90. /etc/config/domoticz
  91. /var/lib/domoticz/
  92. endef
  93. $(eval $(call BuildPackage,domoticz))