aboutsummaryrefslogtreecommitdiffstats
path: root/net/ejabberd/Makefile
blob: 164624947c7c6bdb2bc425bf3de5636a90ad5604 (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
## New ports collection makefile for:    ejabberd
# Date created:                         03 July 2004
# Whom:                                 Alexander Timoshenko <gonzo@univ.kiev.ua>
#
# $FreeBSD$
#

PORTNAME=   ejabberd
PORTVERSION=    0.9.1
CATEGORIES= net
MASTER_SITES=   http://www.jabber.ru/files/ejabberd/ \
        http://www.process-one.net/en/projects/ejabberd/download/${PORTVERSION}/

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}/${PORTNAME}-${PORTVERSION}/src
GNU_CONFIGURE=  yes
USE_GMAKE=  yes
USE_REINPLACE=  yes
PLIST_SUB=  PORTVERSION=${PORTVERSION}

.include <bsd.port.pre.mk>

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

post-install:
    @${INSTALL_SCRIPT} ${WRKSRC}/ejabberd ${PREFIX}/bin
    @${INSTALL_SCRIPT} ${WRKSRC}/ejabberd.sh ${PREFIX}/etc/rc.d
    @${INSTALL_DATA} ${FILESDIR}/ejabberd.defaults ${PREFIX}/etc
    @${INSTALL_SCRIPT} ${WRKSRC}/../tools/ejabberdctl ${PREFIX}/bin
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_DATA} ${WRKSRC}/../doc/* ${DOCSDIR}
.endif
    @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL

.include <bsd.port.post.mk>