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.

WWW: http://www.prosody.im/

PR:		ports/136267
Submitted by:	Andrew Lewis <dru at silenceisdefeat.net>
This commit is contained in:
Philip M. Gollucci 2009-07-14 06:30:55 +00:00
parent 3e0f3a3764
commit c5dc3e5e48
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=237759
10 changed files with 380 additions and 0 deletions

View file

@ -120,6 +120,7 @@
SUBDIR += pidgin-sipe
SUBDIR += pidgin-twitter
SUBDIR += pork
SUBDIR += prosody
SUBDIR += psi
SUBDIR += py-jabber
SUBDIR += py-msnp

42
net-im/prosody/Makefile Normal file
View file

@ -0,0 +1,42 @@
# New ports collection makefile for: prosody
# Date created: 25 June 2009
# Whom: Andrew Lewis <dru@silenceisdefeat.net>
#
# $FreeBSD$
#
PORTNAME= prosody
PORTVERSION= 0.4.2
CATEGORIES= net-im
MASTER_SITES= http://prosody.im/downloads/source/
MAINTAINER= dru@silenceisdefeat.net
COMMENT= A simple extensible XMPP server written in Lua
BUILD_DEPENDS= ${LOCALBASE}/include/stringprep.h:${PORTSDIR}/dns/libidn
RUN_DEPENDS= ${LUA_MODLIBDIR}/socket/core.so:${PORTSDIR}/net/luasocket \
${LUA_MODLIBDIR}/ssl.so:${PORTSDIR}/security/luasec \
${LUA_MODLIBDIR}/lxp.so:${PORTSDIR}/textproc/luaexpat
USE_RC_SUBR= prosody
ONLY_FOR_ARCHS= i386
USE_LUA= 5.1
WANT_LUA_VER= 5.1
HAS_CONFIGURE= yes
CONFIGURE_ARGS+="--ostype=freebsd"
CONFIGURE_ENV+= LOCALBASE="${LOCALBASE}" LUA_SUFFIX="-${LUA_VER}" LUA_LIBDIR="${LUA_LIBDIR}" LUA_INCDIR="${LUA_INCDIR}"
SUB_FILES= pkg-install pkg-deinstall prosody.cfg.lua.install
pre-install:
${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
${MV} ${WRKDIR}/prosody.cfg.lua.install ${WRKSRC}/prosody.cfg.lua.install
${REINPLACE_CMD} -e 's|/usr/bin/env lua|${LUA_CMD}|' ${WRKSRC}/prosody ${WRKSRC}/prosodyctl
post-install:
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>

3
net-im/prosody/distinfo Normal file
View file

@ -0,0 +1,3 @@
MD5 (prosody-0.4.2.tar.gz) = 2669478311b3a67522669acdf03cf85c
SHA256 (prosody-0.4.2.tar.gz) = 4ba7a58832a15cc942dbc1dfcdfbc0157a8dfae3b940ee5a6743e7870433803f
SIZE (prosody-0.4.2.tar.gz) = 114291

View file

@ -0,0 +1,42 @@
--- orig.configure 2009-06-12 14:35:23.000000000 +0000
+++ configure 2009-06-25 19:03:24.000000000 +0000
@@ -5,11 +5,11 @@
PREFIX=/usr/local
SYSCONFDIR="$PREFIX/etc/prosody"
DATADIR="$PREFIX/var/lib/prosody"
-LUA_SUFFIX=""
+#LUA_SUFFIX=""
LUA_DIR="/usr"
LUA_BINDIR="/usr/bin"
-LUA_INCDIR="/usr/include"
-LUA_LIBDIR="/usr/lib"
+#LUA_INCDIR="/usr/include"
+#LUA_LIBDIR="/usr/lib"
IDN_LIB=idn
OPENSSL_LIB=crypto
CC=gcc
@@ -26,7 +26,7 @@
--help This help.
--ostype=OS Use one of the OS presets.
- May be one of: debian, macosx
+ May be one of: debian, macosx, freebsd
--prefix=DIR Prefix where Prosody should be installed.
Default is $PREFIX
--sysconfdir=DIR Location where the config file should be installed.
@@ -150,6 +150,15 @@
CFLAGS="-Wall"
LFLAGS="-bundle -undefined dynamic_lookup"
fi
+ if [ "$OSTYPE" = "freebsd" ]
+ then
+ LUA_INCDIR_SET=yes
+ LUA_LIBDIR_SET=yes
+ CFLAGS="-D_POSIX_SOURCE -I${LOCALBASE}/include"
+ LFLAGS="-lm -shared -L${LOCALBASE}/lib"
+ LUA_SUFFIX_SET=yes
+ LUA_LIB=lua
+ fi
fi
if [ "$PREFIX_SET" = "yes" -a ! "$SYSCONFDIR_SET" = "yes" ]

View file

@ -0,0 +1,22 @@
#!/bin/sh
#
# $FreeBSD$
#
case $2 in
POST-DEINSTALL)
echo "===> post-deinstallation information for $1:"
echo ""
echo " Note:"
echo " Prosody related user accounts and groups were not removed."
echo ""
echo " To remove the 'prosody' user and the 'prosody' group which were"
echo " created by a default installation of this package, run"
echo ""
echo " pw userdel -n prosody"
echo " pw groupdel -n prosody"
;;
*)
;;
esac
exit 0

