aboutsummaryrefslogtreecommitdiff
path: root/net-im/ejabberd/Makefile
blob: a56b426c89b29e29a534961bf2a7dc7dc18a7b52 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
## New ports collection makefile for:    ejabberd
# Date created:                         03 July 2004
# Whom:                                 Alexander Timoshenko <gonzo@univ.kiev.ua>
#
# $FreeBSD$
#

PORTNAME=	ejabberd
PORTVERSION=	1.1.2
PORTREVISION=	1
CATEGORIES=	net-im
MASTER_SITES=	http://www.process-one.net/en/projects/ejabberd/download/${PORTVERSION}/ \
		http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/

MAINTAINER=	shaun@FreeBSD.org
COMMENT=	Free and Open Source distributed fault-tolerant Jabber server

OPTIONS=	ODBC	"Enable ODBC support"		off

BUILD_DEPENDS=	erlc:${PORTSDIR}/lang/erlang
RUN_DEPENDS=	erl:${PORTSDIR}/lang/erlang
LIB_DEPENDS=	expat.6:${PORTSDIR}/textproc/expat2

GNU_CONFIGURE=	yes
USE_GMAKE=	yes
USE_ICONV=	yes
USE_OPENSSL=	yes
USE_RC_SUBR=	${PORTNAME}.sh
NOPRECIOUSMAKEVARS=	yes

MAKE_ENV=	PORTVERSION=${PORTVERSION}
PKGMESSAGE=	${WRKDIR}/pkg-message
PLIST_SUB=	PORTNAME=${PORTNAME} PORTVERSION=${PORTVERSION}
SUB_FILES=	${PORTNAME} pkg-message
SUB_LIST=	PORTNAME=${PORTNAME} PORTVERSION=${PORTVERSION}
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}/src

.include <bsd.port.pre.mk>

.if defined(WITH_ODBC)
CONFIGURE_ARGS+=--enable-odbc
PLIST_SUB+=	ODBC=""
.else
PLIST_SUB+=	ODBC="@comment "
.endif

pre-install:
	@${FIND} ${WRKSRC} '(' -name \*.orig -or -name \*.bak ')' -delete
	@${RM} -f ${WRKSRC}/../doc/release_note_1.1.2.txt

post-install:
	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${WRKSRC}/../tools/${PORTNAME}ctl ${PREFIX}/bin

	${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.defaults ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.defaults.example
	${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.inetrc ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.inetrc.example
.if !exists(${PREFIX}/etc/${PORTNAME}/${PORTNAME}.inetrc)
	${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.inetrc ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.inetrc
.endif

	${FIND} ${PREFIX}/lib/erlang/lib/${DISTNAME} -type f -print0 | ${XARGS} -0 ${CHMOD} ${SHAREMODE}
	${FIND} ${PREFIX}/lib/erlang/lib/${DISTNAME} -type f -print0 | ${XARGS} -0 ${CHOWN} ${SHAREOWN}:${SHAREGRP}

.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	@${INSTALL_DATA} ${WRKSRC}/../doc/* ${DOCSDIR}
.endif

	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>