blob: e6d07568dda0ed51c62ed50de3581de4055a4a3a (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
# $FreeBSD$
PORTNAME= pyicq
PORTVERSION= 0.8.1.5
PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= net-im
MASTER_SITES= GOOGLE_CODE
PKGNAMEPREFIX= jabber-
PKGNAMESUFFIX= -transport
DISTNAME= ${PORTNAME}t-${PORTVERSION}
DIST_SUBDIR= jabber
MAINTAINER= ports@FreeBSD.org
COMMENT= Python ICQ-Transport for Jabber
LICENSE= GPLv2
BROKEN= Unfetchable (google code has gone away)
DEPRECATED= Unfetchable for more than six months (google code has gone away)
EXPIRATION_DATE= 2017-04-30
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/OpenSSL/__init__.py:security/py-openssl \
${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow
PROJECTHOST= pyicqt
OPTIONS_DEFINE= DOCS EXAMPLES MYSQL TWISTED
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
TWISTED_DESC= Use py-twisted
NO_BUILD= yes
USES= python
USE_RC_SUBR= jabber-pyicq-transport
LOCAL_PYTHON= ${PYTHON_CMD}
SUB_FILES= pkg-message README.jabberd14 README.jabberd2 README.external
SUB_LIST= PYTHON_CMD=${LOCAL_PYTHON}
INST_DIR= ${PREFIX}/lib/jabber/${PORTNAME}
PORTDOCS= NEWS README
PORTEXAMPLES= db-setup.mysql jabber-pyicq.xml
MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=0:databases/py-MySQLdb
TWISTED_USES= twisted:web,words
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MJABBER}
JABBER_REQUIRE?= jabber
JABBER_USER?= jabber
JABBER_PIDDIR?= /var/run/jabberd
JABBER_SPOOLDIR?= /var/spool/jabberd
RUN_DEPENDS+= jabberd14:net-im/jabber
.elif ${PORT_OPTIONS:MJABBERD}
JABBER_REQUIRE?= jabberd
JABBER_USER?= jabber
JABBER_PIDDIR?= /var/jabberd/pid
JABBER_SPOOLDIR?= /var/spool/jabber
RUN_DEPENDS+= jabberd:net-im/jabberd
.elif ${PORT_OPTIONS:MEJABBERD}
JABBER_REQUIRE?= ejabberd
JABBER_USER?= ejabberd
JABBER_PIDDIR?= /var/jabberd/pid
JABBER_SPOOLDIR?= /var/spool/jabber
RUN_DEPENDS+= ejabberdctl:net-im/ejabberd
.elif ${PORT_OPTIONS:MDAEMON}
JABBER_REQUIRE?= DAEMON
JABBER_USER?= nobody
JABBER_PIDDIR?= /var/run/pyicq
JABBER_SPOOLDIR?= /var/spool/pyicq
.endif
SUB_LIST+= JABBER_REQUIRE="${JABBER_REQUIRE}" \
JABBER_PIDDIR="${JABBER_PIDDIR}" \
JABBER_SPOOLDIR="${JABBER_SPOOLDIR}"
SUB_LIST+= JABBER_USER=${JABBER_USER}
post-patch:
@${REINPLACE_CMD} -i "" -e '/spooldir/s|\.|${JABBER_SPOOLDIR}|' \
-e '/pid/s|PyICQt.pid|${JABBER_PIDDIR}/PyICQt.pid|' \
${WRKSRC}/config_example.xml
@${REINPLACE_CMD} -i "" -e 's,"config.xml","${PREFIX}/etc/jabber-pyicq.xml",' \
${WRKSRC}/src/main.py
@${REINPLACE_CMD} -i "" 's|^#!.*$$|#!${LOCAL_PYTHON}|' \
${WRKSRC}/PyICQt.py
do-install:
${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}/
.include <bsd.port.mk>
|