View file

@ -0,0 +1,49 @@
#!/bin/sh
#
# $FreeBSD$
#
PW=/usr/sbin/pw
UID=1789
GID=$UID
USER="prosody"
GROUP="prosody"
PREFIX="%%PREFIX%%"
case $2 in
PRE-INSTALL)
if ${PW} group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if ${PW} groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if ${PW} user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
else
if ${PW} useradd ${USER} -u ${UID} -g daemon -h - \
-d "/nonexistent" -s /usr/sbin/nologin -c "Prosody XMPP Server"
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
;;
POST-INSTALL)
chown "${USER}" $PREFIX/var/lib/prosody
;;
*)
echo "?"
;;
esac
exit 0

View file

@ -0,0 +1,94 @@
-- Prosody Example Configuration File
--
-- If it wasn't already obvious, -- starts a comment, and all
-- text after it on a line is ignored by Prosody.
--
-- The config is split into sections, a global section, and one
-- for each defined host that we serve. You can add as many host
-- sections as you like.
--
-- Lists are written { "like", "this", "one" }
-- Lists can also be of { 1, 2, 3 } numbers, etc.
-- Either commas, or semi-colons; may be used
-- as seperators.
--
-- A table is a list of values, except each value has a name. An
-- example would be:
--
-- logging = { type = "html", directory = "/var/logs", rotate = "daily" }
--
-- Whitespace (that is tabs, spaces, line breaks) is mostly insignificant, so
-- can
-- be placed anywhere
-- that you deem fitting.
--
-- Tip: You can check that the syntax of this file is correct when you have finished
-- by running: luac -p prosody.cfg.lua
-- If there are any errors, it will let you know what and where they are, otherwise it
-- will keep quiet.
--
-- The only thing left to do is rename this file to remove the .dist ending, and fill in the
-- blanks. Good luck, and happy Jabbering!
-- Global settings go in this section
Host "*"
prosody_user = "prosody"
pidfile = "%%PREFIX%%/var/lib/prosody/prosody.pid"
log = {
{ levels = { min = "info" }, to = "syslog" };
}
-- This is the list of modules Prosody will load on startup.
-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
modules_enabled = {
-- Generally required
"roster"; -- Allow users to have a roster. Recommended ;)
"saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
--"tls"; -- Add support for secure TLS on c2s/s2s connections
"dialback"; -- s2s dialback support
"disco"; -- Service discovery
-- Not essential, but recommended
"private"; -- Private XML storage (for room bookmarks, etc.)
"vcard"; -- Allow users to set vCards
-- Nice to have
"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
"version"; -- Replies to server version requests
"uptime"; -- Report how long server has been running
"time"; -- Let others know the time here on this server
"ping"; -- Replies to XMPP pings with pongs
-- Other specific functionality
--"register"; -- Allow users to register on this server using a client
"posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
--"console"; -- telnet to port 5582 (needs console_enabled = true)
--"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
--"httpserver"; -- Serve static files from a directory over HTTP
};
-- These are the SSL/TLS-related settings. If you don't want
-- to use SSL/TLS, you may comment or remove this
-- ssl = {
-- key = "certs/localhost.key";
-- certificate = "certs/localhost.cert";
-- }
-- This allows clients to connect to localhost. No harm in it.
Host "localhost"
-- Section for example.com
-- (replace example.com with your domain name)
--Host "example.com"
-- -- Assign this host a certificate for TLS, otherwise it would use the one
-- -- set in the global section (if any).
-- -- Note that old-style SSL on port 5223 only supports one certificate, and will always
-- -- use the global one.
-- ssl = {
-- key = "certs/example.com.key";
-- certificate = "certs/example.com.crt";
-- }
--
-- enabled = false -- This will disable the host, preserving the config, but denying connections
-- Set up a MUC (multi-user chat) room server on conference.example.com:
--Component "conference.example.com" "muc"

View file

