diff options
author | pgollucci <pgollucci@FreeBSD.org> | 2009-07-14 14:30:55 +0800 |
---|---|---|
committer | pgollucci <pgollucci@FreeBSD.org> | 2009-07-14 14:30:55 +0800 |
commit | 844b870717321d2aa36a9173c4d7831785df1651 (patch) | |
tree | 6433f8ede957e799a83e146bee705aa8ed7b6ab2 /net-im | |
parent | 45d1c9dc85071ff12d94ea28d1508cb0f5faa186 (diff) | |
download | freebsd-ports-gnome-844b870717321d2aa36a9173c4d7831785df1651.tar.gz freebsd-ports-gnome-844b870717321d2aa36a9173c4d7831785df1651.tar.zst freebsd-ports-gnome-844b870717321d2aa36a9173c4d7831785df1651.zip |
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>
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/Makefile | 1 | ||||
-rw-r--r-- | net-im/prosody/Makefile | 42 | ||||
-rw-r--r-- | net-im/prosody/distinfo | 3 | ||||
-rw-r--r-- | net-im/prosody/files/patch-configure | 42 | ||||
-rw-r--r-- | net-im/prosody/files/pkg-deinstall.in | 22 | ||||
-rw-r--r-- | net-im/prosody/files/pkg-install.in | 49 | ||||
-rw-r--r-- | net-im/prosody/files/prosody.cfg.lua.install.in | 94 | ||||
-rw-r--r-- | net-im/prosody/files/prosody.in | 31 | ||||
-rw-r--r-- | net-im/prosody/pkg-descr | 6 | ||||
-rw-r--r-- | net-im/prosody/pkg-plist | 90 |
10 files changed, 380 insertions, 0 deletions
diff --git a/net-im/Makefile b/net-im/Makefile index 5759032d322d..a606d38a9353 100644 --- a/net-im/Makefile +++ b/net-im/Makefile @@ -120,6 +120,7 @@ SUBDIR += pidgin-sipe SUBDIR += pidgin-twitter SUBDIR += pork + SUBDIR += prosody SUBDIR += psi SUBDIR += py-jabber SUBDIR += py-msnp diff --git a/net-im/prosody/Makefile b/net-im/prosody/Makefile new file mode 100644 index 000000000000..d76f3fef1269 --- /dev/null +++ b/net-im/prosody/Makefile @@ -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> diff --git a/net-im/prosody/distinfo b/net-im/prosody/distinfo new file mode 100644 index 000000000000..cd49c3617a53 --- /dev/null +++ b/net-im/prosody/distinfo @@ -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 diff --git a/net-im/prosody/files/patch-configure b/net-im/prosody/files/patch-configure new file mode 100644 index 000000000000..ab8b1551a599 --- /dev/null +++ b/net-im/prosody/files/patch-configure @@ -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" ] diff --git a/net-im/prosody/files/pkg-deinstall.in b/net-im/prosody/files/pkg-deinstall.in new file mode 100644 index 000000000000..b6fa824ac934 --- /dev/null +++ b/net-im/prosody/files/pkg-deinstall.in @@ -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 diff --git a/net-im/prosody/files/pkg-install.in b/net-im/prosody/files/pkg-install.in new file mode 100644 index 000000000000..8d742c19f3f2 --- /dev/null +++ b/net-im/prosody/files/pkg-install.in @@ -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 diff --git a/net-im/prosody/files/prosody.cfg.lua.install.in b/net-im/prosody/files/prosody.cfg.lua.install.in new file mode 100644 index 000000000000..340bf4d76fd8 --- /dev/null +++ b/net-im/prosody/files/prosody.cfg.lua.install.in @@ -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" diff --git a/net-im/prosody/files/prosody.in b/net-im/prosody/files/prosody.in new file mode 100644 index 000000000000..a6a4fda31fac --- /dev/null +++ b/net-im/prosody/files/prosody.in @@ -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" diff --git a/net-im/prosody/pkg-descr b/net-im/prosody/pkg-descr new file mode 100644 index 000000000000..f36644330ec1 --- /dev/null +++ b/net-im/prosody/pkg-descr @@ -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/ diff --git a/net-im/prosody/pkg-plist b/net-im/prosody/pkg-plist new file mode 100644 index 000000000000..1952196d909c --- /dev/null +++ b/net-im/prosody/pkg-plist @@ -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 |