aboutsummaryrefslogtreecommitdiff
path: root/audio/mumble-server/Makefile
blob: 73cd2227923273ce906485babe04a0450a4a9c62 (plain) (blame)
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
PORTNAME=	mumble-server
DISTVERSION=	1.5.634
CATEGORIES=	audio net
MASTER_SITES=	https://github.com/${PORTNAME:S/-server//}-voip/${PORTNAME:S/-server//}/releases/download/v${DISTVERSION}/
DISTNAME=	${PORTNAME:S/-server//}-${DISTVERSION}

MAINTAINER=	vvd@FreeBSD.org
COMMENT=	Server component of Mumble
WWW=		https://www.mumble.info/

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	boost-libs>0:devel/boost-libs
LIB_DEPENDS=	libabsl_base.so:devel/abseil \
		libprotobuf.so:devel/protobuf

USES=		cmake compiler:c++17-lang pkgconfig python:build qt:5 ssl
USE_CXXSTD=	c++17
USE_QT=		buildtools:build core dbus network qmake:build sql xml
USE_RC_SUBR=	mumble_server

CMAKE_ARGS=	-DCMAKE_CXX_STANDARD=17
CMAKE_ON=	server
CMAKE_OFF=	client

CXXFLAGS+=	-Wno-deprecated-declarations

EXTRA_PATCHES+=	${.CURDIR}/../mumble/files/patch-src_MumbleProtocol.cpp
SUB_LIST+=	USERS="${USERS}" GROUPS="${GROUPS}"

USERS=		mumble-server
GROUPS=		mumble-server

OPTIONS_DEFINE=		AVAHI DOCS ICE LTO
OPTIONS_DEFAULT=	AVAHI LTO MYSQL SQLITE
OPTIONS_MULTI=		SQL
OPTIONS_MULTI_SQL=	MYSQL PGSQL SQLITE

ICE_DESC=		Ice Support

AVAHI_LIB_DEPENDS=	libdns_sd.so:net/avahi-libdns
AVAHI_CMAKE_BOOL=	zeroconf

ICE_LIB_DEPENDS=	libIce.so:devel/ice
ICE_CMAKE_BOOL=		ice

LTO_CMAKE_BOOL=		lto

MYSQL_USE=		QT=sql-mysql:run
PGSQL_USE=		QT=sql-pgsql:run
SQLITE_USE=		QT=sql-sqlite3:run

.include <bsd.port.pre.mk>

post-install:
	${SED} -i '' -e 's|database=.*|database=/var/db/mumble-server/mumble-server.sqlite| ; \
			s|;pidfile=.*|pidfile=/var/run/mumble-server/mumble-server.pid| ; \
			s|;logfile=.*|logfile=/var/log/mumble-server/mumble-server.log| ; \
			s|;host=.*|host=0.0.0.0|' \
		${STAGEDIR}${PREFIX}/etc/mumble/mumble-server.ini
	${MV}   ${STAGEDIR}${PREFIX}/etc/mumble/mumble-server.ini \
		${STAGEDIR}${PREFIX}/etc/mumble/mumble-server.ini.sample
.for f in bin/mumble-server-user-wrapper share/man/man1/mumble-server-user-wrapper.1
	${RM} ${STAGEDIR}${PREFIX}/${f}
.endfor

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in README.md SECURITY.md docs/additional-readmes/README.static.linux
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
.endfor

.include <bsd.port.post.mk>