# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4
maintainers {g5pw @g5pw} openmaintainer
description Prosody is a modern flexible communications server for \
Jabber/XMPP written in Lua.
long_description ${description} It aims to be easy to set up and configure, \
and light on resources. For developers it aims to be easy \
to extend and give a flexible system on which to rapidly \
develop added functionality, or prototype new protocols.
homepage https://prosody.im
master_sites ${homepage}/downloads/source/
depends_lib port:lua-luasocket \
checksums rmd160 a27ba1b4ddd4511842cba45aeef7193b42c7ff17 \
sha256 8911f6dc29b9e0c4edf9e61dc23fa22d77bc42c4caf28b809ab843b2f08e4831 \
set logdir ${prefix}/var/log/${name}
set rundir ${prefix}/var/run/${name}
patchfiles patch-config.diff
reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/prosody.cfg.lua.dist
configure.cflags-append -fPIC
configure.ldflags-append -bundle -undefined dynamic_lookup
--with-lua-include=${prefix}/include \
--with-lua-lib=${prefix}/lib \
--c-compiler=${configure.cc} \
--linker=${configure.cc} \
--cflags=\"${configure.cflags}\" \
--ldflags=\"${configure.ldflags}\"
startupitem.start "${prefix}/bin/${name}ctl start"
startupitem.stop "${prefix}/bin/${name}ctl stop"
startupitem.restart "${prefix}/bin/${name}ctl restart"
startupitem.pidfile auto ${rundir}/prosody.pid
add_users ${name} group=${name} realname=Prosody\ Server