initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
config BR2_PACKAGE_DOMOTICZ
bool "domoticz"
depends on BR2_USE_MMU # fork()
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_6 # C++14
# pthread_condattr_setclock
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mosquitto
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_USE_WCHAR
depends on BR2_PACKAGE_LUA_5_3
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
select BR2_PACKAGE_BOOST
select BR2_PACKAGE_BOOST_ATOMIC
select BR2_PACKAGE_BOOST_DATE_TIME
select BR2_PACKAGE_BOOST_SYSTEM
select BR2_PACKAGE_BOOST_THREAD
select BR2_PACKAGE_CEREAL
select BR2_PACKAGE_FMT
select BR2_PACKAGE_JSONCPP
select BR2_PACKAGE_LIBCURL
select BR2_PACKAGE_MOSQUITTO
select BR2_PACKAGE_OPENSSL
select BR2_PACKAGE_SQLITE
select BR2_PACKAGE_ZLIB
help
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.
http://domoticz.com
comment "domoticz needs lua 5.3 and a toolchain w/ C++, gcc >= 6, NPTL, wchar, dynamic library"
depends on BR2_USE_MMU
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
depends on !BR2_INSTALL_LIBSTDCPP || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_6 || \
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
!BR2_USE_WCHAR || BR2_STATIC_LIBS || \
!BR2_PACKAGE_LUA_5_3
comment "domoticz needs exception_ptr"
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
+51
View File
@@ -0,0 +1,51 @@
#!/bin/sh
DAEMON="domoticz"
PIDFILE="/var/run/$DAEMON.pid"
DOMOTICZ_ARGS="-daemon -www 8080 -sslwww 443"
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
start() {
printf 'Starting %s: ' "$DAEMON"
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/opt/domoticz/$DAEMON" \
-- $DOMOTICZ_ARGS
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
start-stop-daemon -K -q -p "$PIDFILE"
status=$?
if [ "$status" -eq 0 ]; then
rm -f "$PIDFILE"
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
sleep 1
start
}
case "$1" in
start|stop|restart)
"$1";;
reload)
# Restart, since there is no true "reload" feature.
restart;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac
+3
View File
@@ -0,0 +1,3 @@
# Locally computed:
sha256 d8e99e0f96873aa105b57f73656ef7a14c89e0acf2649b2d4ef1167b14bab4b2 domoticz-2021.1-br1.tar.gz
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 License.txt
+96
View File
@@ -0,0 +1,96 @@
################################################################################
#
# domoticz
#
################################################################################
DOMOTICZ_VERSION = 2021.1
DOMOTICZ_SITE = https://github.com/domoticz/domoticz
DOMOTICZ_SITE_METHOD = git
DOMOTICZ_GIT_SUBMODULES = YES
DOMOTICZ_LICENSE = GPL-3.0
DOMOTICZ_LICENSE_FILES = License.txt
DOMOTICZ_CPE_ID_VENDOR = domoticz
DOMOTICZ_DEPENDENCIES = \
boost \
cereal \
fmt \
host-pkgconf \
jsoncpp \
libcurl \
lua \
mosquitto \
openssl \
sqlite \
zlib
# Disable precompiled header as it needs cmake >= 3.16
DOMOTICZ_CONF_OPTS = -DUSE_PRECOMPILED_HEADER=OFF
# Due to the dependency on mosquitto, domoticz depends on
# !BR2_STATIC_LIBS so set USE_STATIC_BOOST and USE_OPENSSL_STATIC to OFF
DOMOTICZ_CONF_OPTS += \
-DUSE_STATIC_BOOST=OFF \
-DUSE_OPENSSL_STATIC=OFF
# Do not use any built-in libraries which are enabled by default for
# jsoncpp, fmt, sqlite and mqtt
DOMOTICZ_CONF_OPTS += \
-DUSE_BUILTIN_JSONCPP=OFF \
-DUSE_BUILTIN_LIBFMT=OFF \
-DUSE_BUILTIN_SQLITE=OFF \
-DUSE_BUILTIN_MQTT=OFF
ifeq ($(BR2_PACKAGE_LIBUSB),y)
DOMOTICZ_DEPENDENCIES += libusb
DOMOTICZ_CONF_OPTS += -DWITH_LIBUSB=ON
else
DOMOTICZ_CONF_OPTS += -DWITH_LIBUSB=OFF
endif
ifeq ($(BR2_PACKAGE_OPENZWAVE),y)
DOMOTICZ_DEPENDENCIES += openzwave
# Due to the dependency on mosquitto, domoticz depends on
# !BR2_STATIC_LIBS so set USE_STATIC_OPENZWAVE to OFF otherwise
# domoticz will not find the openzwave library as it searches by
# default a static library.
DOMOTICZ_CONF_OPTS += -DUSE_STATIC_OPENZWAVE=OFF
endif
ifeq ($(BR2_PACKAGE_PYTHON3),y)
DOMOTICZ_DEPENDENCIES += python3
DOMOTICZ_CONF_OPTS += -DUSE_PYTHON=ON
else
DOMOTICZ_CONF_OPTS += -DUSE_PYTHON=OFF
endif
# Install domoticz in a dedicated directory (/opt/domoticz) as
# domoticz expects by default that all its subdirectories (www,
# Config, scripts, ...) are in the binary directory.
DOMOTICZ_TARGET_DIR = /opt/domoticz
DOMOTICZ_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=$(DOMOTICZ_TARGET_DIR)
# Delete License.txt and updatedomo files installed by domoticz in target
# directory
# Do not delete History.txt as it is used in source code
define DOMOTICZ_REMOVE_UNNEEDED_FILES
$(RM) $(TARGET_DIR)/$(DOMOTICZ_TARGET_DIR)/License.txt
$(RM) $(TARGET_DIR)/$(DOMOTICZ_TARGET_DIR)/updatedomo
endef
DOMOTICZ_POST_INSTALL_TARGET_HOOKS += DOMOTICZ_REMOVE_UNNEEDED_FILES
# Use dedicated init scripts for systemV and systemd instead of using
# domoticz.sh as it is not compatible with buildroot init system
define DOMOTICZ_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/domoticz/S99domoticz \
$(TARGET_DIR)/etc/init.d/S99domoticz
endef
define DOMOTICZ_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/domoticz/domoticz.service \
$(TARGET_DIR)/usr/lib/systemd/system/domoticz.service
endef
$(eval $(cmake-package))
+10
View File
@@ -0,0 +1,10 @@
[Unit]
Description=Domoticz Home Automation System
After=network.target
[Service]
ExecStart=/opt/domoticz/domoticz -daemon -www 8080 -sslwww 443
Restart=always
[Install]
WantedBy=multi-user.target