2003-12-29 14:27:06 +01:00
|
|
|
# New ports collection makefile for: jabberd
|
|
|
|
# Date created: 29 December 2003
|
|
|
|
# Whom: Dmitry Sivachenko <demon@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= jabberd
|
2009-08-09 19:57:08 +02:00
|
|
|
PORTVERSION= 2.2.9
|
2005-11-09 08:48:19 +01:00
|
|
|
CATEGORIES= net-im
|
2009-05-05 16:15:28 +02:00
|
|
|
MASTER_SITES= http://codex.xiaoka.com/pub/jabberd2/releases/
|
2003-12-29 14:27:06 +01:00
|
|
|
DIST_SUBDIR= jabber
|
|
|
|
|
2007-07-26 22:00:52 +02:00
|
|
|
MAINTAINER= mm@FreeBSD.org
|
2003-12-29 14:27:06 +01:00
|
|
|
COMMENT= Online presence and instant messaging server
|
|
|
|
|
2007-07-26 22:00:52 +02:00
|
|
|
LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 \
|
2008-05-24 02:04:49 +02:00
|
|
|
idn.16:${PORTSDIR}/dns/libidn \
|
|
|
|
udns.0:${PORTSDIR}/dns/udns
|
2004-07-13 04:38:15 +02:00
|
|
|
|
2007-08-29 16:07:38 +02:00
|
|
|
OPTIONS= MYSQL "Support MySQL (storage/auth/reg)" on \
|
|
|
|
POSTGRESQL "Support PostgreSQL (storage/auth/reg)" off \
|
|
|
|
LDAP "Support OpenLDAP (storage/auth/reg)" off \
|
|
|
|
BDB "Support BerkeleyDB (storage/auth/reg)" off \
|
|
|
|
SQLITE "Support SQLite3 (storage/auth/reg)" off \
|
|
|
|
PAM "Enable PAM (auth/reg)" off \
|
|
|
|
PIPE "Enable pipe (auth/reg)" off \
|
|
|
|
ANON "Enable anonymous (auth/reg)" off \
|
|
|
|
FS "Filesystem storage (only for testing)" off \
|
2008-01-03 16:32:41 +01:00
|
|
|
DEBUG "Compile with debug messages" on \
|
2009-10-05 09:12:56 +02:00
|
|
|
REQUIRES "Add backend requires to startup script" off \
|
|
|
|
CYRUS "Use Cyrus SASL backend (not supported)" off
|
2005-07-28 08:31:46 +02:00
|
|
|
|
2003-12-29 14:27:06 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2009-03-23 13:18:31 +01:00
|
|
|
MAKE_JOBS_SAFE= yes
|
2008-06-20 13:57:30 +02:00
|
|
|
USE_PERL5_RUN= yes
|
2004-02-09 08:31:14 +01:00
|
|
|
USE_OPENSSL= yes
|
2004-03-30 21:56:43 +02:00
|
|
|
USE_ICONV= yes
|
2007-07-26 22:00:52 +02:00
|
|
|
USE_RC_SUBR= jabberd
|
2008-09-04 11:47:05 +02:00
|
|
|
USE_BZIP2= yes
|
2007-08-16 15:53:01 +02:00
|
|
|
USE_LDCONFIG= ${PREFIX}/lib/jabberd
|
2007-07-26 22:00:52 +02:00
|
|
|
CONFIGURE_ARGS+= --localstatedir=/var \
|
|
|
|
--sysconfdir=${PREFIX}/etc/jabberd \
|
2008-05-24 02:04:49 +02:00
|
|
|
--enable-ssl --enable-mio=poll \
|
2007-07-26 22:00:52 +02:00
|
|
|
--with-extra-include-path="${LOCALBASE}/include ${EIP}" \
|
2007-08-29 16:07:38 +02:00
|
|
|
--with-extra-library-path="${LOCALBASE}/lib ${ELP}"
|
2003-12-30 13:03:43 +01:00
|
|
|
|
2007-07-26 22:00:52 +02:00
|
|
|
JABBER_USER= jabber
|
|
|
|
JABBER_UID= 93
|
|
|
|
JABBER_GROUP= ${JABBER_USER}
|
|
|
|
JABBER_GID= ${JABBER_UID}
|
2007-08-16 15:53:01 +02:00
|
|
|
JABBER_ETCDIR= "${PREFIX}/etc/jabberd"
|
2007-07-26 22:00:52 +02:00
|
|
|
JABBER_RUNDIR= "/var/jabberd"
|
|
|
|
|
|
|
|
SUB_LIST+= JABBER_USER=${JABBER_USER} JABBER_UID=${JABBER_UID} \
|
|
|
|
JABBER_GROUP=${JABBER_GROUP} JABBER_GID=${JABBER_GID} \
|
|
|
|
JABBER_ETCDIR="${JABBER_ETCDIR}" \
|
2008-06-20 13:57:30 +02:00
|
|
|
JABBER_RUNDIR="${JABBER_RUNDIR}" \
|
|
|
|
PERL="${PERL}"
|
2007-07-26 22:00:52 +02:00
|
|
|
|
|
|
|
SUB_FILES+= pkg-install pkg-deinstall
|
|
|
|
|
|
|
|
PORTDOCS= *
|
|
|
|
|
2008-02-25 12:14:28 +01:00
|
|
|
DOCFILES= AUTHORS COPYING ChangeLog INSTALL NEWS README \
|
2007-07-26 22:00:52 +02:00
|
|
|
TODO UPGRADE
|
|
|
|
|
2008-01-03 16:32:41 +01:00
|
|
|
_REQUIRE= LOGIN
|
|
|
|
|
2005-07-28 08:31:46 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2007-07-30 12:04:24 +02:00
|
|
|
ELP+= ${OPENSSLLIB}
|
|
|
|
EIP+= ${OPENSSLINC}
|
|
|
|
|
2007-08-29 16:07:38 +02:00
|
|
|
.if !defined(WITHOUT_DEBUG)
|
2004-01-01 11:48:49 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-debug
|
|
|
|
.endif
|
|
|
|
|
2004-02-22 10:56:42 +01:00
|
|
|
.if defined(WITH_POSTGRESQL)
|
2005-01-31 01:35:55 +01:00
|
|
|
USE_PGSQL= yes
|
2004-07-13 04:38:15 +02:00
|
|
|
CONFIGURE_ARGS+=--enable-pgsql
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_PGSQL=""
|
2008-01-03 16:32:41 +01:00
|
|
|
_REQUIRE+= postgresql
|
2004-07-13 04:38:15 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-pgsql
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_PGSQL="@comment "
|
2003-12-29 14:27:06 +01:00
|
|
|
.endif
|
|
|
|
|
2005-09-10 21:40:48 +02:00
|
|
|
.if defined(WITH_SQLITE)
|
|
|
|
CONFIGURE_ARGS+=--enable-sqlite
|
2008-04-05 16:58:28 +02:00
|
|
|
LIB_DEPENDS+= sqlite3.8:${PORTSDIR}/databases/sqlite3
|
2007-07-27 14:19:48 +02:00
|
|
|
CFLAGS+= ${PTHREAD_CFLAGS}
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_SQLITE=""
|
2005-09-10 21:40:48 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-sqlite
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_SQLITE="@comment "
|
2005-09-10 21:40:48 +02:00
|
|
|
.endif
|
|
|
|
|
2007-08-29 16:07:38 +02:00
|
|
|
.if !defined(WITHOUT_MYSQL)
|
2003-12-29 14:27:06 +01:00
|
|
|
USE_MYSQL= yes
|
2004-07-13 04:38:15 +02:00
|
|
|
CONFIGURE_ARGS+=--enable-mysql
|
|
|
|
EIP+=:${LOCALBASE}/include/mysql
|
|
|
|
ELP+=:${LOCALBASE}/lib/mysql
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_MYSQL=""
|
2008-01-03 16:32:41 +01:00
|
|
|
_REQUIRE+= mysql
|
2004-07-13 04:38:15 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-mysql
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_MYSQL="@comment "
|
2003-12-30 13:03:43 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_BDB)
|
2007-08-29 16:07:38 +02:00
|
|
|
USE_BDB= 41+
|
2004-07-13 04:38:15 +02:00
|
|
|
CONFIGURE_ARGS+=--enable-db
|
|
|
|
CONFIGURE_ARGS+=--oldincludedir=/nonexistant
|
2006-06-25 18:57:15 +02:00
|
|
|
EIP+=:${BDB_INCLUDE_DIR}
|
|
|
|
ELP+=:${BDB_LIB_DIR}
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_BDB=""
|
2004-07-13 04:38:15 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-db
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_BDB="@comment "
|
2003-12-29 14:27:06 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_LDAP)
|
|
|
|
USE_OPENLDAP= yes
|
2004-07-13 04:38:15 +02:00
|
|
|
CONFIGURE_ARGS+=--enable-ldap
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_LDAP=""
|
2008-01-03 16:32:41 +01:00
|
|
|
_REQUIRE+= slapd
|
2004-07-13 04:38:15 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-ldap
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_LDAP="@comment "
|
2003-12-29 14:27:06 +01:00
|
|
|
.endif
|
|
|
|
|
2007-08-29 16:07:38 +02:00
|
|
|
.if defined(WITH_FS)
|
|
|
|
CONFIGURE_ARGS+=--enable-fs
|
|
|
|
PLIST_SUB+= SUB_FS=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-fs
|
|
|
|
PLIST_SUB+= SUB_FS="@comment "
|
|
|
|
.endif
|
|
|
|
|
2004-06-14 12:01:47 +02:00
|
|
|
.if defined(WITH_PAM)
|
2004-07-13 04:38:15 +02:00
|
|
|
CONFIGURE_ARGS+=--enable-pam
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_PAM=""
|
2004-07-13 04:38:15 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-pam
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_PAM="@comment "
|
2004-06-14 12:01:47 +02:00
|
|
|
.endif
|
|
|
|
|
2005-07-29 16:52:26 +02:00
|
|
|
.if defined(WITH_PIPE)
|
|
|
|
CONFIGURE_ARGS+=--enable-pipe
|
2007-07-26 22:00:52 +02:00
|
|
|
PLIST_SUB+= SUB_PIPE=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SUB_PIPE="@comment "
|
2005-07-29 16:52:26 +02:00
|
|
|
.endif
|
|
|
|
|
2007-07-26 22:00:52 +02:00
|
|
|
.if defined(WITH_ANON)
|
|
|
|
CONFIGURE_ARGS+=--enable-anon
|
|
|
|
PLIST_SUB+= SUB_ANON=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SUB_ANON="@comment "
|
2006-03-20 13:24:18 +01:00
|
|
|
.endif
|
|
|
|
|
2008-01-03 16:32:41 +01:00
|
|
|
.if defined(WITH_REQUIRES)
|
|
|
|
SUB_LIST+= REQUIRE="${_REQUIRE}"
|
|
|
|
.else
|
|
|
|
SUB_LIST+= REQUIRE="LOGIN"
|
2007-09-05 15:24:55 +02:00
|
|
|
.endif
|
|
|
|
|
2009-10-05 09:12:56 +02:00
|
|
|
.if defined(WITH_CYRUS)
|
|
|
|
CONFIGURE_ARGS+= --with-sasl=cyrus
|
|
|
|
LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --with-sasl=gsasl
|
2009-12-15 21:59:48 +01:00
|
|
|
LIB_DEPENDS+= gsasl.14:${PORTSDIR}/security/gsasl
|
2009-10-05 09:12:56 +02:00
|
|
|
.endif
|
|
|
|
|
2008-05-24 02:04:49 +02:00
|
|
|
MAN8= c2s.8 jabberd.8 router.8 s2s.8 sm.8
|
2003-12-29 14:27:06 +01:00
|
|
|
|
2007-07-27 14:19:48 +02:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|"-lsqlite3|"-lsqlite3 ${PTHREAD_LIBS}|g' \
|
|
|
|
${WRKSRC}/configure
|
2008-06-20 13:57:30 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|%%PERL%%|${PERL}|g' \
|
|
|
|
${WRKSRC}/tools/jabberd.in
|
2009-10-05 09:12:56 +02:00
|
|
|
.if defined(WITH_CYRUS)
|
|
|
|
@${REINPLACE_CMD} -e '/^#error /d' \
|
|
|
|
${WRKSRC}/sx/sasl_cyrus.c
|
|
|
|
.endif
|
2007-07-27 14:19:48 +02:00
|
|
|
|
2003-12-30 17:18:46 +01:00
|
|
|
post-install:
|
2007-07-26 22:00:52 +02:00
|
|
|
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
|
|
|
@${CHOWN} -R ${JABBER_USER}:${JABBER_GROUP} ${PREFIX}/etc/jabberd
|
2004-01-01 11:48:49 +01:00
|
|
|
@${FIND} ${PREFIX}/etc/jabberd -type d | ${XARGS} ${CHMOD} 750
|
|
|
|
@${FIND} ${PREFIX}/etc/jabberd -type f | ${XARGS} ${CHMOD} 660
|
2007-07-26 22:00:52 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
.for FILE in ${DOCFILES}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
.for FILE in db-setup.mysql db-setup.pgsql db-setup.sqlite
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/tools/${FILE} ${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
.endif
|
2003-12-30 17:18:46 +01:00
|
|
|
|
2005-07-28 08:31:46 +02:00
|
|
|
.include <bsd.port.post.mk>
|