Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jul 2004 14:52:58 +0300
From:      Alexander Timoshenko <gonzo@univ.kiev.ua>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/69339: New port: net/ejabberd jabber server written on erlang
Message-ID:  <E1BmtB4-0001t6-0z@expo.ukrweb.net>
Resent-Message-ID: <200407201200.i6KC0MCf037406@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         69339
>Category:       ports
>Synopsis:       New port: net/ejabberd jabber server written on erlang
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 20 12:00:22 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Timoshenko
>Release:        FreeBSD 5.2.1-RELEASE-p1 i386
>Organization:
private person
>Environment:
System: FreeBSD expo.ukrweb.net 5.2.1-RELEASE-p1 FreeBSD 5.2.1-RELEASE-p1 #2: Thu Mar 18 17:45:54 EET 2004 levsha@expo.ukrweb.net:/usr/obj/usr/src/sys/EXPO i386


>Description:
>How-To-Repeat:
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	ejabberd
#	ejabberd/files
#	ejabberd/files/patch-src::configure
#	ejabberd/files/patch-src::ejabberd
#	ejabberd/files/patch-src::ejabberdctl
#	ejabberd/files/patch-src::ejabberd.sh
#	ejabberd/files/ejabberd.cfg.sample
#	ejabberd/files/patch-src::mod_last.erl
#	ejabberd/Makefile
#	ejabberd/distinfo
#	ejabberd/pkg-descr
#	ejabberd/pkg-plist
#	ejabberd/pkg-install
#	ejabberd/pkg-deinstall
#
echo c - ejabberd
mkdir -p ejabberd > /dev/null 2>&1
echo c - ejabberd/files
mkdir -p ejabberd/files > /dev/null 2>&1
echo x - ejabberd/files/patch-src::configure
sed 's/^X//' >ejabberd/files/patch-src::configure << 'END-of-ejabberd/files/patch-src::configure'
X--- configure.orig	Sat Jul  3 14:58:07 2004
X+++ configure	Sat Jul  3 15:01:49 2004
X@@ -2180,7 +2180,7 @@
X fi
X 
X 
X-   if test "z$ERLC" == "z" || test "z$ERL" == "z"; then
X+   if test -z "$ERLC" || test -z "$ERL"; then
X    		{ { echo "$as_me:$LINENO: error: erlang not found" >&5
X echo "$as_me: error: erlang not found" >&2;}
X    { (exit 1); exit 1; }; }
END-of-ejabberd/files/patch-src::configure
echo x - ejabberd/files/patch-src::ejabberd
sed 's/^X//' >ejabberd/files/patch-src::ejabberd << 'END-of-ejabberd/files/patch-src::ejabberd'
X--- ejabberd.orig	Thu Jan  1 03:00:00 1970
X+++ ejabberd	Sat Jul  3 15:52:35 2004
X@@ -0,0 +1,31 @@
X+#!/bin/sh
X+
X+[ -r /var/run/ejabberd/.erlang.cookie ] && HOME=/var/run/ejabberd
X+
X+CONFIG=%%PREFIX%%/etc/ejabberd.cfg
X+LOG=/var/log/ejabberd/ejabberd.log
X+SASL_LOG=/var/log/ejabberd/sasl.log
X+SPOOL=/var/spool/ejabberd
X+
X+ARGS=
X+while [ $# -ne 0 ];
X+do
X+    PARAM=$1
X+    shift
X+    case $PARAM in
X+	--) break ;;
X+	--config) CONFIG=$1 ; shift ;;
X+	--log) LOG=$1 ; shift ;;
X+	--sasl-log) SASL_LOG=$1 ; shift ;;
X+	--spool) SPOOL=$1 ; shift ;;
X+	*) ARGS="$ARGS $PARAM"
X+    esac
X+done
X+
X+exec erl -sname ejabberd \
X+    -s ejabberd -detached \
X+    -ejabberd config \"$CONFIG\" log_path \"$LOG\" \
X+    -sasl sasl_error_logger \{file,\"$SASL_LOG\"\} \
X+    -mnesia dir \"$SPOOL\" \
X+    $ARGS "$@"
X+
END-of-ejabberd/files/patch-src::ejabberd
echo x - ejabberd/files/patch-src::ejabberdctl
sed 's/^X//' >ejabberd/files/patch-src::ejabberdctl << 'END-of-ejabberd/files/patch-src::ejabberdctl'
X--- ejabberdctl.orig	Thu Jan  1 03:00:00 1970
X+++ ejabberdctl	Sat Jul  3 15:53:38 2004
X@@ -0,0 +1,6 @@
X+#!/bin/sh
X+
X+[ -r /var/run/ejabberd/.erlang.cookie ] && HOME=/var/run/ejabberd
X+
X+exec erl -noinput -sname ejabberdctl -s ejabberd_ctl -extra ejabberd@`hostname -s` "$@"
X+
END-of-ejabberd/files/patch-src::ejabberdctl
echo x - ejabberd/files/patch-src::ejabberd.sh
sed 's/^X//' >ejabberd/files/patch-src::ejabberd.sh << 'END-of-ejabberd/files/patch-src::ejabberd.sh'
X--- ejabberd.sh	Thu Jan  1 03:00:00 1970
X+++ ejabberd.sh	Sat Jul  3 16:49:51 2004
X@@ -0,0 +1,42 @@
X+#! /bin/sh
X+#
X+# ejabberd        Start/stop ejabberd server
X+#
X+#
X+
X+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
X+EJABBERD=%%PREFIX%%/bin/ejabberd
X+EJABBERDCTL=%%PREFIX%%/bin/ejabberdctl
X+EJABBERDUSER=ejabberd
X+NAME=ejabberd
X+DESC=ejabberd
X+
X+test -f $EJABBERD || exit 0
X+test -f $EJABBERDCTL || exit 0
X+
X+set -e
X+
X+case "$1" in
X+    start)
X+	echo -n "Starting $DESC: "
X+	su ejabberd -c "$EJABBERD -heart -noshell -detached"
X+	echo "$NAME."
X+	;;
X+    stop)
X+	echo -n "Stopping $DESC: "
X+	su ejabberd -c "$EJABBERDCTL stop"
X+	echo "$NAME."
X+	;;
X+    restart|force-reload)
X+	echo -n "Restarting $DESC: "
X+	su ejabberd -c "$EJABBERDCTL restart"
X+	echo "$NAME."
X+	;;
X+    *)
X+	N=/etc/init.d/$NAME
X+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
X+	exit 1
X+	;;
X+esac
X+
X+exit 0
END-of-ejabberd/files/patch-src::ejabberd.sh
echo x - ejabberd/files/ejabberd.cfg.sample
sed 's/^X//' >ejabberd/files/ejabberd.cfg.sample << 'END-of-ejabberd/files/ejabberd.cfg.sample'
X% Default Debian ejabberd.cfg
X
X%override_acls.
X
X
X% Users that have admin access.  Add line like one of the following after you
X% will be successfully registered on server to get admin access:
X%{acl, admin, {user, "aleksey"}}.
X%{acl, admin, {user, "ermine"}}.
X
X% Blocked users:
X%{acl, blocked, {user, "test"}}.
X
X% Local users:
X{acl, local, {user_regexp, ""}}.
X
X% Another examples of ACLs:
X%{acl, jabberorg, {server, "jabber.org"}}.
X%{acl, aleksey, {user, "aleksey", "jabber.ru"}}.
X%{acl, test, {user_regexp, "^test"}}.
X%{acl, test, {user_glob, "test*"}}.
X
X
X% Only admins can use configuration interface:
X{access, configure, [{allow, admin}]}.
X
X% Every username can be registered via in-band registration:
X{access, register, [{allow, all}]}.
X
X% None username can be registered via in-band registration:
X%{access, register, [{deny, all}]}.
X
X% After successful registration user will get message with following subject
X% and body:
X{welcome_message,
X {"Welcome!",
X  "Welcome to Debian Jabber Service.  "
X  "For information about Jabber visit http://jabber.org"}}.
X% Replace them with 'none' if you don't want to send such message:
X%{welcome_message, none}.
X
X% List of people who will get notifications about registered users
X%{registration_watchers, ["admin1@localhost",
X%                         "admin2@localhost"]}.
X
X% Only admins can send announcement messages:
X{access, announce, [{allow, admin}]}.
X
X
X% Only non-blocked users can use c2s connections:
X{access, c2s, [{deny, blocked},
X	       {allow, all}]}.
X
X% Set shaper with name "normal" to limit traffic speed to 1000B/s
X{shaper, normal, {maxrate, 1000}}.
X
X% Set shaper with name "fast" to limit traffic speed to 50000B/s
X{shaper, fast, {maxrate, 50000}}.
X
X% For all users except admins used "normal" shaper
X{access, c2s_shaper, [{none, admin},
X		      {normal, all}]}.
X
X% For all S2S connections used "fast" shaper
X{access, s2s_shaper, [{fast, all}]}.
X
X% Admins of this server are also admins of MUC service:
X{access, muc_admin, [{allow, admin}]}.
X
X% All users are allowed to use MUC service:
X{access, muc, [{allow, all}]}.
X
X% This rule allows access only for local users:
X{access, local, [{allow, local}]}.
X
X
X% Authentification method.  If you want to use internal user base, then use
X% this line:
X{auth_method, internal}.
X
X% For LDAP uthentification use these lines instead of above one:
X%{auth_method, ldap}.
X%{ldap_servers, ["localhost"]}.    % List of LDAP servers
X%{ldap_uidattr, "uid"}.            % LDAP attribute that holds user ID
X%{ldap_base, "dc=example,dc=com"}. % Base of LDAP directory
X
X
X% Host name: (replace for your hostname)
X{host, "localhost"}.
X
X% Default language for server messages
X{language, "en"}.
X
X% Listened ports:
X{listen,
X% Ordinary client-2-server service
X [{5222, ejabberd_c2s,     [{access, c2s},
X                            {shaper, c2s_shaper}]},
X
X% SSL-enabled client-2-server service, uncomment these lines to
X% enable ssl
X%  {5223, ejabberd_c2s,     [{access, c2s},
X%                            ssl,
X%                            {certfile, "/etc/ssl/certs/ejabberd.pem"}]},
X
X% Server-2-server service
X  {5269, ejabberd_s2s_in,  [{shaper, s2s_shaper}]},
X
X% External MUC jabber-muc (but internal mod_muc is better :))
X% {5554, ejabberd_service, [{ip, {127, 0, 0, 1}},
X%                           {access, all},
X%                           {host, "muc.localhost", [{password, "secret"}]}]},
X
X% Jabber ICQ Transport
X% {5555, ejabberd_service, [{ip, {127, 0, 0, 1}},
X%                           {access, all},
X%                           {hosts, ["icq.localhost", "sms.localhost"], [{password, "secret"}]}]},
X
X% AIM Transport
X% {5556, ejabberd_service, [{ip, {127, 0, 0, 1}},
X%                           {access, all},
X%                           {host, "aim.localhost", [{password, "secret"}]}]},
X
X% MSN Transport
X% {5557, ejabberd_service, [{ip, {127, 0, 0, 1}},
X%                           {access, all},
X%                           {host, "msn.localhost", [{password, "secret"}]}]},
X
X% Yahoo! Transport
X% {5558, ejabberd_service, [{ip, {127, 0, 0, 1}},
X%                           {access, all},
X%                           {host, "yahoo.localhost", [{password, "secret"}]}]},
X
X% External JUD (internal is more powerful,
X% but doesn't allow to register users from other servers)
X% {5559, ejabberd_service, [{ip, {127, 0, 0, 1}},
X%                           {access, all},
X%                           {host, "jud.localhost", [{password, "secret"}]}]},
X
X% HTTP service (You may choose options HTTP-polling and Web-administering)
X% When commenting out, be careful with commas
X  {5280, ejabberd_http,    [http_poll, web_admin]}
X ]}.
X
X% If SRV lookup fails, then port 5269 is used to communicate with remote server
X{outgoing_s2s_port, 5269}.
X
X% Used modules:
X{modules,
X [
X  {mod_register,   [{access, register}]},
X  {mod_roster,     []},
X  {mod_privacy,    []},
X  {mod_configure,  []},
X  {mod_configure2, []},
X  {mod_disco,      [{extra_domains, ["users.jabber.org"]}]},
X  {mod_stats,      []},
X  {mod_vcard,      []},
X  {mod_offline,    []},
X  {mod_echo,       []},
X  {mod_private,    []},
X  {mod_irc,        []},
X% Default options for mod_muc:
X%   host: "conference." ++ ?MYNAME
X%   access: all
X%   access_create: all
X%   access_admin: none (only room creator has owner privileges)
X  {mod_muc,        [{access, muc},
X		    {access_create, muc},
X		    {access_admin, muc_admin}]},
X  {mod_pubsub,     []},
X  {mod_time,       []},
X  {mod_last,       []},
X  {mod_version,    []}
X ]}.
X
END-of-ejabberd/files/ejabberd.cfg.sample
echo x - ejabberd/files/patch-src::mod_last.erl
sed 's/^X//' >ejabberd/files/patch-src::mod_last.erl << 'END-of-ejabberd/files/patch-src::mod_last.erl'
X--- mod_last.erl.orig
X+++ mod_last.erl
X@@ -102,7 +102,16 @@
X 		  sub_el = [{xmlelement, "query",
X 			     [{"xmlns", ?NS_LAST},
X 			      {"seconds", integer_to_list(Sec)}],
X-			     [{xmlcdata, Status}]}]}
X+			     [{xmlcdata, Status}]}]};
X+	[{last_activity, _, TimeStamp}] ->
X+	    {MegaSecs, Secs, _MicroSecs} = now(),
X+	    TimeStamp2 = MegaSecs * 1000000 + Secs,
X+	    Sec = TimeStamp2 - TimeStamp,
X+	    IQ#iq{type = result,
X+		  sub_el = [{xmlelement, "query",
X+			     [{"xmlns", ?NS_LAST},
X+			      {"seconds", integer_to_list(Sec)}],
X+			     []}]}
X     end.
X 
X 
END-of-ejabberd/files/patch-src::mod_last.erl
echo x - ejabberd/Makefile
sed 's/^X//' >ejabberd/Makefile << 'END-of-ejabberd/Makefile'
X# New ports collection makefile for:    ejabberd
X# Date created:                         03 July 2004
X# Whom:                                 Alexander Timoshenko <gonzo@univ.kiev.ua>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	ejabberd
XPORTVERSION=	0.7
XCATEGORIES=	net
XMASTER_SITES=	http://www.jabber.ru/files/ejabberd/
X
XMAINTAINER=	gonzo@univ.kiev.ua
XCOMMENT=	Free and Open Source distributed fault-tolerant Jabber server
X
XBUILD_DEPENDS=	erlc:${PORTSDIR}/lang/erlang
XRUN_DEPENDS=	erl:${PORTSDIR}/lang/erlang
X
XPLIST_SUB=	VERSION="${PORTVERSION}"
X
XWRKSRC=		${WRKDIR}/${DISTNAME}/src
XHAS_CONFIGURE=	yes
XUSE_GMAKE=	yes
XUSE_REINPLACE=	yes
X
X# MAN1=		yaws.1
X# MAN5=		yaws.conf.5 yaws_api.5
X
XAPPDIR=${PREFIX}/lib/erlang/lib/ejabberd-${PORTVERSION}
X
X.include <bsd.port.pre.mk>
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
X		${WRKSRC}/ejabberd ${WRKSRC}/ejabberdctl ${WRKSRC}/ejabberd.sh
X	@${FIND} ${WRKSRC} -name \*.orig -or -name \*.bak | ${XARGS} ${RM}
X
Xdo-install:
X	@${MKDIR} ${APPDIR}/ebin
X	@${INSTALL_DATA} ${WRKSRC}/*.beam ${APPDIR}/ebin
X	@${RM} -f ${BEAMDIR}/configure.beam
X	@${INSTALL_DATA} ${WRKSRC}/*.app ${APPDIR}/ebin
X	@${MKDIR} ${APPDIR}/priv/lib
X	@${INSTALL_DATA} ${WRKSRC}/*.so  ${APPDIR}/priv/lib
X	@${MKDIR} ${APPDIR}/priv/msgs
X	@${INSTALL_DATA} ${WRKSRC}/msgs/*.msg ${APPDIR}/priv/msgs
X	@${INSTALL_SCRIPT} ${WRKSRC}/ejabberd ${PREFIX}/bin
X	@${INSTALL_SCRIPT} ${WRKSRC}/ejabberdctl ${PREFIX}/bin
X	@${INSTALL_SCRIPT} ${WRKSRC}/ejabberd.sh ${PREFIX}/etc/rc.d
X	@${INSTALL_DATA} ${FILESDIR}/ejabberd.cfg.sample ${PREFIX}/etc/
X	@${MKDIR} ${DOCSDIR}
X	@${INSTALL_DATA} ${WRKSRC}/../doc/* ${DOCSDIR}
X
Xpost-install:
X	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X
X.include <bsd.port.post.mk>
END-of-ejabberd/Makefile
echo x - ejabberd/distinfo
sed 's/^X//' >ejabberd/distinfo << 'END-of-ejabberd/distinfo'
XMD5 (ejabberd-0.7.tar.gz) = dfec9573263de8729213993f015cfac9
XSIZE (ejabberd-0.7.tar.gz) = 378466
END-of-ejabberd/distinfo
echo x - ejabberd/pkg-descr
sed 's/^X//' >ejabberd/pkg-descr << 'END-of-ejabberd/pkg-descr'
Xejabberd is a Free and Open Source distributed fault-tolerant Jabber server. 
XIt writen mostly in Erlang. 
X
XThe main features of ejabberd is:
X	- Works on most of popular platforms: *nix 
X	  (tested on Linux, FreeBSD and NetBSD)
X	- Distributed
X	- Fault-tolerance: 
X	- Built-in Multi-User Chat service 
X	- Built-in IRC transport 
X	- Built-in Publish-Subscribe service 
X	- Built-in Jabber Users Directory service based on users vCards 
X	- SSL support 
X	- Ability to interface with external components (JIT, MSN-t, Yahoo-t, etc) 
X	- Migration from jabberd14 is possible 
X	- Mostly XMPP-compliant 
X	- Support for JEP-0030 (Service Discovery). 
X	- Support for JEP-0039 (Statistics Gathering). 
X	- Support for xml:lang attribute in many XML elements 
X
XWWW: http://ejabberd.jabberstudio.org/
END-of-ejabberd/pkg-descr
echo x - ejabberd/pkg-plist
sed 's/^X//' >ejabberd/pkg-plist << 'END-of-ejabberd/pkg-plist'
Xbin/ejabberd
Xbin/ejabberdctl
Xetc/ejabberd.cfg.sample
Xetc/rc.d/ejabberd.sh
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ELDAPv3.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/acl.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/configure.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/cyrsasl.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/cyrsasl_digest.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/cyrsasl_plain.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_app.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_auth.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_c2s.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_config.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_ctl.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_http.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_http_poll.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_listener.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_local.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_logger_h.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/eldap.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_receiver.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_router.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_s2s.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_s2s_in.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_s2s_out.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_service.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_sm.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_sup.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_tmp_sup.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_web.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_web_admin.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/gen_iq_handler.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/gen_mod.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/iconv.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/idna.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/jd2ejd.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/jlib.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_configure.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_configure2.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_disco.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_echo.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_irc.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_irc_connection.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_last.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_muc.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_muc_room.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_offline.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_privacy.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_private.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_pubsub.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_register.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_roster.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_stats.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_time.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_vcard.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_version.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/randoms.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/sha.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/shaper.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/stringprep.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/translate.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/xml.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/xml_stream.beam
Xlib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd.app
Xlib/erlang/lib/ejabberd-%%VERSION%%/priv/lib/expat_erl.so
Xlib/erlang/lib/ejabberd-%%VERSION%%/priv/lib/iconv_erl.so
Xlib/erlang/lib/ejabberd-%%VERSION%%/priv/lib/stringprep_drv.so
Xlib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs/es.msg
Xlib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs/fr.msg
Xlib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs/nl.msg
Xlib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs/ru.msg
X%%DOCSDIR%%/confacls.png
X%%DOCSDIR%%/confhostname.png
X%%DOCSDIR%%/dev.html
X%%DOCSDIR%%/dev.tex
X%%DOCSDIR%%/disco.png
X%%DOCSDIR%%/discoallusers.png
X%%DOCSDIR%%/discorunnodes.png
X%%DOCSDIR%%/discorus.png
X%%DOCSDIR%%/guide.html
X%%DOCSDIR%%/guide.tex
X%%DOCSDIR%%/logo.png
X%%DOCSDIR%%/webadmmain.png
X%%DOCSDIR%%/webadmmainru.png
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X@dirrm lib/erlang/lib/ejabberd-%%VERSION%%/priv/lib
X@dirrm lib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs
X@dirrm lib/erlang/lib/ejabberd-%%VERSION%%/priv
X@dirrm lib/erlang/lib/ejabberd-%%VERSION%%/ebin
X@dirrm lib/erlang/lib/ejabberd-%%VERSION%%
END-of-ejabberd/pkg-plist
echo x - ejabberd/pkg-install
sed 's/^X//' >ejabberd/pkg-install << 'END-of-ejabberd/pkg-install'
X#!/bin/sh
X
Xif [ "$2" != "POST-INSTALL" ]; then
X    exit 0
Xfi
X
XUSER=ejabberd
XGROUP=${USER}
XUID=522
XGID=${UID}
X
Xif ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
X	if pw groupadd ${GROUP} -g ${GID}; then
X		echo "Added group \"${GROUP}\"."
X	else
X		echo "Adding group \"${GROUP}\" failed..."
X		exit 1
X	fi
Xfi
X
Xif ! pw usershow "${USER}" 2>/dev/null 1>&2; then
X	if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
X		-s "/bin/sh" -d "/var/run/ejabberd" \
X		-c "ejabberd pseudo user"; \
X	then
X		echo "Added user \"${USER}\"."
X	else
X		echo "Adding user \"${USER}\" failed..."
X		exit 1
X	fi
Xfi
X
Xmkdir -m 750 /var/log/ejabberd /var/spool/ejabberd /var/run/ejabberd 2>/dev/null
Xcat > /var/run/ejabberd/.inetrc << __EOF__
X{lookup,["file","native"]}.
X{host,{127,0,0,1}, ["localhost","hostalias"]}.
X__EOF__
Xchown -R ejabberd:ejabberd /var/log/ejabberd /var/spool/ejabberd /var/run/ejabberd
X
Xexit 0
END-of-ejabberd/pkg-install
echo x - ejabberd/pkg-deinstall
sed 's/^X//' >ejabberd/pkg-deinstall << 'END-of-ejabberd/pkg-deinstall'
X#!/bin/sh
X
Xif [ "$2" != "POST-DEINSTALL" ]; then
X    exit 0
Xfi
X
XUSER=ejabberd
X
Xif pw usershow "${USER}" 2>/dev/null 1>&2; then
X	echo "To delete ejabberd user permanently, use 'pw userdel ${USER}'"
Xfi
X
Xif pw groupshow "${USER}" 2>/dev/null 1>&2; then
X	echo "To delete ejabberd group permanently, use 'pw groupdel ${USER}'"
Xfi
X
Xrm -Rf /var/run/ejabberd
X
Xecho "If you wish to delete ejabberd data and log files, remove"
Xecho "'/var/spool/ejabberd' and '/var/log/ejabberd' directories."
X
Xexit 0
END-of-ejabberd/pkg-deinstall
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1BmtB4-0001t6-0z>