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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
# $NetBSD: Makefile,v 1.9 2009/03/22 10:39:43 martti Exp $
DISTNAME= ejabberd-2.0.4
#PKGREVISION= 1
CATEGORIES= chat
MASTER_SITES= http://www.process-one.net/downloads/ejabberd/2.0.4/
MAINTAINER= martti@NetBSD.org
HOMEPAGE= http://www.ejabberd.im/
COMMENT= Free and Open Source distributed fault-tolerant Jabber server
PKG_DESTDIR_SUPPORT= user-destdir
CONFLICTS+= jabberd-[0-9]*
GNU_CONFIGURE= yes
USE_TOOLS+= gmake
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
# much prefer to be explicit about the configure settings rather than
# depending on the defaults to continue to be sane or same between versions
CONFIGURE_ARGS+= --enable-odbc
CONFIGURE_ARGS+= --enable-mod_irc
CONFIGURE_ARGS+= --enable-mod_muc
CONFIGURE_ARGS+= --enable-eldap
CONFIGURE_ARGS+= --enable-web
CONFIGURE_ARGS+= --enable-tls
CONFIGURE_ARGS+= --enable-odbc
CONFIGURE_ARGS+= --enable-ejabberd_zlib
CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
CONFIGURE_ARGS+= --with-zlib=${BUILDLINK_PREFIX.zlib}
CONFIGURE_ARGS+= --with-expat=${BUILDLINK_PREFIX.expat}
CONFIGURE_ARGS+= --with-libiconv=${BUILDLINK_PREFIX.iconv}
CONFIGURE_ARGS+= --with-erlang=${BUILDLINK_PREFIX.erlang}
CONFIGURE_DIRS+= src
BUILD_DIRS+= src
MAKE_ENV= PKGVERSION=${PKGVERSION}
PLIST_SUBST+= DISTNAME=${DISTNAME} PKGBASE=${PKGBASE}
FILES_SUBST+= DISTNAME=${DISTNAME} PKGBASE=${PKGBASE}
FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
FILES_SUBST+= EGDIR=${EGDIR}
RCD_SCRIPTS= ejabberd
BUILD_DEFS+= EJABBERD_USER EJABBERD_GROUP EJABBERD_LOGDIR
BUILD_DEFS+= EJABBERD_PIDDIR EJABBERD_DB EJABBERD_TRANSDIR
BUILD_DEFS+= EJABBERD_EXDIR
BUILD_DEFS+= VARBASE
PKG_SYSCONFSUBDIR= ejabberd
.include "../../mk/bsd.prefs.mk"
EJABBERD_USER= ejabberd
EJABBERD_GROUP= ejabberd
EJABBERD_PIDDIR= ${VARBASE}/run/ejabberd
EJABBERD_LOGDIR= ${VARBASE}/log/ejabberd
EJABBERD_DB= ${VARBASE}/spool/ejabberd
EJABBERD_EXDIR= share/examples/ejabberd
OWN_DIRS+= ${EJABBERD_PIDDIR}
OWN_DIRS+= ${EJABBERD_LOGDIR}
OWN_DIRS+= ${EJABBERD_DB}
OWN_DIRS_PERMS+= ${EJABBERD_PIDDIR} ${EJABBERD_USER} ${EJABBERD_GROUP} 0770
OWN_DIRS_PERMS+= ${EJABBERD_LOGDIR} ${EJABBERD_USER} ${EJABBERD_GROUP} 0770
OWN_DIRS_PERMS+= ${EJABBERD_DB} ${EJABBERD_USER} ${EJABBERD_GROUP} 0770
FILES_SUBST+= JABBERD_USER=${EJABBERD_USER}
FILES_SUBST+= JABBERD_LOGDIR=${EJABBERD_LOGDIR}
PLIST_SUBST+= EJABBERD_EXDIR=${EJABBERD_EXDIR}
PKG_GROUPS+= ${EJABBERD_GROUP}
PKG_USERS+= ${EJABBERD_USER}:${EJABBERD_GROUP}
EGDIR= ${PREFIX}/${EJABBERD_EXDIR}
INSTALLATION_DIRS+= ${PREFIX}/share/doc/${PKGNAME_NOREV}
INSTALLATION_DIRS+= ${PREFIX}/share/doc/${PKGNAME_NOREV}/api
INSTALLATION_DIRS+= ${EGDIR}
CONF_FILES= ${EGDIR}/ejabberd.cfg ${PKG_SYSCONFDIR}/ejabberd.cfg
CONF_FILES+= ${EGDIR}/ejabberdctl.cfg ${PKG_SYSCONFDIR}/ejabberdctl.cfg
CONF_FILES+= ${EGDIR}/inetrc ${PKG_SYSCONFDIR}/inetrc
post-patch:
${RM} -f ${WRKSRC}/doc/guide.tex.orig
post-install:
${INSTALL_DATA} ${WRKSRC}/doc/*.* ${DESTDIR}${PREFIX}/share/doc/${PKGNAME_NOREV}
${INSTALL_DATA} ${WRKSRC}/doc/Makefile ${DESTDIR}${PREFIX}/share/doc/${PKGNAME_NOREV}
${INSTALL_DATA} ${WRKSRC}/doc/COPYING ${DESTDIR}${PREFIX}/share/doc/${PKGNAME_NOREV}
${INSTALL_DATA} ${WRKSRC}/doc/api/* ${DESTDIR}${PREFIX}/share/doc/${PKGNAME_NOREV}/api
SUBST_CLASSES+= paths
SUBST_MESSAGE.paths= Localizing paths
SUBST_STAGE.paths= pre-configure
SUBST_FILES.paths= src/Makefile.in
SUBST_FILES.paths+= src/ejabberdctl.template
SUBST_FILES.paths+= doc/guide.tex
SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
SUBST_SED.paths+= -e 's,@JABBERD_LOGDIR@,${EJABBERD_LOGDIR},g'
SUBST_SED.paths+= -e 's,@EJABBERD_LOGDIR@,${EJABBERD_LOGDIR},g'
SUBST_SED.paths+= -e 's,@EJABBERD_DB@,${EJABBERD_DB},g'
SUBST_SED.paths+= -e 's,@DISTNAME@,${DISTNAME},g'
SUBST_SED.paths+= -e 's,@EJABBERD_VARDIR@,${VARBASE},g'
.include "../../converters/libiconv/buildlink3.mk"
.include "../../lang/erlang/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|