# $NetBSD: Makefile,v 1.10 2009/05/12 12:55:30 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 LICENSE= gnu-gpl-v2 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"