summaryrefslogtreecommitdiff
path: root/chat/mu-conference/Makefile
blob: 90aa5063da8a2aa8197f65b2d7a4ec4a6b2dddee (plain)
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
# $NetBSD: Makefile,v 1.5 2004/12/14 19:38:19 minskim Exp $
#

DISTNAME=		mu-conference-0.6.0
PKGREVISION=		3
CATEGORIES=		chat
MASTER_SITES=		http://jabber.terrapin.com/JCR/ http://www.jabberstudio.org/projects/mu-conference/releases/download.php?file=
DISTFILES=		${DISTNAME}.tar.gz jcr-0.1.2.tar.gz

MAINTAINER=		abs@mono.org
HOMEPAGE=		http://jabber.terrapin.com/JCR/
COMMENT=		Implementation of the JEP-0045 Multi-User Chat protocol

DEPENDS+=		jabberd-[0-9]*:../../chat/jabberd2

WRKSRC=			${WRKDIR}/jcr-0.1.2
SUBWRKSRC=		${WRKSRC}/${DISTNAME}/src
XMLCONFIG=		${WRKDIR}/${DISTNAME}/muc-jcr.xml

USE_BUILDLINK3=		yes
USE_GNU_TOOLS+=		make
USE_BUILDLINK3=         yes
USE_PKGINSTALL=		yes

PKG_SYSCONFSUBDIR=      jabberd
RCD_SCRIPTS=            muc

BUILD_DEFS+=		JABBERD_USER JABBERD_LOGDIR JABBERD_PIDDIR
JABBERD_USER?=		jabberd

FILES_SUBST+=		JABBERD_PIDDIR=${JABBERD_PIDDIR}
FILES_SUBST+=		JABBERD_USER=${JABBERD_USER}

EGDIR=			${PREFIX}/share/examples/jabberd
CONF_FILES+=		${EGDIR}/muc-jcr.xml ${PKG_SYSCONFDIR}/muc-jcr.xml

post-extract:
	@${MV} ${XMLCONFIG} ${XMLCONFIG}.in

pre-configure:
	@${SED}	-e "s|\(<logdir>\)[^<]*|\1${JABBERD_LOGDIR}|g" \
		-e "s|\(<pidfile>\).|\1${JABBERD_PIDDIR}|g" \
		-e "s|\(<spool>\).|\1${JABBERD_SPOOLDIR}|g" \
		${XMLCONFIG}.in > ${XMLCONFIG}

pre-build:
	cd ${WRKDIR} ; ${PAX} -rw -pe ${DISTNAME} ${WRKSRC}

post-build:
	${CP} ${WRKSRC}/src/main.c ${WRKSRC}/src/jcomp.mk ${SUBWRKSRC}
	cd ${SUBWRKSRC} ; ${SETENV} ${MAKE_ENV} ${GMAKE} -f jcomp.mk

do-install:
	${INSTALL_PROGRAM} ${SUBWRKSRC}/mu-conference ${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/${DISTNAME}/muc-jcr.xml ${EGDIR}

.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/pkgconfig/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"