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.

129 lines
3.9 KiB

domoticz: update to 3.9571 and clean up FHS handling Upstream has merged a simplified version of the FHS patch, with a few changes... Scripts are actually configuration. There are examples, but the point is that you write your own. So they should live in the data directory (e.g. /var/lib/domoticz) not in /usr/share/domoticz. The only exception is the dzVents runtime. So.... the upstream patch handles the dzVents runtime bit. Drop the part of our patch which added -scripts, because it can just be based in the userdata directory and we don't need to change that. Ship the default scripts/ directory in /etc/domoticz/scripts, and on startup make a *symlink* to it from /var/lib/domoticz/scripts. Symlink from /etc/domoticz/scripts/dzVents{data,generated_scripts} to temporary directories under /var/lib/domoticz/dzVents so that those directories (which are written to by Domoticz) don't land on the root file system. Anyone with a writeable file system who *wants* the data/ directory to be persistent, can change that. Just as they can change the userdata config option to point to a real file system somewhere. Also drop the renaming of the OpenZWave Config/ directory. It's purely cosmetric so there's no need for us to carry that change. It can go upstream first, if it really offends anyone. Drop the patches which are now merged upstream, and turn off the newly added USE_OPENSSL_STATIC. Add -noupdates to the command line. Finally, gzip the static www files to save space. In the common case, clients will use "Accept-Encodiong: gzip" and Domoticz will serve them as-is. It can also decompress on the fly if it really has to, but now we aren't asking it to *compress* on the fly, which is probably a losing proposition on an OpenWRT box. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years ago
domoticz: update to 3.9571 and clean up FHS handling Upstream has merged a simplified version of the FHS patch, with a few changes... Scripts are actually configuration. There are examples, but the point is that you write your own. So they should live in the data directory (e.g. /var/lib/domoticz) not in /usr/share/domoticz. The only exception is the dzVents runtime. So.... the upstream patch handles the dzVents runtime bit. Drop the part of our patch which added -scripts, because it can just be based in the userdata directory and we don't need to change that. Ship the default scripts/ directory in /etc/domoticz/scripts, and on startup make a *symlink* to it from /var/lib/domoticz/scripts. Symlink from /etc/domoticz/scripts/dzVents{data,generated_scripts} to temporary directories under /var/lib/domoticz/dzVents so that those directories (which are written to by Domoticz) don't land on the root file system. Anyone with a writeable file system who *wants* the data/ directory to be persistent, can change that. Just as they can change the userdata config option to point to a real file system somewhere. Also drop the renaming of the OpenZWave Config/ directory. It's purely cosmetric so there's no need for us to carry that change. It can go upstream first, if it really offends anyone. Drop the patches which are now merged upstream, and turn off the newly added USE_OPENSSL_STATIC. Add -noupdates to the command line. Finally, gzip the static www files to save space. In the common case, clients will use "Accept-Encodiong: gzip" and Domoticz will serve them as-is. It can also decompress on the fly if it really has to, but now we aren't asking it to *compress* on the fly, which is probably a losing proposition on an OpenWRT box. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years ago
domoticz: update to 3.9571 and clean up FHS handling Upstream has merged a simplified version of the FHS patch, with a few changes... Scripts are actually configuration. There are examples, but the point is that you write your own. So they should live in the data directory (e.g. /var/lib/domoticz) not in /usr/share/domoticz. The only exception is the dzVents runtime. So.... the upstream patch handles the dzVents runtime bit. Drop the part of our patch which added -scripts, because it can just be based in the userdata directory and we don't need to change that. Ship the default scripts/ directory in /etc/domoticz/scripts, and on startup make a *symlink* to it from /var/lib/domoticz/scripts. Symlink from /etc/domoticz/scripts/dzVents{data,generated_scripts} to temporary directories under /var/lib/domoticz/dzVents so that those directories (which are written to by Domoticz) don't land on the root file system. Anyone with a writeable file system who *wants* the data/ directory to be persistent, can change that. Just as they can change the userdata config option to point to a real file system somewhere. Also drop the renaming of the OpenZWave Config/ directory. It's purely cosmetric so there's no need for us to carry that change. It can go upstream first, if it really offends anyone. Drop the patches which are now merged upstream, and turn off the newly added USE_OPENSSL_STATIC. Add -noupdates to the command line. Finally, gzip the static www files to save space. In the common case, clients will use "Accept-Encodiong: gzip" and Domoticz will serve them as-is. It can also decompress on the fly if it really has to, but now we aren't asking it to *compress* on the fly, which is probably a losing proposition on an OpenWRT box. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years ago
domoticz: update to 3.9571 and clean up FHS handling Upstream has merged a simplified version of the FHS patch, with a few changes... Scripts are actually configuration. There are examples, but the point is that you write your own. So they should live in the data directory (e.g. /var/lib/domoticz) not in /usr/share/domoticz. The only exception is the dzVents runtime. So.... the upstream patch handles the dzVents runtime bit. Drop the part of our patch which added -scripts, because it can just be based in the userdata directory and we don't need to change that. Ship the default scripts/ directory in /etc/domoticz/scripts, and on startup make a *symlink* to it from /var/lib/domoticz/scripts. Symlink from /etc/domoticz/scripts/dzVents{data,generated_scripts} to temporary directories under /var/lib/domoticz/dzVents so that those directories (which are written to by Domoticz) don't land on the root file system. Anyone with a writeable file system who *wants* the data/ directory to be persistent, can change that. Just as they can change the userdata config option to point to a real file system somewhere. Also drop the renaming of the OpenZWave Config/ directory. It's purely cosmetric so there's no need for us to carry that change. It can go upstream first, if it really offends anyone. Drop the patches which are now merged upstream, and turn off the newly added USE_OPENSSL_STATIC. Add -noupdates to the command line. Finally, gzip the static www files to save space. In the common case, clients will use "Accept-Encodiong: gzip" and Domoticz will serve them as-is. It can also decompress on the fly if it really has to, but now we aren't asking it to *compress* on the fly, which is probably a losing proposition on an OpenWRT box. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years ago
domoticz: update to 3.9571 and clean up FHS handling Upstream has merged a simplified version of the FHS patch, with a few changes... Scripts are actually configuration. There are examples, but the point is that you write your own. So they should live in the data directory (e.g. /var/lib/domoticz) not in /usr/share/domoticz. The only exception is the dzVents runtime. So.... the upstream patch handles the dzVents runtime bit. Drop the part of our patch which added -scripts, because it can just be based in the userdata directory and we don't need to change that. Ship the default scripts/ directory in /etc/domoticz/scripts, and on startup make a *symlink* to it from /var/lib/domoticz/scripts. Symlink from /etc/domoticz/scripts/dzVents{data,generated_scripts} to temporary directories under /var/lib/domoticz/dzVents so that those directories (which are written to by Domoticz) don't land on the root file system. Anyone with a writeable file system who *wants* the data/ directory to be persistent, can change that. Just as they can change the userdata config option to point to a real file system somewhere. Also drop the renaming of the OpenZWave Config/ directory. It's purely cosmetric so there's no need for us to carry that change. It can go upstream first, if it really offends anyone. Drop the patches which are now merged upstream, and turn off the newly added USE_OPENSSL_STATIC. Add -noupdates to the command line. Finally, gzip the static www files to save space. In the common case, clients will use "Accept-Encodiong: gzip" and Domoticz will serve them as-is. It can also decompress on the fly if it really has to, but now we aren't asking it to *compress* on the fly, which is probably a losing proposition on an OpenWRT box. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years ago
domoticz: update to 3.9571 and clean up FHS handling Upstream has merged a simplified version of the FHS patch, with a few changes... Scripts are actually configuration. There are examples, but the point is that you write your own. So they should live in the data directory (e.g. /var/lib/domoticz) not in /usr/share/domoticz. The only exception is the dzVents runtime. So.... the upstream patch handles the dzVents runtime bit. Drop the part of our patch which added -scripts, because it can just be based in the userdata directory and we don't need to change that. Ship the default scripts/ directory in /etc/domoticz/scripts, and on startup make a *symlink* to it from /var/lib/domoticz/scripts. Symlink from /etc/domoticz/scripts/dzVents{data,generated_scripts} to temporary directories under /var/lib/domoticz/dzVents so that those directories (which are written to by Domoticz) don't land on the root file system. Anyone with a writeable file system who *wants* the data/ directory to be persistent, can change that. Just as they can change the userdata config option to point to a real file system somewhere. Also drop the renaming of the OpenZWave Config/ directory. It's purely cosmetric so there's no need for us to carry that change. It can go upstream first, if it really offends anyone. Drop the patches which are now merged upstream, and turn off the newly added USE_OPENSSL_STATIC. Add -noupdates to the command line. Finally, gzip the static www files to save space. In the common case, clients will use "Accept-Encodiong: gzip" and Domoticz will serve them as-is. It can also decompress on the fly if it really has to, but now we aren't asking it to *compress* on the fly, which is probably a losing proposition on an OpenWRT box. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years ago
domoticz: update to 3.9571 and clean up FHS handling Upstream has merged a simplified version of the FHS patch, with a few changes... Scripts are actually configuration. There are examples, but the point is that you write your own. So they should live in the data directory (e.g. /var/lib/domoticz) not in /usr/share/domoticz. The only exception is the dzVents runtime. So.... the upstream patch handles the dzVents runtime bit. Drop the part of our patch which added -scripts, because it can just be based in the userdata directory and we don't need to change that. Ship the default scripts/ directory in /etc/domoticz/scripts, and on startup make a *symlink* to it from /var/lib/domoticz/scripts. Symlink from /etc/domoticz/scripts/dzVents{data,generated_scripts} to temporary directories under /var/lib/domoticz/dzVents so that those directories (which are written to by Domoticz) don't land on the root file system. Anyone with a writeable file system who *wants* the data/ directory to be persistent, can change that. Just as they can change the userdata config option to point to a real file system somewhere. Also drop the renaming of the OpenZWave Config/ directory. It's purely cosmetric so there's no need for us to carry that change. It can go upstream first, if it really offends anyone. Drop the patches which are now merged upstream, and turn off the newly added USE_OPENSSL_STATIC. Add -noupdates to the command line. Finally, gzip the static www files to save space. In the common case, clients will use "Accept-Encodiong: gzip" and Domoticz will serve them as-is. It can also decompress on the fly if it really has to, but now we aren't asking it to *compress* on the fly, which is probably a losing proposition on an OpenWRT box. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years ago
  1. #
  2. # Copyright (C) 2016 - 2020 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:=2021.1
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_VERSION)/$(PKG_SOURCE)
  13. PKG_HASH:=c4dc3455edae8bf00d2e950002f70d5b90ac577b1559ef7ada6870d970069fbb
  14. PKG_MAINTAINER:=David Woodhouse <dwmw2@infradead.org>
  15. PKG_LICENSE:=GPL-3.0
  16. PKG_LICENSE_FILES:=License.txt
  17. PKG_BUILD_DEPENDS:=python3 minizip cereal
  18. PKG_USE_MIPS16:=0
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/domoticz
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=Open Source Home Automation System
  25. URL:=http://domoticz.com/
  26. USERID:=domoticz=6144:domoticz=6144
  27. DEPENDS:= \
  28. +boost \
  29. +boost-date_time \
  30. +boost-system \
  31. +boost-thread \
  32. +jsoncpp \
  33. +libcurl \
  34. +python3 \
  35. +minizip \
  36. +lua5.3 \
  37. +libfmt \
  38. +libmosquitto \
  39. +libopenssl \
  40. +libopenzwave \
  41. +libsqlite3 \
  42. +libstdcpp \
  43. +telldus-core \
  44. +zlib
  45. endef
  46. define Package/domoticz/description
  47. 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.
  48. endef
  49. CMAKE_OPTIONS += \
  50. -DBUILD_SHARED_LIBS=yes \
  51. -DBoost_NO_BOOST_CMAKE=yes \
  52. -DGIT_SUBMODULE=no \
  53. -DCMAKE_BUILD_TYPE=Release \
  54. -DUSE_BUILTIN_MQTT=no \
  55. -DUSE_BUILTIN_SQLITE=no \
  56. -DUSE_BUILTIN_JSONCPP=no \
  57. -DUSE_BUILTIN_MINIZIP=no \
  58. -DUSE_BUILTIN_LIBFMT=no \
  59. -DUSE_LUA_STATIC=no \
  60. -DUSE_STATIC_BOOST=no \
  61. -DUSE_STATIC_LIBSTDCXX=no \
  62. -DUSE_STATIC_OPENZWAVE=no \
  63. -DUSE_OPENSSL_STATIC=no \
  64. -DUSE_PYTHON=yes \
  65. -DWITH_LIBUSB=no
  66. TARGET_CFLAGS += -flto
  67. TARGET_CXXFLAGS += -DWITH_GPIO -flto
  68. TARGET_LDFLAGS += -lpython3.9
  69. define Build/Prepare
  70. $(call Build/Prepare/Default)
  71. # Remove unwanted scripts
  72. cd $(PKG_BUILD_DIR)/scripts && rm -rf \
  73. buienradar_rain_example.pl \
  74. _domoticz_main* \
  75. download_update.sh \
  76. dzVents/{.gitignore,documentation,examples,generated_scripts,data} \
  77. dzVents/runtime/{integration-tests,misc/smoothing.xlsx,tests} \
  78. logrotate/ \
  79. lua_parsers/example* \
  80. lua/*demo.lua \
  81. python/ \
  82. readme.txt \
  83. restart_domoticz \
  84. templates/All.Python \
  85. update_domoticz \
  86. domoticz.conf
  87. # Remove *.md
  88. cd $(PKG_BUILD_DIR) && $(FIND) -name '*.md' -delete
  89. endef
  90. define Package/domoticz/install
  91. $(INSTALL_DIR) $(1)/etc/config $(1)/etc/hotplug.d/tty $(1)/etc/init.d $(1)/etc/domoticz/plugins
  92. $(INSTALL_BIN) ./files/domoticz.hotplug $(1)/etc/hotplug.d/tty/domoticz
  93. $(INSTALL_BIN) ./files/domoticz.init $(1)/etc/init.d/domoticz
  94. $(INSTALL_CONF) ./files/domoticz.config $(1)/etc/config/domoticz
  95. $(INSTALL_DIR) $(1)/usr/share/domoticz $(1)/usr/bin
  96. $(CP) $(PKG_INSTALL_DIR)/usr/dzVents $(1)/usr/share/domoticz/dzVents
  97. $(CP) $(PKG_INSTALL_DIR)/usr/Config $(1)/usr/share/domoticz/Config
  98. $(CP) $(PKG_INSTALL_DIR)/usr/scripts $(1)/etc/domoticz/scripts
  99. ln -sf /var/lib/domoticz/dzVents/generated_scripts $(1)/etc/domoticz/scripts/dzVents
  100. ln -sf /var/lib/domoticz/dzVents/data $(1)/etc/domoticz/scripts/dzVents
  101. $(CP) $(PKG_INSTALL_DIR)/usr/www $(1)/usr/share/domoticz/
  102. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/domoticz $(1)/usr/bin/domoticz
  103. # compress static web content
  104. find $(1)/usr/share/domoticz/www -name "*.css" -exec gzip -9 {} \;
  105. find $(1)/usr/share/domoticz/www -name "*.js" -exec gzip -9 {} \;
  106. gzip -9 $(1)/usr/share/domoticz/www/*.html
  107. gzip -9 $(1)/usr/share/domoticz/www/secpanel/*.html
  108. find $(1)/usr/share/domoticz/www/views -name "*.html" -exec sh -c 'grep -q "<\!--#embed" {} || gzip -9 {}' \;
  109. endef
  110. define Package/domoticz/conffiles
  111. /etc/config/domoticz
  112. /var/lib/domoticz/
  113. /etc/domoticz/
  114. endef
  115. $(eval $(call BuildPackage,domoticz))