aboutsummaryrefslogtreecommitdiffstats
path: root/net/ejabberd/Makefile
blob: 926ea145c3a93afc23ab63e012471c328e04b03b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# New ports collection makefile for:    ejabberd
# Date created:                         03 July 2004
# Whom:                                 Alexander Timoshenko <gonzo@univ.kiev.ua>
#
# $FreeBSD$
#

PORTNAME=   ejabberd
PORTVERSION=    0.7
CATEGORIES= net
MASTER_SITES=   http://www.jabber.ru/files/ejabberd/

MAINTAINER= gonzo@univ.kiev.ua
COMMENT=    Free and Open Source distributed fault-tolerant Jabber server

BUILD_DEPENDS=  erlc:${PORTSDIR}/lang/erlang
RUN_DEPENDS=    erl:${PORTSDIR}/lang/erlang

PLIST_SUB=  VERSION="${PORTVERSION}"

WRKSRC=     ${WRKDIR}/${DISTNAME}/src
HAS_CONFIGURE=  yes
USE_GMAKE=  yes
USE_REINPLACE=  yes

# MAN1=     yaws.1
# MAN5=     yaws.conf.5 yaws_api.5

APPDIR=     ${PREFIX}/lib/erlang/lib/ejabberd-${PORTVERSION}

.include <bsd.port.pre.mk>

post-patch:
    @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
        ${WRKSRC}/ejabberd ${WRKSRC}/ejabberdctl ${WRKSRC}/ejabberd.sh
    @${FIND} ${WRKSRC} -name \*.orig -or -name \*.bak | ${XARGS} ${RM}

do-install:
    @${MKDIR} ${APPDIR}/ebin
    @${INSTALL_DATA} ${WRKSRC}/*.beam ${APPDIR}/ebin
    @${RM} -f ${BEAMDIR}/configure.beam
    @${INSTALL_DATA} ${WRKSRC}/*.app ${APPDIR}/ebin
    @${MKDIR} ${APPDIR}/priv/lib
    @${INSTALL_DATA} ${WRKSRC}/*.so  ${APPDIR}/priv/lib
    @${MKDIR} ${APPDIR}/priv/msgs
    @${INSTALL_DATA} ${WRKSRC}/msgs/*.msg ${APPDIR}/priv/msgs
    @${INSTALL_SCRIPT} ${WRKSRC}/ejabberd ${PREFIX}/bin
    @${INSTALL_SCRIPT} ${WRKSRC}/ejabberdctl ${PREFIX}/bin
    @${INSTALL_SCRIPT} ${WRKSRC}/ejabberd.sh ${PREFIX}/etc/rc.d
    @${INSTALL_DATA} ${FILESDIR}/ejabberd.cfg.sample ${PREFIX}/etc/
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_DATA} ${WRKSRC}/../doc/* ${DOCSDIR}

post-install:
    @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL

.include <bsd.port.post.mk>