2 # Copyright (C) 2016 - 2020 Stijn Tintel <stijn@linux-ipv6.be>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://codeload.github.com
/domoticz
/domoticz
/tar.gz
/$(PKG_VERSION
)?
16 PKG_HASH
:=32bcf49df8c80c470352e63004a82d9601b90ccf406096099656250a4515ac28
18 PKG_MAINTAINER
:=David Woodhouse
<dwmw2@infradead.org
>
20 PKG_LICENSE_FILES
:=License.txt
21 PKG_CPE_ID
:=cpe
:/a
:domoticz
:domoticz
23 PKG_BUILD_DEPENDS
:=python3 minizip cereal
24 PKG_BUILD_FLAGS
:=no-mips16 lto
26 include $(INCLUDE_DIR
)/package.mk
27 include $(INCLUDE_DIR
)/cmake.mk
29 define Package
/domoticz
32 TITLE
:=Open Source Home Automation System
33 URL
:=http
://domoticz.com
/
34 USERID
:=domoticz
=6144:domoticz
=6144
55 define Package
/domoticz
/description
56 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.
60 -DBUILD_SHARED_LIBS
=yes \
61 -DBoost_NO_BOOST_CMAKE
=yes \
63 -DCMAKE_BUILD_TYPE
=Release \
64 -DUSE_BUILTIN_MQTT
=no \
65 -DUSE_BUILTIN_SQLITE
=no \
66 -DUSE_BUILTIN_JSONCPP
=no \
67 -DUSE_BUILTIN_MINIZIP
=no \
68 -DUSE_BUILTIN_LIBFMT
=no \
70 -DUSE_STATIC_BOOST
=no \
71 -DUSE_STATIC_LIBSTDCXX
=no \
72 -DUSE_STATIC_OPENZWAVE
=no \
73 -DUSE_OPENSSL_STATIC
=no \
77 TARGET_CXXFLAGS
+= -DWITH_GPIO
80 $(call Build
/Prepare
/Default
)
81 # Remove unwanted scripts
82 cd
$(PKG_BUILD_DIR
)/scripts
&& rm -rf \
83 buienradar_rain_example.pl \
86 dzVents
/{.gitignore
,documentation
,examples
,generated_scripts
,data
} \
87 dzVents
/runtime
/{integration-tests
,misc
/smoothing.xlsx
,tests
} \
89 lua_parsers
/example
* \
94 templates
/All.Python \
98 cd
$(PKG_BUILD_DIR
) && $(FIND
) -name
'*.md' -delete
101 define Package
/domoticz
/install
102 $(INSTALL_DIR
) $(1)/etc
/config
$(1)/etc
/hotplug.d
/tty
$(1)/etc
/init.d
$(1)/etc
/domoticz
/plugins
103 $(INSTALL_BIN
) .
/files
/domoticz.hotplug
$(1)/etc
/hotplug.d
/tty
/domoticz
104 $(INSTALL_BIN
) .
/files
/domoticz.init
$(1)/etc
/init.d
/domoticz
105 $(INSTALL_CONF
) .
/files
/domoticz.config
$(1)/etc
/config
/domoticz
106 $(INSTALL_DIR
) $(1)/usr
/share
/domoticz
$(1)/usr
/bin
107 $(CP
) $(PKG_INSTALL_DIR
)/usr
/dzVents
$(1)/usr
/share
/domoticz
/dzVents
108 $(CP
) $(PKG_INSTALL_DIR
)/usr
/Config
$(1)/usr
/share
/domoticz
/Config
109 $(CP
) $(PKG_INSTALL_DIR
)/usr
/scripts
$(1)/etc
/domoticz
/scripts
110 ln
-sf
/var
/lib
/domoticz
/dzVents
/generated_scripts
$(1)/etc
/domoticz
/scripts
/dzVents
111 ln
-sf
/var
/lib
/domoticz
/dzVents
/data
$(1)/etc
/domoticz
/scripts
/dzVents
112 $(CP
) $(PKG_INSTALL_DIR
)/usr
/www
$(1)/usr
/share
/domoticz
/
113 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/domoticz
$(1)/usr
/bin
/domoticz
114 # compress static web content
115 find
$(1)/usr
/share
/domoticz
/www
-name
"*.css" -exec gzip
-9 {} \
;
116 find
$(1)/usr
/share
/domoticz
/www
-name
"*.js" -exec gzip
-9 {} \
;
117 gzip
-9 $(1)/usr
/share
/domoticz
/www
/*.html
118 gzip
-9 $(1)/usr
/share
/domoticz
/www
/secpanel
/*.html
119 find
$(1)/usr
/share
/domoticz
/www
/views
-name
"*.html" -exec sh
-c
'grep -q "<\!--#embed" {} || gzip -9 {}' \
;
122 define Package
/domoticz
/conffiles
128 $(eval
$(call BuildPackage
,domoticz
))