2005-06-07 17:18:15 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= pyicq
|
2010-03-30 16:14:21 +02:00
|
|
|
PORTVERSION= 0.8.1.5
|
2014-10-07 13:33:46 +02:00
|
|
|
PORTREVISION= 2
|
2008-12-30 13:03:57 +01:00
|
|
|
PORTEPOCH= 1
|
2005-11-10 00:11:38 +01:00
|
|
|
CATEGORIES= net-im
|
2015-05-14 12:15:04 +02:00
|
|
|
MASTER_SITES= GOOGLE_CODE
|
2005-06-07 17:18:15 +02:00
|
|
|
PKGNAMEPREFIX= jabber-
|
|
|
|
PKGNAMESUFFIX= -transport
|
2008-12-30 13:03:57 +01:00
|
|
|
DISTNAME= ${PORTNAME}t-${PORTVERSION}
|
2005-06-07 17:18:15 +02:00
|
|
|
DIST_SUBDIR= jabber
|
|
|
|
|
2012-08-16 10:47:58 +02:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2005-06-07 17:18:15 +02:00
|
|
|
COMMENT= Python ICQ-Transport for Jabber
|
|
|
|
|
2012-09-14 21:08:55 +02:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2016-04-01 16:16:16 +02:00
|
|
|
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/OpenSSL/__init__.py:security/py-openssl \
|
|
|
|
${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow
|
2005-06-07 17:18:15 +02:00
|
|
|
|
2008-03-13 12:27:29 +01:00
|
|
|
PROJECTHOST= pyicqt
|
2014-08-13 21:37:43 +02:00
|
|
|
OPTIONS_DEFINE= DOCS EXAMPLES MYSQL TWISTED
|
2012-09-14 21:08:55 +02:00
|
|
|
OPTIONS_DEFAULT=DAEMON
|
|
|
|
OPTIONS_SINGLE= SERVER
|
|
|
|
OPTIONS_SINGLE_SERVER= JABBER JABBERD EJABBERD DAEMON
|
|
|
|
JABBER_DESC= Use with jabberd14 (net-im/jabber)
|
|
|
|
JABBERD_DESC= Use with jabberd 2.x (net-im/jabberd)
|
|
|
|
EJABBERD_DESC= Use with ejabberd (net-im/ejabberd)
|
|
|
|
DAEMON_DESC= Use builtin daemon
|
2014-08-13 21:37:43 +02:00
|
|
|
TWISTED_DESC= Use py-twisted
|
2006-03-20 17:51:03 +01:00
|
|
|
|
2005-06-07 17:18:15 +02:00
|
|
|
NO_BUILD= yes
|
2014-10-07 13:33:46 +02:00
|
|
|
USES= python
|
2012-08-06 01:19:36 +02:00
|
|
|
USE_RC_SUBR= jabber-pyicq-transport
|
2006-08-14 20:13:50 +02:00
|
|
|
LOCAL_PYTHON= ${PYTHON_CMD}
|
2005-06-07 17:18:15 +02:00
|
|
|
|
2007-03-14 20:43:41 +01:00
|
|
|
SUB_FILES= pkg-message README.jabberd14 README.jabberd2 README.external
|
2006-08-14 20:13:50 +02:00
|
|
|
SUB_LIST= PYTHON_CMD=${LOCAL_PYTHON}
|
2005-06-07 17:18:15 +02:00
|
|
|
|
|
|
|
INST_DIR= ${PREFIX}/lib/jabber/${PORTNAME}
|
|
|
|
|
2014-08-13 21:37:43 +02:00
|
|
|
PORTDOCS= NEWS README
|
|
|
|
PORTEXAMPLES= db-setup.mysql jabber-pyicq.xml
|
|
|
|
|
2016-04-01 16:16:16 +02:00
|
|
|
MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=0:databases/py-MySQLdb
|
2015-02-26 13:12:19 +01:00
|
|
|
TWISTED_USES= twisted:web,words
|
2005-06-07 17:18:15 +02:00
|
|
|
|
2012-09-14 21:08:55 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2006-03-20 17:51:03 +01:00
|
|
|
|
2012-09-14 21:08:55 +02:00
|
|
|
.if ${PORT_OPTIONS:MJABBER}
|
2007-03-14 20:43:41 +01:00
|
|
|
JABBER_REQUIRE?= jabber
|
|
|
|
JABBER_USER?= jabber
|
|
|
|
JABBER_PIDDIR?= /var/run/jabberd
|
|
|
|
JABBER_SPOOLDIR?= /var/spool/jabberd
|
2016-04-01 16:16:16 +02:00
|
|
|
RUN_DEPENDS+= jabberd14:net-im/jabber
|
2012-09-14 21:08:55 +02:00
|
|
|
.elif ${PORT_OPTIONS:MJABBERD}
|
2007-03-14 20:43:41 +01:00
|
|
|
JABBER_REQUIRE?= jabberd
|
|
|
|
JABBER_USER?= jabber
|
|
|
|
JABBER_PIDDIR?= /var/jabberd/pid
|
|
|
|
JABBER_SPOOLDIR?= /var/spool/jabber
|
2016-04-01 16:16:16 +02:00
|
|
|
RUN_DEPENDS+= jabberd:net-im/jabberd
|
2012-09-14 21:08:55 +02:00
|
|
|
.elif ${PORT_OPTIONS:MEJABBERD}
|
2007-03-14 20:43:41 +01:00
|
|
|
JABBER_REQUIRE?= ejabberd
|
|
|
|
JABBER_USER?= ejabberd
|
|
|
|
JABBER_PIDDIR?= /var/jabberd/pid
|
|
|
|
JABBER_SPOOLDIR?= /var/spool/jabber
|
2016-04-01 16:16:16 +02:00
|
|
|
RUN_DEPENDS+= ejabberdctl:net-im/ejabberd
|
2012-09-14 21:08:55 +02:00
|
|
|
.elif ${PORT_OPTIONS:MDAEMON}
|
2007-03-14 20:43:41 +01:00
|
|
|
JABBER_REQUIRE?= DAEMON
|
|
|
|
JABBER_USER?= nobody
|
|
|
|
JABBER_PIDDIR?= /var/run/pyicq
|
|
|
|
JABBER_SPOOLDIR?= /var/spool/pyicq
|
2006-03-20 17:51:03 +01:00
|
|
|
.endif
|
|
|
|
|
2007-03-14 20:43:41 +01:00
|
|
|
SUB_LIST+= JABBER_REQUIRE="${JABBER_REQUIRE}" \
|
|
|
|
JABBER_PIDDIR="${JABBER_PIDDIR}" \
|
|
|
|
JABBER_SPOOLDIR="${JABBER_SPOOLDIR}"
|
|
|
|
|
2006-04-26 13:52:33 +02:00
|
|
|
SUB_LIST+= JABBER_USER=${JABBER_USER}
|
|
|
|
|
2005-06-07 17:18:15 +02:00
|
|
|
post-patch:
|
2007-03-14 20:43:41 +01:00
|
|
|
@${REINPLACE_CMD} -i "" -e '/spooldir/s|\.|${JABBER_SPOOLDIR}|' \
|
|
|
|
-e '/pid/s|PyICQt.pid|${JABBER_PIDDIR}/PyICQt.pid|' \
|
2005-06-07 17:18:15 +02:00
|
|
|
${WRKSRC}/config_example.xml
|
2006-08-17 17:50:19 +02:00
|
|
|
@${REINPLACE_CMD} -i "" -e 's,"config.xml","${PREFIX}/etc/jabber-pyicq.xml",' \
|
2005-06-07 17:18:15 +02:00
|
|
|
${WRKSRC}/src/main.py
|
2006-08-14 20:13:50 +02:00
|
|
|
@${REINPLACE_CMD} -i "" 's|^#!.*$$|#!${LOCAL_PYTHON}|' \
|
2006-03-02 21:57:22 +01:00
|
|
|
${WRKSRC}/PyICQt.py
|
2005-06-07 17:18:15 +02:00
|
|
|
|
|
|
|
do-install:
|
2014-08-13 21:37:43 +02:00
|
|
|
${MKDIR} ${STAGEDIR}${INST_DIR}/data/ ${STAGEDIR}${INST_DIR}/src/
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/PyICQt.py ${STAGEDIR}${INST_DIR}/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/data/defaultAIMAvatar.png ${STAGEDIR}${INST_DIR}/data/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/data/defaultICQAvatar.png ${STAGEDIR}${INST_DIR}/data/
|
|
|
|
${CP} -Rv ${WRKSRC}/src/* ${STAGEDIR}${INST_DIR}/src/
|
|
|
|
${FIND} ${STAGEDIR}${INST_DIR}/src/ -type d -exec ${CHMOD} 755 "{}" \;
|
|
|
|
${FIND} ${STAGEDIR}${INST_DIR}/src/ -type f -exec ${CHMOD} 644 "{}" \;
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/config_example.xml ${STAGEDIR}${PREFIX}/etc/jabber-pyicq.xml.sample
|
|
|
|
${MKDIR} ${STAGEDIR}${DOCSDIR}/
|
|
|
|
cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/
|
|
|
|
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/config_example.xml ${STAGEDIR}${EXAMPLESDIR}/jabber-pyicq.xml
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/tools/db-setup.mysql ${STAGEDIR}${EXAMPLESDIR}/
|
2005-06-07 17:18:15 +02:00
|
|
|
|
2012-09-14 21:08:55 +02:00
|
|
|
.include <bsd.port.mk>
|