pkgsrc/comms/asterisk/Makefile
jnemeth f1928a0e2e Update to 1.2.37. This update is to fix two security issues.
1.2.36 fixed AST-2009-008, and 1.2.37 fixed AST-2009-010.  The
problem in AST-2009-008 is:

-----

It is possible to determine if a peer with a specific name is
configured in Asterisk by sending a specially crafted REGISTER
message twice. The username that is to be checked is put in the
user portion of the URI in the To header. A bogus non-matching
value is put into the username portion of the Digest in the
Authorization header. If the peer does exist the second REGISTER
will receive a response of "403 Authentication user name does not
match account name". If the peer does not exist the response will
be "404 Not Found" if alwaysauthreject is disabled and "401
Unauthorized" if alwaysauthreject is enabled.

-----

And, the problem in AST-2009-010 is:

-----

An attacker sending a valid RTP comfort noise payload containing
a data length of 24 bytes or greater can remotely crash Asterisk.

-----
2009-12-18 14:39:26 +00:00

109 lines
3.9 KiB
Makefile

# $NetBSD: Makefile,v 1.69 2009/12/18 14:39:26 jnemeth Exp $
DISTNAME= asterisk-1.2.37
CATEGORIES= comms net audio
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/releases/ \
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.asterisk.org/
COMMENT= The Asterisk Software PBX
LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
.include "../../mk/bsd.prefs.mk"
USE_TOOLS+= bash bison gmake perl:run
REPLACE_BASH= mkpkgconfig
REPLACE_PERL+= agi/agi-test.agi
INSTALL_TARGET= install samples
INSTALLATION_DIRS= lib/pkgconfig
BUILD_DEFS+= VARBASE
# Running as non-root will come later
#ASTERISK_USER?= asterisk
#ASTERISK_GROUP?= asterisk
#PKG_GROUPS= ${ASTERISK_GROUP}
#PKG_USERS= ${ASTERISK_USER}:${ASTERISK_GROUP}
#PKG_GROUPS_VARS+= ASTERISK_GROUP
#PKG_USERS_VARS+= ASTERISK_USER
# Various path settings for Asterisk
PKG_SYSCONFSUBDIR= asterisk
ASTLIBDIR?= ${PREFIX}/lib/asterisk
ASTVARLIBDIR?= ${PREFIX}/libdata/asterisk
ASTETCDIR?= ${PKG_SYSCONFDIR}
ASTSPOOLDIR?= ${VARBASE}/spool/asterisk
ASTLOGDIR?= ${VARBASE}/log/asterisk
ASTHEADERDIR?= ${PREFIX}/include/asterisk
ASTCONFPATH?= ${ASTETCDIR}/asterisk.conf
ASTBINDIR?= ${PREFIX}/bin
ASTSBINDIR?= ${PREFIX}/sbin
ASTVARRUNDIR?= ${VARBASE}/run
ASTMANDIR?= ${PREFIX}/${PKGMANDIR}
ASTEXAMPLEDIR?= ${PREFIX}/share/examples/asterisk
# Override default paths in Makefile
SUBST_CLASSES+= asterisk
SUBST_STAGE.asterisk= pre-configure
SUBST_FILES.asterisk= Makefile configs/musiconhold.conf.sample
SUBST_SED.asterisk+= -e 's|/var/lib/asterisk|${ASTVARLIBDIR}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTLIBDIR\)=.*|\1 = ${ASTLIBDIR}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTVARLIBDIR\)=.*|\1 = ${ASTVARLIBDIR}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTETCDIR\)=.*|\1 = ${ASTETCDIR}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTSPOOLDIR\)=.*|\1 = ${ASTSPOOLDIR}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTLOGDIR\)=.*|\1 = ${ASTLOGDIR}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTHEADERDIR\)=.*|\1 = ${ASTHEADERDIR}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTCONFPATH\)=.*|\1 = ${ASTCONFPATH:Q}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTBINDIR\)=.*|\1 = ${ASTBINDIR}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTSBINDIR\)=.*|\1 = ${ASTSBINDIR}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTVARRUNDIR\)=.*|\1 = ${ASTVARRUNDIR}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTMANDIR\)=.*|\1 = ${ASTMANDIR}|'
SUBST_SED.asterisk+= -e 's|^ *\(ASTEXAMPLEDIR\)=.*|\1 = ${ASTEXAMPLEDIR}|'
.include "options.mk"
RCD_SCRIPTS= asterisk
OWN_DIRS+= ${ASTSPOOLDIR} ${ASTLOGDIR} ${ASTVARRUNDIR}
OWN_DIRS+= ${ASTLOGDIR}/cdr-csv
# XXX: should be in ${VARBASE}
OWN_DIRS+= ${ASTVARLIBDIR}/sounds/priv-callerintros
CONF_FILES= # empty
.for f in asterisk.conf extensions.conf
CONF_FILES+= ${ASTEXAMPLEDIR}/${f:Q} ${ASTETCDIR}/${f:Q}
.endfor
MAKE_ENV+= VARBASE=${VARBASE}
MAKE_FLAGS+= INSTALL_PREFIX=${PREFIX}
# if we put all the files in $CONF_FILES, the message is _way_ too long.
.for f in adsi.conf adtranvofr.conf agents.conf alarmreceiver.conf \
alsa.conf cdr_manager.conf cdr_odbc.conf \
cdr_pgsql.conf cdr_tds.conf enum.conf extconfig.conf \
features.conf festival.conf iax.conf \
iaxprov.conf indications.conf logger.conf manager.conf \
meetme.conf mgcp.conf modem.conf modules.conf musiconhold.conf \
osp.conf oss.conf phone.conf privacy.conf queues.conf \
res_odbc.conf rpt.conf rtp.conf sip.conf \
skinny.conf voicemail.conf vpb.conf zapata.conf asterisk.adsi \
telcordia-1.adsi
CONF_FILES+= ${ASTEXAMPLEDIR}/${f:Q} ${ASTETCDIR}/${f:Q}
.endfor
PTHREAD_OPTS+= require native
.if (${OPSYS} == "Darwin" && exists(/usr/include/sys/poll.h))
post-patch:
${ECHO} "#include <sys/poll.h>" > ${WRKSRC}/include/asterisk/poll-compat.h
.endif
.include "../../devel/ncurses/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"