2019-08-11 15:17:48 +02:00
|
|
|
# $NetBSD: Makefile,v 1.129 2019/08/11 13:18:03 wiz Exp $
|
2004-03-28 21:44:05 +02:00
|
|
|
|
2018-11-02 13:15:25 +01:00
|
|
|
DISTNAME= jabberd-2.7.0
|
2019-08-11 15:17:48 +02:00
|
|
|
PKGREVISION= 3
|
2010-06-02 15:14:47 +02:00
|
|
|
CATEGORIES= chat
|
2015-04-19 14:48:20 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_GITHUB:=jabberd2/jabberd2/releases/download/${DISTNAME}/}
|
2012-08-26 20:25:47 +02:00
|
|
|
EXTRACT_SUFX= .tar.xz
|
2004-03-28 21:44:05 +02:00
|
|
|
|
2011-06-02 17:35:58 +02:00
|
|
|
MAINTAINER= adam@NetBSD.org
|
2019-07-08 12:36:25 +02:00
|
|
|
HOMEPAGE= https://jabberd2.org/
|
2010-06-02 15:14:47 +02:00
|
|
|
COMMENT= XMPP (Jabber) instant messaging server
|
|
|
|
LICENSE= gnu-gpl-v2
|
2004-03-28 21:44:05 +02:00
|
|
|
|
2012-10-21 18:05:19 +02:00
|
|
|
CONFLICTS= jabberd-[0-9]* sendfile-[0-9]*
|
2004-03-28 21:44:05 +02:00
|
|
|
|
2007-05-26 13:50:12 +02:00
|
|
|
USE_LANGUAGES= c c++
|
2004-03-28 21:44:05 +02:00
|
|
|
USE_LIBTOOL= yes
|
2012-05-12 07:44:45 +02:00
|
|
|
USE_TOOLS+= perl:run pkg-config
|
2004-03-28 21:44:05 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2010-06-02 15:14:47 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-anon
|
|
|
|
CONFIGURE_ARGS+= --enable-pipe
|
|
|
|
CONFIGURE_ARGS+= --enable-ssl
|
|
|
|
CONFIGURE_ARGS+= --enable-fs
|
|
|
|
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
|
|
|
|
|
2011-01-28 14:35:49 +01:00
|
|
|
# XXX force linking against pthread, so some modules do not fail to dlopen()
|
|
|
|
LDFLAGS+= ${PTHREAD_LDFLAGS}
|
|
|
|
LIBS+= ${PTHREAD_LIBS}
|
|
|
|
|
2014-07-14 16:41:04 +02:00
|
|
|
CFLAGS.SunOS+= -D__EXTENSIONS__ # sockaddr_storage
|
|
|
|
|
2005-12-05 21:49:47 +01:00
|
|
|
SUBST_CLASSES+= path
|
2018-07-04 15:40:07 +02:00
|
|
|
SUBST_STAGE.path= pre-configure
|
2004-03-28 21:44:05 +02:00
|
|
|
SUBST_FILES.path= configure
|
2006-04-21 11:18:37 +02:00
|
|
|
SUBST_MESSAGE.path= Fixing configure script.
|
|
|
|
SUBST_SED.path= -e "s,/usr/local,${PREFIX},g"
|
|
|
|
SUBST_SED.path+= -e "s,\$$sysconfdir/jabberd,\$$sysconfdir,g"
|
2004-03-28 21:44:05 +02:00
|
|
|
|
2006-04-21 11:18:37 +02:00
|
|
|
REPLACE_PERL+= tools/*.pl
|
2004-03-28 21:44:05 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2007-05-26 15:33:56 +02:00
|
|
|
JABBERD_DBDIR?= ${VARBASE}/db/jabberd
|
|
|
|
|
2007-08-26 11:10:54 +02:00
|
|
|
BUILD_DEFS+= VARBASE JABBERD_USER JABBERD_GROUP
|
2007-05-26 15:33:56 +02:00
|
|
|
BUILD_DEFS+= JABBERD_LOGDIR JABBERD_PIDDIR JABBERD_DBDIR
|
2004-03-28 21:44:05 +02:00
|
|
|
|
|
|
|
PKG_SYSCONFSUBDIR= jabberd
|
2009-08-21 04:28:12 +02:00
|
|
|
RCD_SCRIPTS= jabberd c2s sm router s2s
|
2004-03-28 21:44:05 +02:00
|
|
|
JABBERD_USER?= jabberd
|
|
|
|
JABBERD_GROUP?= jabberd
|
2010-06-02 15:14:47 +02:00
|
|
|
FILES_SUBST+= JABBERD_USER=${JABBERD_USER}
|
|
|
|
FILES_SUBST+= JABBERD_GROUP=${JABBERD_GROUP}
|
|
|
|
FILES_SUBST+= JABBERD_PIDDIR=${JABBERD_PIDDIR}
|
|
|
|
FILES_SUBST+= JABBERD_LOGDIR=${JABBERD_LOGDIR}
|
2007-07-04 22:54:31 +02:00
|
|
|
PKG_USERS_VARS+= JABBERD_USER
|
|
|
|
PKG_GROUPS_VARS+= JABBERD_GROUP
|
2007-02-22 20:26:05 +01:00
|
|
|
PKG_GROUPS= ${JABBERD_GROUP}
|
|
|
|
PKG_USERS= ${JABBERD_USER}:${JABBERD_GROUP}
|
2004-03-28 21:44:05 +02:00
|
|
|
|
|
|
|
BINDIR= ${PREFIX}/bin
|
|
|
|
EGDIR= ${PREFIX}/share/examples/jabberd
|
2008-02-20 15:33:04 +01:00
|
|
|
DOCDIR= ${PREFIX}/share/doc/jabberd
|
2004-03-28 21:44:05 +02:00
|
|
|
|
2010-07-06 02:01:35 +02:00
|
|
|
FILES= jabberd.cfg c2s.xml router.xml router-users.xml \
|
|
|
|
router-filter.xml s2s.xml sm.xml
|
2008-02-20 15:33:04 +01:00
|
|
|
DBFILES= db-jd14-2-jd2.sql db-setup.mysql db-setup.pgsql \
|
2016-02-09 01:21:59 +01:00
|
|
|
db-setup.sqlite db-update.mysql db-update.pgsql \
|
|
|
|
db-update.sqlite
|
|
|
|
DOCFILES= README README.config README.md README.protocol NEWS
|
2008-02-20 15:33:04 +01:00
|
|
|
|
2009-08-21 04:28:12 +02:00
|
|
|
INSTALLATION_DIRS= bin ${EGDIR} ${DOCDIR}
|
2004-03-28 21:44:05 +02:00
|
|
|
|
|
|
|
.for f in ${FILES}
|
|
|
|
CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
|
|
|
|
.endfor
|
|
|
|
CONF_FILES+= ${EGDIR}/roster.xml ${PKG_SYSCONFDIR}/roster.xml
|
|
|
|
|
2004-08-07 16:29:20 +02:00
|
|
|
.include "options.mk"
|
2004-03-28 21:44:05 +02:00
|
|
|
|
|
|
|
.for f in ${JABBERD_LOGDIR} ${JABBERD_DBDIR} ${JABBERD_PIDDIR}
|
|
|
|
OWN_DIRS_PERMS+= ${f} ${JABBERD_USER} ${JABBERD_GROUP} 770
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
post-extract:
|
2005-05-24 23:02:53 +02:00
|
|
|
.for f in ${FILES}
|
2007-08-26 11:10:54 +02:00
|
|
|
mv ${WRKSRC}/etc/${f}.dist.in ${WRKSRC}/etc/${f}.in
|
2004-03-28 21:44:05 +02:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
pre-configure:
|
2008-02-20 15:33:04 +01:00
|
|
|
.for f in ${FILES}
|
2011-01-28 14:35:49 +01:00
|
|
|
sed -e "s|@bindir@|${PREFIX}/bin|g" \
|
|
|
|
-e "s|@jabberd_router_bin@|router|g" \
|
|
|
|
-e "s|@jabberd_c2s_bin@|c2s|g" \
|
|
|
|
-e "s|@jabberd_s2s_bin@|s2s|g" \
|
|
|
|
-e "s|@jabberd_sm_bin@|sm|g" \
|
2013-03-12 00:09:03 +01:00
|
|
|
-e "s|@localstatedir@/@package@/db|${JABBERD_DBDIR}|g" \
|
|
|
|
-e "s|@localstatedir@/@package@/log|${JABBERD_LOGDIR}|g" \
|
|
|
|
-e "s|@localstatedir@/@package@/pid|${JABBERD_PIDDIR}|g" \
|
|
|
|
-e "s|@localstatedir@/@package@/run|${JABBERD_PIDDIR}|g" \
|
|
|
|
-e "s|@localstatedir@/@package@/stats|${JABBERD_LOGDIR}|g"\
|
2011-01-28 14:35:49 +01:00
|
|
|
-e "s|@localstatedir@/lib/jabberd2|${JABBERD_DBDIR}|g" \
|
2007-05-26 15:33:56 +02:00
|
|
|
-e "s|@pkglibdir@|${PREFIX}/lib/jabberd|g" \
|
2011-01-28 14:35:49 +01:00
|
|
|
-e "s|<cachain>@sysconfdir@|<cachain>${SSLCERTS}|g" \
|
|
|
|
-e "s|<pemfile>@sysconfdir@|<pemfile>${SSLCERTS}|g" \
|
|
|
|
-e "s|cachain='@sysconfdir@|cachain='${SSLCERTS}|g" \
|
|
|
|
-e "s|pemfile='@sysconfdir@|pemfile='${SSLCERTS}|g" \
|
|
|
|
-e "s|@sysconfdir@/templates|${PKG_SYSCONFDIR}|g" \
|
|
|
|
-e "s|@sysconfdir@|${PKG_SYSCONFDIR}|g" \
|
2004-03-28 21:44:05 +02:00
|
|
|
${WRKSRC}/etc/${f}.in > ${WRKSRC}/etc/${f}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/etc/templates/roster.xml.dist.in \
|
2008-05-27 15:23:43 +02:00
|
|
|
${DESTDIR}${EGDIR}/roster.xml
|
2010-06-16 09:56:29 +02:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/tools/bdbdump.pl ${DESTDIR}${BINDIR}
|
2008-05-27 15:23:43 +02:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/tools/pipe-auth.pl ${DESTDIR}${BINDIR}
|
2004-03-28 21:44:05 +02:00
|
|
|
.for f in ${DBFILES}
|
2008-05-27 15:23:43 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/tools/${f} ${DESTDIR}${EGDIR}
|
2004-03-28 21:44:05 +02:00
|
|
|
.endfor
|
2008-02-20 15:33:04 +01:00
|
|
|
.for f in ${FILES}
|
2008-05-27 15:23:43 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/etc/${f} ${DESTDIR}${EGDIR}
|
2004-03-28 21:44:05 +02:00
|
|
|
.endfor
|
2008-02-20 15:33:04 +01:00
|
|
|
.for f in ${DOCFILES}
|
2008-05-27 15:23:43 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${DOCDIR}
|
2008-02-20 15:33:04 +01:00
|
|
|
.endfor
|
2004-03-28 21:44:05 +02:00
|
|
|
|
|
|
|
.include "../../converters/libiconv/buildlink3.mk"
|
2004-07-14 02:25:11 +02:00
|
|
|
.include "../../devel/libidn/buildlink3.mk"
|
2010-06-02 15:14:47 +02:00
|
|
|
.include "../../net/udns/buildlink3.mk"
|
2014-02-24 20:30:53 +01:00
|
|
|
.include "../../security/gsasl/buildlink3.mk"
|
2004-03-28 21:44:05 +02:00
|
|
|
.include "../../security/openssl/buildlink3.mk"
|
2007-05-26 13:50:12 +02:00
|
|
|
.include "../../textproc/expat/buildlink3.mk"
|
2016-03-21 23:59:37 +01:00
|
|
|
.include "../../mk/curses.buildlink3.mk"
|
2011-01-28 14:35:49 +01:00
|
|
|
.include "../../mk/dlopen.buildlink3.mk"
|
|
|
|
.include "../../mk/pthread.buildlink3.mk"
|
2004-03-28 21:44:05 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|