blob: 480a2e4d475bcb8c06a280267e9f726d509c1704 (
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
# New ports collection makefile for: callweaver
# Date created: 28 June 2009
# Whom: Alexander V. Chernikov <melifaro@ipfw.ru>
# $FreeBSD$
#
PORTNAME= callweaver
PORTVERSION= 1.2.1
PORTREVISION= 7
CATEGORIES= net
MASTER_SITES= http://devs.callweaver.org/release/
EXTRACT_SUFX= .tgz
MAINTAINER= melifaro@ipfw.ru
COMMENT= Open source IP PBX
LIB_DEPENDS= spandsp.2:${PORTSDIR}/comms/spandsp-devel \
popt.0:${PORTSDIR}/devel/popt
USE_GMAKE= yes
GNU_CONFIGURE= yes
USE_OPENSSL= yes
USE_LDCONFIG= yes
CONFIGURE_ARGS= --with-pic
USE_RC_SUBR= callweaver
CWUSER= callweaver
CWGROUP= callweaver
USERS= ${CWUSER}
GROUPS= ${CWGROUP}
PLIST_SUB+= CWUSER=${CWUSER} CWGROUP=${CWGROUP}
MAN8= callweaver.8 safe_callweaver.8
OPTIONS= SIPTCP "Enable SIP TCP/TLS support" on \
POSTGRES "Enable PostgreSQL support" off \
MYSQL "Enable MySQL support" off \
EXTUDP "Enable extented UDP support for multi-homed" off \
ZAPTEL "Enable Zapata Telefony" off \
FAX "Enable audio/T.38 app_fax/chan_fax/FaxGateway/etc" on \
SPEEX "Build speex codec" on \
VORBIS "Enable VORBIS/Vorbis format support" on \
MEETME "Build app_meetme (requires ZAPTEL)" off \
LDAP "Build app_ldap application" off \
SNMP "Enable SNMP support (broken)" off \
DEBUG "Enable debug support" off
.include <bsd.port.pre.mk>
.if !defined(NOPORTDOCS)
CONFIGURE_ARGS+= --with-readme --with-license --with-credits
.else
CONFIGURE_ARGS+= --without-readme --without-license --without-credits
.endif
.if defined(WITH_SIPTCP)
CONFIGURE_ARGS+= --enable-sip-tcp-support
PLIST_SUB+= TLS=""
.else
CONFIGURE_ARGS+= --disable-sip-tcp-support
PLIST_SUB+= TLS="@comment "
.endif
.if defined(WITH_POSTGRES)
USE_PGSQL= yes
PG_INC= `${LOCALBASE}/bin/pg_config --includedir`
PG_LIB= `${LOCALBASE}/bin/pg_config --libdir`
CONFIGURE_ARGS+= --enable-postgresql --with-cdr_pgsql --with-pgsql-inc="${PG_INC}" --with-pgsql-inc="${PG_LIB}"
PLIST_SUB+= PGSQL=""
.else
PLIST_SUB+= PGSQL="@comment "
.endif
.if defined(WITH_MYSQL)
CONFIGURE_ARGS+= --enable-mysql --with-cdr_mysql
USE_MYSQL= yes
PLIST_SUB+= MYSQL=""
.else
PLIST_SUB+= MYSQL="@comment "
.endif
.if defined(WITH_EXTUDP)
CONFIGURE_ARGS+= --enable-udpfromto
.endif
.if defined(WITH_MEETME)
WITH_ZAPTEL=yes
CONFIGURE_ARGS+= --with-app_meetme
PLIST_SUB+= MEETME=""
.else
CONFIGURE_ARGS+= --without-app_meetme
PLIST_SUB+= MEETME="@comment "
.endif
.if defined(WITH_ZAPTEL)
CONFIGURE_ARGS+= --enable-zaptel --with-chan_zap
BUILD_DEPENDS+= libpri>=1.2.0:${PORTSDIR}/misc/libpri \
${LOCALBASE}/include/zaptel/zaptel.h:${PORTSDIR}/misc/zaptel
LIB_DEPENDS+= pri.1:${PORTSDIR}/misc/libpri
RUN_DEPENDS+= ${LOCALBASE}/include/zaptel/zaptel.h:${PORTSDIR}/misc/zaptel
PLIST_SUB+= ZAPTEL=""
.else
CONFIGURE_ARGS+= --disable-zaptel --without-chan_zap
PLIST_SUB+= ZAPTEL="@comment "
.endif
.if defined(WITH_FAX)
FAXDEV_PATH= /var/run/fax
CONFIGURE_ARGS+= --with-app_t38gateway --with-app_txfax --with-app_rxfax --with-chan_fax --with-app_faxdetect --with-tiff-includes="${LOCALBASE}/include/" --with-tiff-libs="${LOCALBASE}/lib"
LIB_DEPENDS+= tiff:${PORTSDIR}/graphics/tiff
PLIST_SUB+= FAX=""
.else
CONFIGURE_ARGS+= --without-app_t38gateway --without-app_txfax --without-app_rxfax --without-chan_fax --without-app_faxdetect
PLIST_SUB+= FAX="@comment "
.endif
#.if defined(WITH_ODBC)
#CONFIGURE_ARGS+= --enable-odbc
#LIB_DEPENDS+= odbc.2:${PORTSDIR}/databases/unixODBC
#.else
#CONFIGURE_ARGS+= --disable-odbc
#.endif
.if defined(WITH_SPEEX)
CONFIGURE_ARGS+= --with-codec_speex
LIB_DEPENDS+= speex.1:${PORTSDIR}/audio/speex
PLIST_SUB+= SPEEX=""
.else
CONFIGURE_ARGS+= --without-codec_speex
PLIST_SUB+= SPEEX="@comment "
.endif
.if defined(WITH_VORBIS)
CONFIGURE_ARGS+= --with-format_oggvorbis
LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis
PLIST_SUB+= VORBIS=""
.else
CONFIGURE_ARGS+= --without-format_oggvorbis
PLIST_SUB+= VORBIS="@comment "
.endif
.if defined(WITH_LDAP)
USE_OPENLDAP= yes
CONFIGURE_ARGS+= --enable-openldap --with-ldap-dir="${LOCALBASE}"
PLIST_SUB+= LDAP=""
.else
CONFIGURE_ARGS+= --disable-openldap
PLIST_SUB+= LDAP="@comment "
.endif
.if defined(WITH_SNMP)
LIB_DEPENDS+= netsnmp.30:${PORTSDIR}/net-mgmt/net-snmp
CONFIGURE_ARGS+= --with-res_snmp
PLIST_SUB+= SNMP=""
.else
CONFIGURE_ARGS+= --without-res_snmp
PLIST_SUB+= SNMP="@comment "
.endif
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+= --disable-optimization --enable-debug
.endif
post-install:
.if defined(WITH_FAX)
@${MKDIR} ${FAXDEV_PATH}
@${CHOWN} ${CWUSER}:${CWGROUP} ${FAXDEV_PATH}
@${REINPLACE_CMD} -i "" -e 's?/dev/fax/?${FAXDEV_PATH}?' ${PREFIX}/etc/${PORTNAME}/chan_fax.conf*
.endif
.include <bsd.port.post.mk>
|