summaryrefslogtreecommitdiff
path: root/www/domoticz/Makefile
blob: 1aeedbf6bdd903767d0bb597281180933b5b0df6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

PORTNAME=	domoticz
PORTVERSION=	2020.2
PORTREVISION=	1
CATEGORIES=	www

MAINTAINER=	kiwi@oav.net
COMMENT=	Home Automation System

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/License.txt

LIB_DEPENDS=	libcurl.so:ftp/curl libboost_system.so:devel/boost-libs \
		libminizip.so:archivers/minizip libjsoncpp.so:devel/jsoncpp
BUILD_DEPENDS=	cereal>=1.2.2:devel/cereal

USES=		cmake compiler:c++11-lang pkgconfig ssl lua:53 sqlite

OPTIONS_SUB=	YES
OPTIONS_DEFINE=	SMQTT PYTHON TELLDUS OPENZWAVE PRECOMP
OPTIONS_DEFAULT=	PYTHON PRECOMP
SMQTT_DESC=	Use domoticz Mosquitto instead of ports one
PYTHON_DESC=	Enable Python for Plugins and Event-Scripts
TELLDUS_DESC=	Enable Tellstick Telldus support
OPENZWAVE_DESC=	Enable OpenZWave support
PRECOMP_DESC=	Enable usage of precompiled header to speed build time

.include <bsd.port.options.mk>

USE_GITHUB=	yes
# allow to build port with MQQT version recommended by the upstream
# see https://github.com/domoticz/domoticz/tree/development/extern for the
# specific release tag
GH_TUPLE=	eclipse:mosquitto:22e0a4b:mosquitto/extern/mosquitto

USE_RC_SUBR=	domoticz

USERS=		domoticz
GROUPS=		domoticz

CMAKE_INSTALL_PREFIX=	${PREFIX}/domoticz
CMAKE_OFF+=		GIT_SUBMODULE USE_STATIC_BOOST USE_OPENSSL_STATIC \
			USE_BUILTIN_SQLITE USE_BUILTIN_MINIZIP USE_BUILTIN_JSONCPP

.if ${PORT_OPTIONS:MSMQTT}
CMAKE_ON+=	USE_BUILTIN_MQTT
.else
CMAKE_OFF+=	USE_BUILTIN_MQTT
LIB_DEPENDS+=	libmosquitto.so:net/mosquitto
.endif

.if ${PORT_OPTIONS:MPYTHON}
CMAKE_ON+=	USE_PYTHON
USES+=		python:3.7
.else
CMAKE_OFF+=	USE_PYTHON
.endif

.if ${PORT_OPTIONS:MTELLDUS}
LIB_DEPENDS+=	libtelldus-core.so:comms/telldus-core
.endif

.if ${PORT_OPTIONS:MPRECOMP}
CMAKE_ON+=	USE_PRECOMPILED_HEADER
.else
CMAKE_OFF+=	USE_PRECOMPILED_HEADER
.endif

.if ${PORT_OPTIONS:MOPENZWAVE}
CMAKE_OFF+=	USE_STATIC_OPENZWAVE
LIB_DEPENDS+=	libopenzwave.so:comms/openzwave-devel
.endif

post-install:
	${MKDIR} ${STAGEDIR}/var/db/domoticz ${STAGEDIR}/var/run/domoticz

.include <bsd.port.mk>