Changeset View
Changeset View
Standalone View
Standalone View
www/domoticz/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= domoticz | PORTNAME= domoticz | ||||
PORTVERSION= 4.${DOMOTICZ_REL} | PORTVERSION= 2020.2 | ||||
PORTREVISION= 1 | |||||
CATEGORIES= www | CATEGORIES= www | ||||
MAINTAINER= kiwi@oav.net | MAINTAINER= kiwi@oav.net | ||||
COMMENT= Home Automation System | COMMENT= Home Automation System | ||||
LICENSE= GPLv3 | LICENSE= GPLv3 | ||||
LICENSE_FILE= ${WRKSRC}/License.txt | LICENSE_FILE= ${WRKSRC}/License.txt | ||||
LIB_DEPENDS= libcurl.so:ftp/curl \ | LIB_DEPENDS= libcurl.so:ftp/curl | ||||
libexpat.so:textproc/expat2 | BUILD_DEPENDS= cereal>=1.2.2:devel/cereal | ||||
CONFLICTS_INSTALL?= domoticz-[23]* domoticz-devel-* | USES= cmake pkgconfig ssl lua:53 | ||||
CONFLICTS_INSTALL?= domoticz-[234]* | |||||
OPTIONS_SUB= YES | OPTIONS_SUB= YES | ||||
OPTIONS_DEFINE= PYTHON SBOOST SLUA SMINIZIP SMQTT SSQLITE SSSL TELLDUS | OPTIONS_DEFINE= SSSL SBOOST SMQTT SSQLITE SMINIZIP SJSONCPP PYTHON TELLDUS OPENZWAVE PRECOMP | ||||
OPTIONS_DEFAULT= PYTHON PRECOMP | |||||
SBOOST_DESC= Use static Boost instead of dynamic linking | SBOOST_DESC= Use static Boost instead of dynamic linking | ||||
SSSL_DESC= Use static OpenSSL library instead of dynamic linking | SSSL_DESC= Use static OpenSSL library instead of dynamic linking | ||||
SLUA_DESC= Use domoticz provided LUA instead of ports one | SMQTT_DESC= Use domoticz Mosquitto instead of ports one | ||||
SMQTT_DESC= Use domoticz mosquitto instead of ports one | |||||
SSQLITE_DESC= Use domoticz SQLLite instead of ports one | SSQLITE_DESC= Use domoticz SQLLite instead of ports one | ||||
SMINIZIP_DESC= Use domoticz minizip instead of ports one | SMINIZIP_DESC= Use domoticz Minizip instead of ports one | ||||
PYTHON_DESC= Enable support for Python Plugins | SJSONCPP_DESC= Use domoticz JSonCPP instead of ports one | ||||
PYTHON_DESC= Enable Python for Plugins and Event-Scripts | |||||
TELLDUS_DESC= Enable support for Telldus | TELLDUS_DESC= Enable support for Telldus | ||||
OPENZWAVE_DESC= Enable OpenZWave support | |||||
PRECOMP_DESC= Enable usage of precompiled header to speed build time | |||||
.include <bsd.port.options.mk> | .include <bsd.port.options.mk> | ||||
USES= cmake compiler:c++11-lang iconv pkgconfig ssl | |||||
# This hack is to get rid of dependency of git while building | |||||
# the package. | |||||
DOMOTICZ_REL= 10717 | |||||
DOMOTICZ_TS= 1565707487 | |||||
USE_GITHUB= yes | USE_GITHUB= yes | ||||
# see https://github.com/domoticz/domoticz/tree/development/extern for the specific release tag | |||||
GH_TUPLE= open-source-parsers:jsoncpp:3beb37e:jsoncpp/extern/jsoncpp \ | |||||
domoticz:minizip:f528264:minizip/extern/minizip \ | |||||
eclipse:mosquitto:22e0a4b:mosquitto/extern/mosquitto \ | |||||
azadkuh:sqlite-amalgamation:cd94546:sqlite_amalgamation/extern/sqlite-amalgamation | |||||
USE_RC_SUBR= domoticz | USE_RC_SUBR= domoticz | ||||
USERS= domoticz | USERS= domoticz | ||||
GROUPS= domoticz | GROUPS= domoticz | ||||
CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX=${PREFIX}/domoticz \ | CMAKE_INSTALL_PREFIX=${PREFIX}/domoticz | ||||
-DUSE_BUILTIN_ZLIB="NO" \ | CMAKE_OFF+= GIT_SUBMODULE | ||||
-DUSE_STATIC_OPENZWAVE="NO" | |||||
.if ${PORT_OPTIONS:MSSSL} | .if ${PORT_OPTIONS:MSSSL} | ||||
CMAKE_ARGS+= -DUSE_OPENSSL_STATIC="YES" | CMAKE_ON+= USE_OPENSSL_STATIC | ||||
.else | .else | ||||
CMAKE_ARGS+= -DUSE_OPENSSL_STATIC="NO" | CMAKE_OFF+= USE_OPENSSL_STATIC | ||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MSBOOST} | .if ${PORT_OPTIONS:MSBOOST} | ||||
CMAKE_ARGS+= -DUSE_STATIC_BOOST="YES" | CMAKE_ON+= USE_STATIC_BOOST | ||||
BUILD_DEPENDS+= boost-libs>=0:devel/boost-libs | BUILD_DEPENDS+= boost-libs>=0:devel/boost-libs | ||||
.else | .else | ||||
CMAKE_ARGS+= -DUSE_STATIC_BOOST="NO" | CMAKE_OFF+= USE_STATIC_BOOST | ||||
LIB_DEPENDS+= libboost_system.so:devel/boost-libs | LIB_DEPENDS+= libboost_system.so:devel/boost-libs | ||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MSLUA} | |||||
CMAKE_ARGS+= -DUSE_BUILTIN_LUA="YES" | |||||
.else | |||||
CMAKE_ARGS+= -DUSE_BUILTIN_LUA="NO" | |||||
USES+= lua:52 | |||||
.endif | |||||
.if ${PORT_OPTIONS:MSMQTT} | .if ${PORT_OPTIONS:MSMQTT} | ||||
CMAKE_ARGS+= -DUSE_BUILTIN_MQTT="YES" | CMAKE_ON+= USE_BUILTIN_MQTT | ||||
.else | .else | ||||
CMAKE_ARGS+= -DUSE_BUILTIN_MQTT="NO" | CMAKE_OFF+= USE_BUILTIN_MQTT | ||||
LIB_DEPENDS+= libmosquitto.so:net/mosquitto | LIB_DEPENDS+= libmosquitto.so:net/mosquitto | ||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MSSQLITE} | .if ${PORT_OPTIONS:MSSQLITE} | ||||
CMAKE_ARGS+= -DUSE_BUILTIN_SQLITE="YES" | CMAKE_ON+= USE_BUILTIN_SQLITE | ||||
.else | .else | ||||
CMAKE_ARGS+= -DUSE_BUILTIN_SQLITE="NO" | CMAKE_OFF+= USE_BUILTIN_SQLITE | ||||
USES+= sqlite | USES+= sqlite | ||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MSMINIZIP} | .if ${PORT_OPTIONS:MSMINIZIP} | ||||
CMAKE_ARGS+= -DUSE_BUILTIN_MINIZIP="YES" | CMAKE_ON+= USE_BUILTIN_MINIZIP | ||||
.else | .else | ||||
CMAKE_ARGS+= -DUSE_BUILTIN_MINIZIP="NO" | CMAKE_OFF+= USE_BUILTIN_MINIZIP | ||||
LIB_DEPENDS+= libminizip.so:archivers/minizip | LIB_DEPENDS+= libminizip.so:archivers/minizip | ||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MSJSONCPP} | |||||
CMAKE_ON+= USE_BUILTIN_JSONCPP | |||||
.else | |||||
CMAKE_OFF+= USE_BUILTIN_JSONCPP | |||||
LIB_DEPENDS+= libjsoncpp.so:devel/jsoncpp | |||||
.endif | |||||
.if ${PORT_OPTIONS:MPYTHON} | .if ${PORT_OPTIONS:MPYTHON} | ||||
CMAKE_ARGS+= -DUSE_PYTHON="YES" | CMAKE_ON+= USE_PYTHON | ||||
USES+= python:3.6 | USES+= python:3.7 | ||||
.else | .else | ||||
CMAKE_ARGS+= -DUSE_PYTHON="NO" | CMAKE_OFF+= USE_PYTHON | ||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MTELLDUS} | .if ${PORT_OPTIONS:MTELLDUS} | ||||
LIB_DEPENDS+= libtelldus-core.so:comms/telldus-core | LIB_DEPENDS+= libtelldus-core.so:comms/telldus-core | ||||
.endif | .endif | ||||
post-patch: | .if ${PORT_OPTIONS:MPRECOMP} | ||||
@${REINPLACE_CMD} -e "s,\/opt,${PREFIX},g" ${WRKSRC}/CMakeLists.txt | CMAKE_ON+= USE_PRECOMPILED_HEADER | ||||
@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/CMakeLists.txt | .else | ||||
@${REINPLACE_CMD} -e "/^ADD_PRECOMPILED_HEADER/ d" ${WRKSRC}/CMakeLists.txt | CMAKE_OFF+= USE_PRECOMPILED_HEADER | ||||
@${REINPLACE_CMD} -e "s/\(#define APPVERSION\)\(.*\)/\1 ${DOMOTICZ_REL}/" ${WRKSRC}/appversion.default | .endif | ||||
@${REINPLACE_CMD} -e "s/\(#define APPHASH\)\(.*\)/\1 \"be79a17\"/" ${WRKSRC}/appversion.default | |||||
@${REINPLACE_CMD} -e "s/\(#define APPDATE\)\(.*\)/\1 ${DOMOTICZ_TS}/" ${WRKSRC}/appversion.default | |||||
.if ${PORT_OPTIONS:MOPENZWAVE} | |||||
CMAKE_OFF+= USE_STATIC_OPENZWAVE | |||||
LIB_DEPENDS+= libopenzwave.so:comms/openzwave-devel | |||||
.endif | |||||
post-install: | post-install: | ||||
@${MKDIR} ${STAGEDIR}/var/db/domoticz ${STAGEDIR}/var/run/domoticz | ${MKDIR} ${STAGEDIR}/var/db/domoticz ${STAGEDIR}/var/run/domoticz | ||||
.include <bsd.port.mk> | .include <bsd.port.mk> |