summaryrefslogtreecommitdiff
path: root/chat/prosody/Makefile
diff options
context:
space:
mode:
authorfhajny <fhajny@pkgsrc.org>2010-09-21 11:01:22 +0000
committerfhajny <fhajny@pkgsrc.org>2010-09-21 11:01:22 +0000
commit8c759c22fb38d8e2018c4a85bcee4645bacaa087 (patch)
treead8516beac58ba2372f391ec5098d690164abb15 /chat/prosody/Makefile
parentbeed8bce4a23f5c209af693ad9fc3724e8c31242 (diff)
downloadpkgsrc-8c759c22fb38d8e2018c4a85bcee4645bacaa087.tar.gz
Import prosody-0.7.0 as chat/prosody.
Prosody is a flexible communications server for Jabber/XMPP written in Lua. It aims to be easy to use, 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. (Based on wip/prosody.)
Diffstat (limited to 'chat/prosody/Makefile')
-rw-r--r--chat/prosody/Makefile77
1 files changed, 77 insertions, 0 deletions
diff --git a/chat/prosody/Makefile b/chat/prosody/Makefile
new file mode 100644
index 00000000000..92edbcc41b1
--- /dev/null
+++ b/chat/prosody/Makefile
@@ -0,0 +1,77 @@
+# $NetBSD: Makefile,v 1.1.1.1 2010/09/21 11:01:22 fhajny Exp $
+#
+
+DISTNAME= prosody-0.7.0
+CATEGORIES= chat
+MASTER_SITES= http://prosody.im/downloads/source/
+
+MAINTAINER= filip@joyent.com
+HOMEPAGE= http://prosody.im/
+COMMENT= Flexible communications server for Jabber/XMPP written in Lua
+LICENSE= mit
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+DEPENDS+= lua-filesystem>=1.0:../../devel/lua-filesystem
+DEPENDS+= lua-expat>=1.1:../../textproc/lua-expat
+DEPENDS+= lua-sec>=0.3.3:../../security/lua-sec
+DEPENDS+= lua-socket>=2.0:../../net/lua-socket
+
+HAS_CONFIGURE= yes
+USE_TOOLS+= gmake
+BUILD_DEFS+= VARBASE
+
+.include "../../mk/bsd.prefs.mk"
+
+PROSODY_USER?= prosody
+PROSODY_GROUP?= ${PROSODY_USER}
+PROSODY_DATA?= ${VARBASE}/db/prosody
+PROSODY_LOG?= ${VARBASE}/log/prosody
+PROSODY_RUN?= ${VARBASE}/run/prosody
+
+OWN_DIRS+= ${PROSODY_DATA} ${PROSODY_LOG} ${PROSODY_RUN}
+OWN_DIRS_PERMS+= ${PROSODY_DATA} ${PROSODY_USER} ${PROSODY_GROUP} 0770
+OWN_DIRS_PERMS+= ${PROSODY_LOG} ${PROSODY_USER} ${PROSODY_GROUP} 0770
+OWN_DIRS_PERMS+= ${PROSODY_RUN} ${PROSODY_USER} ${PROSODY_GROUP} 0770
+MAKE_DIRS+= ${PKG_SYSCONFDIR}/certs
+
+PKG_GROUPS+= ${PROSODY_GROUP}
+PKG_USERS+= ${PROSODY_USER}:${PROSODY_GROUP}
+PKG_GECOS.${PROSODY_USER}= Prosody daemon user
+PKG_HOME.${PROSODY_USER}= ${PROSODY_DATA}
+PKG_SHELL.${PROSODY_USER}= ${SH}
+
+PKG_SYSCONFSUBDIR= ${PKGBASE}
+EGDIR= ${PREFIX}/share/examples/${PKGBASE}
+CONF_FILES+= ${EGDIR}/prosody.cfg.lua ${PKG_SYSCONFDIR}/prosody.cfg.lua
+CONF_FILES+= ${EGDIR}/certs/localhost.cert ${PKG_SYSCONFDIR}/certs/localhost.cert
+CONF_FILES+= ${EGDIR}/certs/localhost.key ${PKG_SYSCONFDIR}/certs/localhost.key
+
+REPLACE_INTERPRETER+= lua
+REPLACE.lua.old= /usr/bin/env lua
+REPLACE.lua.new= ${PREFIX}/bin/lua
+REPLACE_FILES.lua= prosody prosodyctl
+
+CONFIGURE_ARGS+= --prefix=${PREFIX}
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+= --datadir=${PROSODY_DATA}
+
+SUBST_CLASSES+= eg
+SUBST_MESSAGE.eg= Fixing examples/configuration directories
+SUBST_STAGE.eg= post-patch
+SUBST_FILES.eg= Makefile man/prosodyctl.man
+SUBST_SED.eg= -e 's,@EGDIR@,${EGDIR},g'
+SUBST_SED.eg+= -e 's,/etc/prosody,${PKG_SYSCONFDIR},g'
+
+SUBST_CLASSES+= config
+SUBST_MESSAGE.config= Configure POSIX functionality
+SUBST_STAGE.config= pre-configure
+SUBST_FILES.config= prosody.cfg.lua.dist
+SUBST_SED.config= -e 's,@PROSODY_DATA@,${PROSODY_DATA},'
+SUBST_SED.config+= -e 's,@PROSODY_LOG@,${PROSODY_LOG},'
+SUBST_SED.config+= -e 's,@PROSODY_RUN@,${PROSODY_RUN},'
+
+.include "../../devel/libidn/buildlink3.mk"
+.include "../../lang/lua/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"