summaryrefslogtreecommitdiffstats
path: root/irc/bitlbee/Makefile
blob: ee822a49b88dfd5d4a8b9fbc936ebec01db35910 (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
# $FreeBSD$

PORTNAME=	bitlbee
PORTVERSION=	3.4
CATEGORIES=	irc
MASTER_SITES=	http://get.bitlbee.org/src/ \
		LOCAL/brix

MAINTAINER=	garga@FreeBSD.org
COMMENT=	IRC to other chat networks gateway

LICENSE=	GPLv2

BUILD_DEPENDS=	xmlto:${PORTSDIR}/textproc/xmlto \
		xsltproc:${PORTSDIR}/textproc/libxslt

SUB_FILES=	pkg-message
PORTDOCS=	AUTHORS CHANGES CREDITS FAQ README
PORTEXAMPLES=	bitlbee.conf motd.txt

GNU_CONFIGURE=	yes
USES=		gmake pkgconfig
USE_RC_SUBR=	bitlbee
USE_GNOME=	glib20
OPTIONS_SUB=	yes

OPTIONS_DEFINE=		DEBUG DOCS EXAMPLES OTR

OPTIONS_SINGLE=		EVENTS SSL
OPTIONS_SINGLE_EVENTS=	GLIB LIBEVENT
OPTIONS_SINGLE_SSL=	OPENSSL GNUTLS NSS

OPTIONS_MULTI=		PROTO
OPTIONS_MULTI_PROTO=	JABBER LIBPURPLE MSN OSCAR SKYPE TWITTER YAHOO

OTR_DESC=		Off-the-Record Messaging support
LIBPURPLE_DESC=		Use libpurple for protocol support
MSN_DESC=		Microsoft Messenger support
OSCAR_DESC=		OSCAR (ICQ, AIM) support
SKYPE_DESC=		Skype support
TWITTER_DESC=		Twitter support
YAHOO_DESC=		Yahoo! Messenger support
GLIB_DESC=		Use glib as event handler
LIBEVENT_DESC=		Use libevent as event handler

OPTIONS_DEFAULT=	GLIB GNUTLS JABBER OSCAR TWITTER YAHOO

CONFIGURE_ARGS=	--config=/var/db/bitlbee --strip=0

DEBUG_CONFIGURE_ON=	--debug=1
GNUTLS_CONFIGURE_ON=	--ssl=gnutls
GNUTLS_LIB_DEPENDS=	libgnutls.so:${PORTSDIR}/security/gnutls \
			libgcrypt.so:${PORTSDIR}/security/libgcrypt
JABBER_CONFIGURE_OFF=	--jabber=0
LIBEVENT_CONFIGURE_ON=	--events=libevent --libevent=${LOCALBASE}
LIBEVENT_LIB_DEPENDS=	libevent.so:${PORTSDIR}/devel/libevent2
LIBPURPLE_CONFIGURE_ON=	--purple=1
LIBPURPLE_LIB_DEPENDS=	libpurple.so:${PORTSDIR}/net-im/libpurple
MSN_CONFIGURE_OFF=	--msn=0
NSS_CONFIGURE_ON=	--ssl=nss
NSS_LIB_DEPENDS=	libnss3.so:${PORTSDIR}/security/nss
OPENSSL_CONFIGURE_ON=	--ssl=openssl
OSCAR_CONFIGURE_OFF=	--oscar=0
OTR_CONFIGURE_ON=	--otr=1
OTR_LIB_DEPENDS=	libotr.so:${PORTSDIR}/security/libotr
SKYPE_CONFIGURE_ON=	--skype=1
SKYPE_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Skype4Py>0:${PORTSDIR}/net-im/py-skype4py
SKYPE_USES=		python
TWITTER_CONFIGURE_OFF=	--twitter=0
YAHOO_CONFIGURE_OFF=	--yahoo=0

USERS=		bitlbee
GROUPS=		bitlbee

.include <bsd.port.options.mk>

post-patch:
	@${REINPLACE_CMD} -e "s|^\(EFLAGS=.*\)|\1 ${LDFLAGS}|" \
		${WRKSRC}/configure
	@${REINPLACE_CMD} -e "s:/etc/bitlbee/motd.txt:${ETCDIR}/motd.txt:" \
		-e "s:/var/lib/bitlbee:/var/db/bitlbee:" \
		${WRKSRC}/bitlbee.conf
	@${REINPLACE_CMD} -e "s:/var/lib/bitlbee:/var/db/bitlbee:" \
		${WRKSRC}/doc/bitlbee.8

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/bitlbee
.if ${PORT_OPTIONS:MSKYPE}
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/skyped
	${MV} ${STAGEDIR}${PREFIX}/etc/skyped/skyped.conf \
		${STAGEDIR}${PREFIX}/etc/skyped/skyped.conf.sample
	${MV} ${STAGEDIR}${PREFIX}/etc/skyped/skyped.cnf \
		${STAGEDIR}${PREFIX}/etc/skyped/skyped.cnf.sample
.endif
	${MKDIR} ${STAGEDIR}${ETCDIR}
.if ${PORT_OPTIONS:MDOCS}
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S@^@${WRKSRC}/doc/@} ${STAGEDIR}${DOCSDIR}
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	${INSTALL_DATA} ${PORTEXAMPLES:S@^@${WRKSRC}/@} ${STAGEDIR}${EXAMPLESDIR}
.endif

.include <bsd.port.mk>
OpenPOWER on IntegriCloud