@ -0,0 +1,31 @@
#!/bin/sh
# PROVIDE: prosody
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# prosody_enable (bool): Set to NO by default.
# Set it to YES to enable Prosody
#
. %%RC_SUBR%%
name="prosody"
rcvar=`set_rcvar`
pidfile="%%PREFIX%%/var/lib/prosody/prosody.pid"
command="%%PREFIX%%/bin/prosodyctl"
load_rc_config $name
prosody=${prosody_enable-"NO"}
command_args="$1"
status_cmd=prosody_status_cmd
prosody_status_cmd()
{
%%PREFIX%%/bin/prosodyctl status
}
run_rc_command "$1"

6
net-im/prosody/pkg-descr Normal file
View file

@ -0,0 +1,6 @@
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.
WWW: http://www.prosody.im/

90
net-im/prosody/pkg-plist Normal file
View file

@ -0,0 +1,90 @@
bin/prosody
bin/prosodyctl
%%ETCDIR%%/certs/localhost.cert
%%ETCDIR%%/certs/localhost.key
%%ETCDIR%%/prosody.cfg.lua
lib/prosody/core/actions.lua
lib/prosody/core/componentmanager.lua
lib/prosody/core/configmanager.lua
lib/prosody/core/discomanager.lua
lib/prosody/core/eventmanager.lua
lib/prosody/core/hostmanager.lua
lib/prosody/core/loggingmanager.lua
lib/prosody/core/modulemanager.lua
lib/prosody/core/objectmanager.lua
lib/prosody/core/offlinemanager.lua
lib/prosody/core/presencemanager.lua
lib/prosody/core/rostermanager.lua
lib/prosody/core/s2smanager.lua
lib/prosody/core/sessionmanager.lua
lib/prosody/core/stanza_router.lua
lib/prosody/core/usermanager.lua
lib/prosody/core/xmlhandlers.lua
lib/prosody/modules/mod_actions_http.lua
lib/prosody/modules/mod_bosh.lua
lib/prosody/modules/mod_component.lua
lib/prosody/modules/mod_console.lua
lib/prosody/modules/mod_debug.lua
lib/prosody/modules/mod_dialback.lua
lib/prosody/modules/mod_disco.lua
lib/prosody/modules/mod_httpserver.lua
lib/prosody/modules/mod_legacyauth.lua
lib/prosody/modules/mod_muc.lua
lib/prosody/modules/mod_ping.lua
lib/prosody/modules/mod_posix.lua
lib/prosody/modules/mod_private.lua
lib/prosody/modules/mod_register.lua
lib/prosody/modules/mod_roster.lua
lib/prosody/modules/mod_saslauth.lua
lib/prosody/modules/mod_selftests.lua
lib/prosody/modules/mod_time.lua
lib/prosody/modules/mod_tls.lua
lib/prosody/modules/mod_uptime.lua
lib/prosody/modules/mod_vcard.lua
lib/prosody/modules/mod_version.lua
lib/prosody/modules/mod_xmlrpc.lua
lib/prosody/net/adns.lua
lib/prosody/net/connlisteners.lua
lib/prosody/net/dns.lua
lib/prosody/net/http.lua
lib/prosody/net/httpclient_listener.lua
lib/prosody/net/httpserver.lua
lib/prosody/net/httpserver_listener.lua
lib/prosody/net/server.lua
lib/prosody/net/xmppclient_listener.lua
lib/prosody/net/xmppcomponent_listener.lua
lib/prosody/net/xmppserver_listener.lua
lib/prosody/util/array.lua
lib/prosody/util/dataforms.lua
lib/prosody/util/datamanager.lua
lib/prosody/util/datetime.lua
lib/prosody/util/dependencies.lua
lib/prosody/util/discohelper.lua
lib/prosody/util/encodings.so
lib/prosody/util/events.lua
lib/prosody/util/hashes.so
lib/prosody/util/import.lua
lib/prosody/util/iterators.lua
lib/prosody/util/jid.lua
lib/prosody/util/logger.lua
lib/prosody/util/multitable.lua
lib/prosody/util/pposix.so
lib/prosody/util/prosodyctl.lua
lib/prosody/util/pubsub.lua
lib/prosody/util/sasl.lua
lib/prosody/util/serialization.lua
lib/prosody/util/set.lua
lib/prosody/util/signal.so
lib/prosody/util/stanza.lua
lib/prosody/util/termcolours.lua
lib/prosody/util/timer.lua
lib/prosody/util/uuid.lua
lib/prosody/util/xmlrpc.lua
lib/prosody/util/ztact.lua
@dirrm %%ETCDIR%%/certs
@dirrm %%ETCDIR%%
@dirrm lib/prosody/util
@dirrm lib/prosody/net
@dirrm lib/prosody/modules
@dirrm lib/prosody/core
@dirrm lib/prosody