Lines 5-45
Link Here
|
5 |
# $FreeBSD: ports/net-im/mu-conference/Makefile,v 1.5 2006/05/16 14:45:21 itetcu Exp $ |
5 |
# $FreeBSD: ports/net-im/mu-conference/Makefile,v 1.5 2006/05/16 14:45:21 itetcu Exp $ |
6 |
|
6 |
|
7 |
PORTNAME= mu-conference |
7 |
PORTNAME= mu-conference |
8 |
PORTVERSION= 0.6.0 |
8 |
PORTVERSION= 0.7 |
9 |
PORTREVISION= 3 |
|
|
10 |
CATEGORIES= net-im |
9 |
CATEGORIES= net-im |
11 |
MASTER_SITES= ${MASTER_SITE_GENTOO} \ |
10 |
MASTER_SITES= http://download.gna.org/mu-conference/ |
12 |
http://jabber.terrapin.com/JCR/:jcr |
11 |
DISTNAME= ${PORTNAME}_${PORTVERSION} |
13 |
MASTER_SITE_SUBDIR= distfiles |
|
|
14 |
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} jcr-${JCR_VER}.tar.gz:jcr |
15 |
|
12 |
|
16 |
MAINTAINER= dsh@vlink.ru |
13 |
MAINTAINER= mm@FreeBSD.org |
17 |
COMMENT= Multi-User Conferencing component for Jabber |
14 |
COMMENT= Multi-User Conferencing component for Jabber |
18 |
|
15 |
|
19 |
USE_GNOME= glib20 |
16 |
LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 \ |
20 |
USE_RC_SUBR= ${PORTNAME}.sh |
17 |
idn.16:${PORTSDIR}/dns/libidn |
21 |
|
18 |
|
22 |
WRKSRC= ${WRKDIR}/jcr-${JCR_VER} |
19 |
USE_GNOME= glib20 pkgconfig |
|
|
20 |
USE_RC_SUBR= ${PORTNAME} |
23 |
|
21 |
|
24 |
JCR_VER?= 0.2.4 |
22 |
OPTIONS= MYSQL "Enable MySQL support" off \ |
|
|
23 |
JABBER "Use with jabberd14 (net-im/jabber)" off \ |
24 |
JABBERD "Use with jabberd 2.x (net-im/jabberd)" off \ |
25 |
EJABBERD "Use with ejabberd (net-im/ejabberd)" off |
25 |
|
26 |
|
26 |
post-extract: |
27 |
SUB_FILES+= pkg-message README.FreeBSD.jabberd14 \ |
27 |
${MV} ${WRKDIR}/${DISTNAME} ${WRKSRC} |
28 |
README.FreeBSD.jabberd2 README.FreeBSD.external |
28 |
|
29 |
|
29 |
post-build: |
30 |
CFLAGS+= -I${LOCALBASE}/include |
30 |
.for i in jcomp.mk main.c |
31 |
|
31 |
${CP} ${WRKSRC}/src/${i} ${WRKSRC}/${DISTNAME}/src/ |
32 |
DOCFILES= AUTHORS COPYING ChangeLog FAQ LICENSE README TODO \ |
32 |
.endfor |
33 |
XEP0045_SUPPORT muc-default.xml style.css |
33 |
(cd ${WRKSRC}/${DISTNAME}/src; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} jcomp.mk) |
34 |
|
|
|
35 |
PORTDOCS= * |
36 |
|
37 |
.include <bsd.port.pre.mk> |
38 |
|
39 |
.if defined(WITH_MYSQL) |
40 |
USE_MYSQL= yes |
41 |
CFLAGS+= -DHAVE_MYSQL |
42 |
DOCFILES+= README.sql mu-conference.sql |
43 |
.endif |
44 |
|
45 |
MUC_LOGDIR?= /var/log/mu-conference |
46 |
|
47 |
.if defined(WITH_JABBER) |
48 |
JABBER_REQUIRE?= jabber |
49 |
JABBER_USER?= jabber |
50 |
JABBER_PIDDIR?= /var/run/jabberd |
51 |
JABBER_SPOOLDIR?= /var/spool/jabberd |
52 |
RUN_DEPENDS+= jabberd14:${PORTSDIR}/net-im/jabber |
53 |
.elif defined(WITH_JABBERD) |
54 |
JABBER_REQUIRE?= jabberd |
55 |
JABBER_USER?= jabber |
56 |
JABBER_PIDDIR?= /var/jabberd/pid |
57 |
JABBER_SPOOLDIR?= /var/spool/jabber |
58 |
RUN_DEPENDS+= jabberd:${PORTSDIR}/net-im/jabberd |
59 |
.elif defined(WITH_EJABBERD) |
60 |
JABBER_REQUIRE?= ejabberd |
61 |
JABBER_USER?= ejabberd |
62 |
JABBER_PIDDIR?= /var/jabberd/pid |
63 |
JABBER_SPOOLDIR?= /var/spool/jabber |
64 |
RUN_DEPENDS+= ejabberd:${PORTSDIR}/net-im/ejabberd |
65 |
.else |
66 |
JABBER_REQUIRE?= DAEMON |
67 |
JABBER_USER?= nobody |
68 |
JABBER_PIDDIR?= /var/run/mu-conference |
69 |
JABBER_SPOOLDIR?= /var/spool/mu-conference |
70 |
.endif |
71 |
|
72 |
SUB_LIST+= JABBER_REQUIRE="${JABBER_REQUIRE}" \ |
73 |
JABBER_PIDDIR="${JABBER_PIDDIR}" \ |
74 |
JABBER_SPOOLDIR="${JABBER_SPOOLDIR}" \ |
75 |
JABBER_USER=${JABBER_USER} \ |
76 |
MUC_LOGDIR=${MUC_LOGDIR} |
77 |
|
78 |
post-patch: |
79 |
@${REINPLACE_CMD} -e 's#=$$(CFLAGS)#=#g' \ |
80 |
-e 's#CFLAGS[:]*=#CFLAGS+=#g' \ |
81 |
-e 's#`pkg-config#`${LOCALBASE}/bin/pkg-config#g' \ |
82 |
${WRKSRC}/Makefile ${WRKSRC}/*/Makefile \ |
83 |
${WRKSRC}/*/*/Makefile |
84 |
@${REINPLACE_CMD} -e 's#<spool>\./spool/chat.localhost#<spool>${JABBER_SPOOLDIR}/conference.localhost#g' \ |
85 |
-e 's#<logdir>\./syslogs#<logdir>${LOGDIR}#g' \ |
86 |
-e 's#<logdir>\./logs#<logdir>${JABBER_SPOOLDIR}/conference.localhost/logs#g' \ |
87 |
-e 's#<pidfile>\.#<pidfile>${JABBER_PIDDIR}#g' \ |
88 |
${WRKSRC}/muc-default.xml |
89 |
.if defined(WITH_MYSQL) |
90 |
@${REINPLACE_CMD} \ |
91 |
-e 's#`mysql_config#`${LOCALBASE}/bin/mysql_config#g' \ |
92 |
${WRKSRC}/src/Makefile |
93 |
.else |
94 |
@${REINPLACE_CMD} -e 's#`mysql_config --libs`##g' \ |
95 |
${WRKSRC}/src/Makefile |
96 |
.endif |
34 |
|
97 |
|
35 |
do-install: |
98 |
do-install: |
36 |
${INSTALL_PROGRAM} ${WRKSRC}/${DISTNAME}/src/mu-conference ${PREFIX}/bin |
99 |
${INSTALL_PROGRAM} ${WRKSRC}/src/mu-conference ${PREFIX}/bin |
37 |
${INSTALL_DATA} ${WRKSRC}/${DISTNAME}/muc-jcr.xml ${PREFIX}/etc/muc.xml-dist |
100 |
${INSTALL_DATA} ${WRKSRC}/muc-default.xml ${PREFIX}/etc/muc.xml.sample |
|
|
101 |
@if ! [ -f ${PREFIX}/etc/muc.xml ]; then \ |
102 |
${INSTALL_DATA} ${WRKSRC}/muc-default.xml ${PREFIX}/etc/muc.xml; \ |
103 |
fi |
38 |
.if !defined(NOPORTDOCS) |
104 |
.if !defined(NOPORTDOCS) |
39 |
${MKDIR} ${DOCSDIR} |
105 |
@${MKDIR} ${DOCSDIR}/scripts |
40 |
.for i in FAQ README |
106 |
.for FILE in README.FreeBSD.jabberd14 README.FreeBSD.jabberd2 README.FreeBSD.external |
41 |
${INSTALL_DATA} ${WRKSRC}/${DISTNAME}/${i} ${DOCSDIR} |
107 |
@${INSTALL_DATA} ${WRKDIR}/${FILE} ${DOCSDIR} |
|
|
108 |
.endfor |
109 |
.for FILE in ${DOCFILES} |
110 |
@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} |
111 |
.endfor |
112 |
${INSTALL_DATA} ${WRKSRC}/scripts/README ${DOCSDIR}/scripts |
113 |
.for FILE in roommaker.pl roomname.pl |
114 |
${INSTALL_SCRIPT} ${WRKSRC}/scripts/${FILE} ${DOCSDIR}/scripts |
42 |
.endfor |
115 |
.endfor |
43 |
.endif |
116 |
.endif |
44 |
|
117 |
|
45 |
.include <bsd.port.mk> |
118 |
post-install: |
|
|
119 |
@${CAT} ${PKGMESSAGE} |
120 |
|
121 |
.include <bsd.port.post.mk> |