aboutsummaryrefslogtreecommitdiffstats
path: root/irc/bitlbee/Makefile
blob: 5c13a24cd7c7baf83cc2d40b40effafc177590c6 (plain) (blame)
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
# New ports collection makefile for:    bitlbee
# Date created:                         10 June 2003
# Whom:                                 Peter van Dijk <peter@dataloss.nl>
#
# $FreeBSD$
#

PORTNAME=   bitlbee
PORTVERSION=    0.92
PORTREVISION=   3
CATEGORIES= irc
MASTER_SITES=   http://get.bitlbee.org/src/:bitlbee \
        http://www.bitlbee.be/andy/:msn6 \
        http://www.il.fontys.nl/~rink/patches/:ldap
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX}:bitlbee
EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}

MAINTAINER= peter@dataloss.nl
COMMENT=    An IRC to other chat networks gateway

.if defined(WITH_MSN) && defined(WITH_MSN6_FEATURES)
DISTFILES+= ${DISTNAME}-msn6.akke.patch:msn6
.endif
.if defined(WITH_LDAP)
DISTFILES+= ${DISTNAME}-ldap.diff:ldap
.endif

MAN5=       bitlbee.conf.5
MAN8=       bitlbee.8

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --mandir=${PREFIX}/man --config=${PREFIX}/etc/bitlbee
USE_GMAKE=  yes
USE_GNOME=  glib20
USE_GETOPT_LONG=    yes
PKGMESSAGE= ${WRKDIR}/pkg-message

.if defined(WITH_LDAP)
USE_OPENLDAP=yes
.endif

.if defined(WITH_MSN)
LIB_DEPENDS+=   gnutls.12:${PORTSDIR}/security/gnutls
CONFIGURE_ARGS+=    --msn=1
pre-configure:
    @${ECHO_CMD} "MSN and Jabber/SSL support will be enabled."
.else
CONFIGURE_ARGS+=    --msn=0 --ssl=bogus
pre-configure:
    @${ECHO_CMD} "Type \"make -DWITH_MSN\" if you want to enable MSN and Jabber/SSL support."
.endif

.if !defined(WITH_MSN6_FEATURES)
    @${ECHO_CMD} "Type \"make -DWITH_MSN6_FEATURES\" if you want to enable MSN 6 features, like buddy icons"
.else
    @${ECHO_CMD} "MSN 6 features will be enabled."
.endif

.if defined(WITH_FLOOD)
CONFIGURE_ARGS+=    --flood=1
.else
    @${ECHO_CMD} "Type \"make -DWITH_FLOOD\" if you want to enable flood protection."
.endif

.if ! defined(WITH_LDAP)
    @${ECHO_CMD} "Type \"make -DWITH_LDAP\" if you want to enable LDAP authentication."
.else
CONFIGURE_ARGS+=    --ldap=${LOCALBASE}
#   @${ECHO_CMD} "LDAP authentication will be enabled."
.endif

post-patch:
.if defined(WITH_MSN) && defined(WITH_MSN6_FEATURES)
    @${PATCH} ${PATCH_ARGS} -p1 < ${DISTDIR}/${DISTNAME}-msn6.akke.patch
.endif

.if defined(WITH_LDAP)
    @${PATCH} ${PATCH_ARGS} -p1 < ${DISTDIR}/${DISTNAME}-ldap.diff
.endif

post-build:
    @${CAT} pkg-message | ${SED} -e 's|%%PREFIX%%|${PREFIX}|' > ${PKGMESSAGE}

pre-install:
    @${MKDIR} -m 700 ${PREFIX}/etc/bitlbee

post-install:
    @${CP} ${WRKSRC}/bitlbee.conf ${PREFIX}/etc/bitlbee/bitlbee.conf.orig
    @${CP} ${WRKSRC}/motd.txt ${PREFIX}/etc/bitlbee/motd.txt.orig
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>