2013-02-27 15:53:22 +01:00
|
|
|
# Created by: Valery Komarov <komarov@valerka.net>
|
2011-05-22 14:38:03 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= yate
|
2013-07-31 12:43:47 +02:00
|
|
|
PORTVERSION= 4.3.0.p1 # XXX: please use DISTVERSION next time
|
2011-05-22 14:38:03 +02:00
|
|
|
CATEGORIES= net
|
2012-02-29 22:50:53 +01:00
|
|
|
MASTER_SITES= http://yate.null.ro/tarballs/yate4/
|
2013-07-31 12:43:47 +02:00
|
|
|
DISTNAME= ${PORTNAME}-4.3.0-1
|
2011-05-22 14:38:03 +02:00
|
|
|
|
|
|
|
MAINTAINER= komarov@valerka.net
|
|
|
|
COMMENT= Yet Another Telephony Engine
|
|
|
|
|
2013-07-31 12:43:47 +02:00
|
|
|
LIB_DEPENDS= libgsm.so:${PORTSDIR}/audio/gsm \
|
|
|
|
libspeex.so:${PORTSDIR}/audio/speex
|
2011-05-22 14:38:03 +02:00
|
|
|
|
|
|
|
ONLY_FOR_ARCHS= i386 amd64 sparc64
|
|
|
|
|
2012-01-24 13:03:17 +01:00
|
|
|
USE_AUTOTOOLS= autoconf
|
2013-07-31 12:43:47 +02:00
|
|
|
USES= bison gmake
|
2011-05-22 14:38:03 +02:00
|
|
|
USE_LDCONFIG= yes
|
|
|
|
WANT_GNOME= yes
|
|
|
|
|
|
|
|
CONFIGURE_ARGS= --without-fdsize \
|
2012-01-24 13:03:17 +01:00
|
|
|
--without-libqt4 \
|
2011-05-22 14:38:03 +02:00
|
|
|
--with-zlib=/usr
|
|
|
|
|
2011-09-24 00:26:39 +02:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
2011-05-22 14:38:03 +02:00
|
|
|
|
|
|
|
MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
|
|
|
|
PTHREAD_LIBS="${PTHREAD_LIBS}" \
|
|
|
|
PWLIBDIR=${LOCALBASE}/share/pwlib \
|
|
|
|
OPENH323DIR=${LOCALBASE}/share/openh323 \
|
2011-09-24 00:26:39 +02:00
|
|
|
OSVERSION=${OSVERSION}
|
2011-05-22 14:38:03 +02:00
|
|
|
|
|
|
|
MAN8= yate-config.8 yate.8
|
|
|
|
|
|
|
|
SUB_FILES= pkg-message
|
2012-08-06 01:19:36 +02:00
|
|
|
USE_RC_SUBR= yate
|
2013-07-31 12:43:47 +02:00
|
|
|
USERS= yate
|
|
|
|
GROUPS= yate
|
2011-05-22 14:38:03 +02:00
|
|
|
|
2013-07-31 12:43:47 +02:00
|
|
|
OPTIONS_DEFINE= MYSQL PGSQL SCTP AMR_NB ILBC SPANDSP DAHDI H323 SSL ALSA DOCS
|
|
|
|
OPTIONS_DEFAULT= SCTP
|
|
|
|
|
|
|
|
SCTP_DESC= Stream Control Transmission Protocol support
|
|
|
|
ILBC_DESC= iLBC narrowband speech codec support
|
|
|
|
SPANDSP_DESC= Spandsp faxing support
|
|
|
|
DAHDI_DESC= Dahdi driver
|
|
|
|
H323_DESC= H323 software channel/protocol support
|
2011-05-22 14:38:03 +02:00
|
|
|
|
2013-09-21 00:10:23 +02:00
|
|
|
NO_STAGE= yes
|
2011-05-22 14:38:03 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2013-02-27 15:53:22 +01:00
|
|
|
.if ${PORT_OPTIONS:MMYSQL}
|
2011-05-22 14:38:03 +02:00
|
|
|
CONFIGURE_ARGS+= --with-mysql
|
|
|
|
MAKE_ENV+= WITH_MYSQL=1
|
|
|
|
PLIST_SUB+= WITH_MYSQL=""
|
|
|
|
USE_MYSQL= yes
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-mysql
|
|
|
|
PLIST_SUB+= WITH_MYSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-02-27 15:53:22 +01:00
|
|
|
.if ${PORT_OPTIONS:MPGSQL}
|
2011-05-22 14:38:03 +02:00
|
|
|
CONFIGURE_ARGS+= --with-libpq=${LOCALBASE}
|
|
|
|
MAKE_ENV+= WITH_PGSQL=1
|
|
|
|
PLIST_SUB+= WITH_PGSQL=""
|
|
|
|
USE_PGSQL= yes
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-libpq
|
|
|
|
PLIST_SUB+= WITH_PGSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-02-27 15:53:22 +01:00
|
|
|
.if ${PORT_OPTIONS:MSCTP}
|
2012-01-24 13:03:17 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-sctp
|
|
|
|
MAKE_ENV+= WITH_SCTP=1
|
|
|
|
PLIST_SUB+= WITH_SCTP=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WITH_SCTP="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-02-27 15:53:22 +01:00
|
|
|
.if ${PORT_OPTIONS:MAMR_NB}
|
2013-07-31 12:43:47 +02:00
|
|
|
LIB_DEPENDS= libopencore-amrnb.so:${PORTSDIR}/audio/opencore-amr
|
2012-01-24 13:03:17 +01:00
|
|
|
CONFIGURE_ARGS+= --with-amrnb=${LOCALBASE}
|
|
|
|
PLIST_SUB+= WITH_AMR_NB=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-amrnb
|
|
|
|
PLIST_SUB+= WITH_AMR_NB="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-02-27 15:53:22 +01:00
|
|
|
.if ${PORT_OPTIONS:MILBC}
|
2013-07-31 12:43:47 +02:00
|
|
|
LIB_DEPENDS+= libilbc.so:${PORTSDIR}/net/ilbc
|
2012-01-24 13:03:17 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-ilbc
|
|
|
|
PLIST_SUB+= WITH_ILBC=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-ilbc
|
|
|
|
PLIST_SUB+= WITH_ILBC="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-02-27 15:53:22 +01:00
|
|
|
.if ${PORT_OPTIONS:MSPANDSP}
|
2011-05-22 14:38:03 +02:00
|
|
|
CONFIGURE_ARGS+= --with-spandsp=${LOCALBASE}/include
|
2013-07-31 12:43:47 +02:00
|
|
|
LIB_DEPENDS+= libspandsp.so:${PORTSDIR}/comms/spandsp-devel
|
2011-05-22 14:38:03 +02:00
|
|
|
MAKE_ENV+= WITH_SPANDSP=1
|
|
|
|
PLIST_SUB+= WITH_SPANDSP=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-spandsp
|
|
|
|
PLIST_SUB+= WITH_SPANDSP="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-02-27 15:53:22 +01:00
|
|
|
.if ${PORT_OPTIONS:MDAHDI}
|
2011-05-22 14:38:03 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-dahdi --enable-wpcard --enable-tdmcard
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/include/dahdi/user.h:${PORTSDIR}/misc/dahdi
|
|
|
|
MAKE_ENV+= WITH_DAHDI=1
|
|
|
|
PLIST_SUB+= WITH_DAHDI=""
|
|
|
|
.else
|
2012-01-24 13:03:17 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-dahdi
|
2011-05-22 14:38:03 +02:00
|
|
|
PLIST_SUB+= WITH_DAHDI="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-02-27 15:53:22 +01:00
|
|
|
.if ${PORT_OPTIONS:MH323}
|
2011-05-22 14:38:03 +02:00
|
|
|
CONFIGURE_ARGS+= --with-pwlib=${LOCALBASE} \
|
|
|
|
--with-openh323=${LOCALBASE}
|
2013-07-31 12:43:47 +02:00
|
|
|
LIB_DEPENDS+= libpt_r.so:${PORTSDIR}/devel/pwlib \
|
|
|
|
libh323_r.so:${PORTSDIR}/net/openh323
|
2011-05-22 14:38:03 +02:00
|
|
|
MAKE_ENV+= WITH_H323=1
|
|
|
|
PLIST_SUB+= WITH_H323=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-openh323
|
|
|
|
PLIST_SUB+= WITH_H323="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-02-27 15:53:22 +01:00
|
|
|
.if ${PORT_OPTIONS:MSSL}
|
2012-01-24 13:03:17 +01:00
|
|
|
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
|
|
|
|
CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE}
|
2011-05-22 14:38:03 +02:00
|
|
|
MAKE_ENV+= WITH_SSL=1
|
|
|
|
PLIST_SUB+= WITH_SSL=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-openssl
|
|
|
|
PLIST_SUB+= WITH_SSL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-02-27 15:53:22 +01:00
|
|
|
.if ${PORT_OPTIONS:MALSA}
|
2013-07-31 12:43:47 +02:00
|
|
|
LIB_DEPENDS+= libasound.so:${PORTSDIR}/audio/alsa-lib
|
2011-05-22 14:38:03 +02:00
|
|
|
MAKE_ENV+= WITH_ALSA=1
|
|
|
|
PLIST_SUB+= WITH_ALSA=""
|
|
|
|
.else
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-noalsa
|
|
|
|
PLIST_SUB+= WITH_ALSA="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-10 01:09:00 +01:00
|
|
|
.if ! ${PORT_OPTIONS:MDOCS}
|
2011-05-22 14:38:03 +02:00
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-noportdocs
|
|
|
|
.endif
|
|
|
|
|
2012-08-21 23:00:33 +02:00
|
|
|
post-extract:
|
|
|
|
@${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
|
|
|
|
|
2011-05-22 14:38:03 +02:00
|
|
|
post-install:
|
|
|
|
@cd ${PREFIX}/etc/${PORTNAME}; \
|
|
|
|
for cfg in *.sample; do \
|
|
|
|
test -f $${cfg%%.sample} || ${CP} -p $${cfg} $${cfg%%.sample}; \
|
|
|
|
done
|
2013-07-31 12:43:47 +02:00
|
|
|
@${ECHO_MSG}
|
2011-05-22 14:38:03 +02:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2013-07-31 12:43:47 +02:00
|
|
|
@${ECHO_MSG}
|
2011-05-22 14:38:03 +02:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|