2005-06-07 17:18:15 +02:00
|
|
|
# New ports collection makefile for: Jabber Python ICQ Transport
|
|
|
|
# Date created: 2005-06-07
|
|
|
|
# Whom: Renato Botelho <freebsd@galle.com.br>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= pyicq
|
2006-07-03 19:31:03 +02:00
|
|
|
PORTVERSION= 0.7b
|
2006-08-14 20:13:50 +02:00
|
|
|
PORTREVISION= 1
|
2005-11-10 00:11:38 +01:00
|
|
|
CATEGORIES= net-im
|
2005-06-07 17:18:15 +02:00
|
|
|
MASTER_SITES= http://www.blathersource.org/download.php/pyicq-t/
|
|
|
|
PKGNAMEPREFIX= jabber-
|
|
|
|
PKGNAMESUFFIX= -transport
|
|
|
|
DISTNAME= ${PORTNAME}-t-${PORTVERSION}
|
|
|
|
DIST_SUBDIR= jabber
|
|
|
|
|
2005-07-11 18:47:16 +02:00
|
|
|
MAINTAINER= garga@FreeBSD.org
|
2005-06-07 17:18:15 +02:00
|
|
|
COMMENT= Python ICQ-Transport for Jabber
|
|
|
|
|
|
|
|
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/OpenSSL/__init__.py:${PORTSDIR}/security/py-openssl \
|
2006-05-01 01:23:11 +02:00
|
|
|
${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twisted \
|
|
|
|
${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging
|
2005-06-07 17:18:15 +02:00
|
|
|
|
2006-05-01 01:23:11 +02:00
|
|
|
OPTIONS= EJABBERD "Use transport with ejabberd" off
|
2006-03-20 17:51:03 +01:00
|
|
|
|
2005-06-07 17:18:15 +02:00
|
|
|
NO_BUILD= yes
|
|
|
|
USE_PYTHON= yes
|
|
|
|
USE_RC_SUBR= jabber-pyicq-transport.sh
|
2006-08-14 20:13:50 +02:00
|
|
|
LOCAL_PYTHON= ${PYTHON_CMD}
|
2005-06-07 17:18:15 +02:00
|
|
|
|
|
|
|
SUB_FILES= pkg-message
|
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}
|
|
|
|
|
2006-03-02 21:57:22 +01:00
|
|
|
PORTDOCS= COPYING README NEWS
|
2005-06-07 17:18:15 +02:00
|
|
|
|
2006-03-20 17:51:03 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if defined(WITH_EJABBERD)
|
|
|
|
JABBER_USER?= ejabberd
|
2006-04-26 13:52:33 +02:00
|
|
|
SUB_LIST+= JABBER_REQUIRE=ejabberd
|
2006-03-20 17:51:03 +01:00
|
|
|
.else
|
|
|
|
JABBER_USER?= jabber
|
2006-04-26 13:52:33 +02:00
|
|
|
SUB_LIST+= JABBER_REQUIRE=jabberd
|
2006-03-20 17:51:03 +01:00
|
|
|
.endif
|
|
|
|
|
2006-04-26 13:52:33 +02:00
|
|
|
SUB_LIST+= JABBER_USER=${JABBER_USER}
|
|
|
|
|
2005-06-07 17:18:15 +02:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e '/spooldir/s|\.|/var/spool/jabber|' \
|
2006-03-02 21:57:22 +01:00
|
|
|
-e '/pid/s|PyICQt.pid|/var/jabberd/pid/PyICQt.pid|' \
|
2005-06-07 17:18:15 +02:00
|
|
|
${WRKSRC}/config_example.xml
|
2006-08-14 20:13:50 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g; s|%%PYTHON_CMD%%|${LOCAL_PYTHON}|g' \
|
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
|
|
|
@${RM} ${WRKSRC}/src/main.py.*
|
|
|
|
|
|
|
|
do-install:
|
2006-03-02 21:57:22 +01:00
|
|
|
${MKDIR} ${INST_DIR}/src ${INST_DIR}/data
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/PyICQt.py ${INST_DIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/data/defaultAIMAvatar.png ${INST_DIR}/data
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/data/defaultICQAvatar.png ${INST_DIR}/data
|
|
|
|
@${CP} -Rv ${WRKSRC}/src/* ${INST_DIR}/src
|
|
|
|
@${FIND} ${INST_DIR}/src/ -type d -exec ${CHMOD} 755 "{}" \;
|
|
|
|
@${FIND} ${INST_DIR}/src/ -type f -exec ${CHMOD} 644 "{}" \;
|
2005-06-07 17:18:15 +02:00
|
|
|
@${MKDIR} ${EXAMPLESDIR}/etc
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/config_example.xml ${EXAMPLESDIR}/etc/jabber-pyicq.xml
|
|
|
|
[ -f ${PREFIX}/etc/jabber-pyicq.xml ] || ${CP} ${EXAMPLESDIR}/etc/jabber-pyicq.xml ${PREFIX}/etc/jabber-pyicq.xml
|
|
|
|
.if !defined(NOPORTDOCS)
|
2006-03-02 21:57:22 +01:00
|
|
|
${MKDIR} ${DOCSDIR}
|
2005-06-07 17:18:15 +02:00
|
|
|
.for portdoc in ${PORTDOCS}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/${portdoc} ${DOCSDIR}/
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
2006-03-20 17:51:03 +01:00
|
|
|
.include <bsd.port.post.mk>
|