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.

106 lines
3.0 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:=1
  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. define Build/Prepare
  55. $(call Build/Prepare/Default)
  56. # Fix APPVERSION to suppress update popup
  57. sed -i 's/#define APPVERSION.*/#define APPVERSION $(PKG_VERSION_PATCH)/' \
  58. $(PKG_BUILD_DIR)/appversion.default
  59. # Remove unwanted scripts
  60. cd $(PKG_BUILD_DIR)/scripts && rm -rf \
  61. buienradar_rain_example.pl \
  62. _domoticz_main* \
  63. download_update.sh \
  64. dzVents/{.gitignore,documentation,examples} \
  65. dzVents/runtime/{integration-tests,misc/smoothing.xlsx,tests} \
  66. logrotate/ \
  67. lua_parsers/example* \
  68. lua/*demo.lua \
  69. python/ \
  70. readme.txt \
  71. restart_domoticz \
  72. templates/All.Python \
  73. update_domoticz
  74. # Remove *.md
  75. cd $(PKG_BUILD_DIR) && $(FIND) -name '*.md' -delete
  76. endef
  77. define Package/domoticz/install
  78. $(INSTALL_DIR) $(1)/etc/config $(1)/etc/hotplug.d/tty $(1)/etc/init.d
  79. $(INSTALL_BIN) ./files/domoticz.hotplug $(1)/etc/hotplug.d/tty/domoticz
  80. $(INSTALL_BIN) ./files/domoticz.init $(1)/etc/init.d/domoticz
  81. $(INSTALL_CONF) ./files/domoticz.config $(1)/etc/config/domoticz
  82. $(INSTALL_DIR) $(1)/usr/share/domoticz $(1)/usr/bin
  83. $(CP) $(PKG_INSTALL_DIR)/usr/Config $(1)/usr/share/domoticz/openzwave
  84. $(CP) $(PKG_INSTALL_DIR)/usr/scripts $(1)/usr/share/domoticz/
  85. $(CP) $(PKG_INSTALL_DIR)/usr/www $(1)/usr/share/domoticz/
  86. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/domoticz $(1)/usr/bin/domoticz
  87. endef
  88. define Package/domoticz/conffiles
  89. /etc/config/domoticz
  90. /var/lib/domoticz/
  91. endef
  92. $(eval $(call BuildPackage,domoticz))