pkgsrc/comms/asterisk/Makefile
jnemeth 02c7ae5c00 Update to Asterisk 11.11.0: this is primarily a bugfix release.
pkgsrc change: MAKE_JOBS_SAFE=NO from joerg@

The Asterisk Development Team has announced the release of Asterisk 11.11.0.

The release of Asterisk 11.11.0 resolves several issues reported by the
community and would have not been possible without your participation.
Thank you!

The following are the issues resolved in this release:

Bugs fixed in this release:
-----------------------------------
 * ASTERISK-22551 - Session timer : UAS (Asterisk) starts counting
      at Invite, UAC starts counting at 200 OK. (Reported by i2045)
 * ASTERISK-23792 - Mutex left locked in chan_unistim.c (Reported
      by Peter Whisker)
 * ASTERISK-23582 - [patch]Inconsistent column length in *odbc
      (Reported by Walter Doekes)
 * ASTERISK-23803 - AMI action UpdateConfig EmptyCat clears all
      categories but the requested one (Reported by zvision)
 * ASTERISK-23035 - ConfBridge with name longer than max (32 chars)
      results in several bridges with same conf_name (Reported by
      Iñaki Cívico)
 * ASTERISK-23824 - ConfBridge: Users cannot be muted via CLI or
      AMI when waiting to enter a conference (Reported by Matt Jordan)
 * ASTERISK-23683 - #includes - wildcard character in a path more
      than one directory deep - results in no config parsing on module
      reload (Reported by tootai)
 * ASTERISK-23827 - autoservice thread doesn't exit at shutdown
      (Reported by Corey Farrell)
 * ASTERISK-23609 - Security: AMI action MixMonitor allows
      arbitrary programs to be run (Reported by Corey Farrell)
 * ASTERISK-23673 - Security: DOS by consuming the number of
      allowed HTTP connections. (Reported by Richard Mudgett)
 * ASTERISK-23246 - DEBUG messages in sdp_crypto.c display despite
      a DEBUG level of zero (Reported by Rusty Newton)
 * ASTERISK-23766 - [patch] Specify timeout for database write in
      SQLite (Reported by Igor Goncharovsky)
 * ASTERISK-23844 - Load of pbx_lua fails on sample extensions.lua
      with Lua 5.2 or greater due to addition of goto statement
      (Reported by Rusty Newton)
 * ASTERISK-23818 - PBX_Lua: after asterisk startup module is
      loaded, but dialplan not available (Reported by Dennis Guse)
 * ASTERISK-23834 - res_rtp_asterisk debug message gives wrong
      length if ICE (Reported by Richard Kenner)
 * ASTERISK-23790 - [patch] - SIP From headers longer than 256
      characters result in dropped call and 'No closing bracket'
      warnings. (Reported by uniken1)
 * ASTERISK-23917 - res_http_websocket: Delay in client processing
      large streams of data causes disconnect and stuck socket
      (Reported by Matt Jordan)
 * ASTERISK-23908 - [patch]When using FEC error correction,
      asterisk tries considers negative sequence numbers as missing
      (Reported by Torrey Searle)
 * ASTERISK-23921 - refcounter.py uses excessive ram for large refs
      files  (Reported by Corey Farrell)
 * ASTERISK-23948 - REF_DEBUG fails to record ao2_ref against
      objects that were already freed (Reported by Corey Farrell)
 * ASTERISK-23916 - [patch]SIP/SDP fmtp line may include whitespace
      between attributes (Reported by Alexander Traud)
 * ASTERISK-23984 - Infinite loop possible in ast_careful_fwrite()
      (Reported by Steve Davies)
 * ASTERISK-23897 - [patch]Change in SETUP ACK handling (checking
      PI) in revision 413765 breaks working environments (Reported by
      Pavel Troller)

Improvements made in this release:
-----------------------------------
 * ASTERISK-23492 - Add option to safe_asterisk to disable
      backgrounding (Reported by Walter Doekes)
 * ASTERISK-22961 - [patch] DTLS-SRTP not working with SHA-256
      (Reported by Jay Jideliov)

For a full list of changes in this release, please see the ChangeLog:

http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-11.11.0

Thank you for your continued support of Asterisk!
2014-07-29 04:20:55 +00:00

250 lines
12 KiB
Makefile

# $NetBSD: Makefile,v 1.109 2014/07/29 04:20:55 jnemeth Exp $
#
# NOTE: when updating this package, there are two places that sound
# tarballs need to be checked
DISTNAME= asterisk-11.11.0
DIST_SUBDIR= ${PKGNAME_NOREV}
DISTFILES= ${DEFAULT_DISTFILES}
EXTRACT_ONLY= ${DISTNAME}.tar.gz
CATEGORIES= comms net audio
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \
http://downloads.asterisk.org/pub/telephony/sounds/releases/
OWNER= jnemeth@NetBSD.org
HOMEPAGE= http://www.asterisk.org/
COMMENT= The Asterisk Software PBX
LICENSE= gnu-gpl-v2
MAKE_JOBS_SAFE= NO
# known to have issues on i386, block the package until the bug is fixed
NOT_FOR_PLATFORM= NetBSD-*-i386
CONFLICTS+= asterisk-sounds-extra-[0-9]*
.include "../../mk/bsd.prefs.mk"
USE_TOOLS+= bison gmake perl:run pkg-config tar
USE_LANGUAGES= c c++
REPLACE_PERL+= agi/DialAnMp3.agi agi/agi-test.agi
REPLACE_PERL+= agi/fastagi-test agi/jukebox.agi agi/numeralize
REPLACE_PERL+= contrib/scripts/vmail.cgi
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --datarootdir=${PREFIX}/libdata
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --without-gtk2
# XXX remove when lang/lua gets builtin.mk
CONFIGURE_ARGS+= --without-lua
#JMN doesn't build properly on NetBSD, remove when -current is fixed
CONFIGURE_ARGS+= --without-srtp
INSTALL_TARGET= install samples
INSTALLATION_DIRS+= lib/pkgconfig share/doc/${PKGBASE}
INSTALLATION_DIRS+= share/examples/asterisk share/examples/rc.d
INSTALLATION_DIRS+= ${ASTDATADIR}/sounds/en ${ASTDATADIR}/moh
BUILD_DEFS+= VARBASE
ASTERISK_USER?= asterisk
ASTERISK_GROUP?= asterisk
PKG_GROUPS= ${ASTERISK_GROUP}
PKG_USERS= ${ASTERISK_USER}:${ASTERISK_GROUP}
PKG_GECOS.${ASTERISK_USER}= Asterisk PBX
PKG_GROUPS_VARS= ASTERISK_GROUP
PKG_USERS_VARS= ASTERISK_USER
FILES_SUBST+= ASTERISK_USER=${ASTERISK_USER}
FILES_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
MESSAGE_SUBST+= ASTERISK_USER=${ASTERISK_USER}
MESSAGE_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
# Various path settings for Asterisk
PKG_SYSCONFSUBDIR= asterisk
PKG_SYSCONFDIR_PERMS= ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
ASTETCDIR= ${PKG_SYSCONFDIR}
ASTEXAMPLEDIR= ${PREFIX}/share/examples/asterisk
ASTDBDIR= ${VARBASE}/db/asterisk
ASTSPOOLDIR= ${VARBASE}/spool/asterisk
ASTLOGDIR= ${VARBASE}/log/asterisk
MESSAGE_SUBST+= ASTDBDIR=${ASTDBDIR}
MESSAGE_SUBST+= ASTSPOOLDIR=${ASTSPOOLDIR}
MESSAGE_SUBST+= ASTLOGDIR=${ASTLOGDIR}
ASTVARRUNDIR= ${VARBASE}/run/asterisk
FILES_SUBST+= ASTVARRUNDIR=${ASTVARRUNDIR}
ASTDATADIR= ${PREFIX}/libdata/asterisk
MAKE_FLAGS+= ASTLIBDIR=${PREFIX}/lib/asterisk
MAKE_FLAGS+= ASTVARLIBDIR=${ASTDATADIR}
MAKE_FLAGS+= ASTKEYDIR=${ASTDATADIR}
MAKE_FLAGS+= ASTDATADIR=${ASTDATADIR}
MAKE_FLAGS+= ASTSPOOLDIR=${ASTSPOOLDIR}
MAKE_FLAGS+= ASTLOGDIR=${ASTLOGDIR}
MAKE_FLAGS+= ASTHEADERDIR=${PREFIX}/include/asterisk
MAKE_FLAGS+= ASTCONFPATH=${ASTETCDIR}/asterisk.conf
MAKE_FLAGS+= ASTBINDIR=${PREFIX}/bin
MAKE_FLAGS+= ASTSBINDIR=${PREFIX}/sbin
MAKE_FLAGS+= ASTVARRUNDIR=${ASTVARRUNDIR}
MAKE_FLAGS+= ASTMANDIR=${PREFIX}/${PKGMANDIR}
MAKE_FLAGS+= ASTETCDIR=${ASTETCDIR}
MAKE_FLAGS+= ASTDBDIR=${ASTDBDIR}
MAKE_FLAGS+= AGI_DIR=${PREFIX}/libexec/agi-bin
MAKE_FLAGS+= ASTEXAMPLEDIR=${ASTEXAMPLEDIR}
MAKE_FLAGS+= WRKSRC=${WRKSRC}
MAKE_FLAGS+= LDOPTS=${LDFLAGS:M*:Q}
MAKE_FLAGS+= HTTP_DOCSDIR=${PREFIX}/share/httpd/htdocs
MAKE_FLAGS+= HTTP_CGIDIR=${PREFIX}/libexec/cgi-bin
MAKE_FLAGS+= OPTIMIZE=-O3
.if !empty(MACHINE_PLATFORM:MSunOS-*-i386)
BUILDLINK_TRANSFORM+= rm:-march=i386
.endif
PLIST_VARS+= kqueue
.if exists(/usr/include/sys/event.h)
PLIST.kqueue= yes
.endif
PLIST_VARS+= mgcp
# NOSIGPIPE is a temp variable, since PLIST.mgcp MUST remain undefined
# if the grep fails
NOSIGPIPE!= ${GREP} SO_NOSIGPIPE /usr/include/sys/socket.h || echo ""
.if ${NOSIGPIPE} != ""
PLIST.mgcp= yes
.endif
.include "options.mk"
# check sounds/Makefile for current version when upgrading package
DISTFILES+= asterisk-extra-sounds-en-gsm-1.4.14.tar.gz
# Override default paths in config files
SUBST_CLASSES+= configs
SUBST_STAGE.configs= pre-configure
SUBST_FILES.configs= configs/cli_aliases.conf.sample
SUBST_FILES.configs+= configs/festival.conf.sample
SUBST_FILES.configs+= configs/http.conf.sample
SUBST_FILES.configs+= configs/iax.conf.sample
SUBST_FILES.configs+= configs/musiconhold.conf.sample
SUBST_FILES.configs+= configs/osp.conf.sample
SUBST_FILES.configs+= configs/phoneprov.conf.sample
SUBST_FILES.configs+= configs/res_config_sqlite.conf.sample
SUBST_FILES.configs+= configs/sla.conf.sample
SUBST_SED.configs+= -e 's|doc/|${PREFIX}/share/doc/${PKGBASE}/|'
SUBST_SED.configs+= -e 's|/etc/asterisk|${ASTETCDIR}|'
SUBST_SED.configs+= -e 's|/var/lib/asterisk|${ASTVARLIBDIR}|'
SUBST_SED.configs+= -e "s|/usr/local/man|${ASTMANDIR}|"
SUBST_SED.configs+= -e "s|/usr/local|${PREFIX}|"
SUBST_SED.configs+= -e "s|/var|${VARBASE}|"
.if (${OPSYS} == "NetBSD")
# XXX gross hack, remove when atomics properly implemented
SUBST_CLASSES+= atomics
SUBST_STAGE.atomics= post-configure
SUBST_FILES.atomics= include/asterisk/autoconfig.h
SUBST_SED.atomics= -e "s|^\#define HAVE_GCC_ATOMICS 1|\#undef HAVE_GCC_ATOMICS|"
# XXX gross hack, IP_PKTINFO in NetBSD isn't compatible with anything else
SUBST_CLASSES+= pktinfo
SUBST_STAGE.pktinfo= post-configure
SUBST_FILES.pktinfo= include/asterisk/autoconfig.h
SUBST_SED.pktinfo= -e "s|^\#define HAVE_PKTINFO 1|\#undef HAVE_PKTINFO|"
.endif
RCD_SCRIPTS= asterisk
OWN_DIRS_PERMS+= ${ASTDBDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/dictate ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/meetme ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/monitor ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/outgoing ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/system ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/tmp ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234 ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/INBOX ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
SPECIAL_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en/busy.gsm ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
SPECIAL_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en/unavail.gsm ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/INBOX ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/en ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTLOGDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTLOGDIR}/cdr-csv ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTLOGDIR}/cdr-custom ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
CONF_FILES_PERMS= # empty
.for f in asterisk.conf extensions.conf
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
.endfor
# if we put all the files in $CONF_FILES, the message is _way_ too long.
.for f in acl.conf adsi.conf agents.conf alarmreceiver.conf alsa.conf \
amd.conf app_mysql.conf asterisk.adsi calendar.conf ccss.conf \
cdr.conf cdr_adaptive_odbc.conf cdr_custom.conf \
cdr_manager.conf cdr_mysql.conf cdr_odbc.conf cdr_pgsql.conf \
cdr_sqlite3_custom.conf cdr_syslog.conf cdr_tds.conf cel.conf \
cel_custom.conf cel_odbc.conf cel_pgsql.conf \
cel_sqlite3_custom.conf cel_tds.conf chan_dahdi.conf \
chan_mobile.conf cli.conf cli_aliases.conf cli_permissions.conf \
codecs.conf confbridge.conf console.conf dbsep.conf dnsmgr.conf \
dsp.conf dundi.conf enum.conf extconfig.conf extensions.ael \
extensions.conf extensions.lua extensions_minivm.conf \
features.conf festival.conf followme.conf func_odbc.conf \
gtalk.conf h323.conf http.conf iax.conf iaxprov.conf \
indications.conf jabber.conf jingle.conf logger.conf \
manager.conf meetme.conf mgcp.conf minivm.conf misdn.conf \
modules.conf motif.conf musiconhold.conf muted.conf ooh323.conf \
osp.conf oss.conf phone.conf phoneprov.conf queuerules.conf \
queues.conf res_config_mysql.conf res_config_sqlite.conf \
res_config_sqlite3.conf res_corosync.conf res_curl.conf \
res_fax.conf res_ldap.conf res_odbc.conf res_pgsql.conf \
res_pktccops.conf res_snmp.conf res_stun_monitor.conf rtp.conf \
say.conf sip.conf sip_notify.conf skinny.conf sla.conf \
smdi.conf telcordia-1.adsi udptl.conf unistim.conf users.conf \
voicemail.conf vpb.conf xmpp.conf
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
.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
post-install:
# check sounds directory for current versions when upgrading package
${TAR} xzf ${WRKSRC}/sounds/asterisk-core-sounds-en-gsm-1.4.25.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${TAR} xzf ${WRKSRC}/sounds/asterisk-moh-opsound-wav-2.03.tar.gz -C ${DESTDIR}${ASTDATADIR}/moh
${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/asterisk-extra-sounds-en-gsm-1.4.14.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${INSTALL_DATA} ${WRKSRC}/BUGS ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/CHANGES ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/COPYING ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/CREDITS ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/LICENSE ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/README-SERIOUSLY.bestpractices.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.2.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.4.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.6.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.8.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-10.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/Zaptel-to-DAHDI.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/Asterisk-Admin-Guide.pdf ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/IAX2-security.pdf ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/IAX2-security.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/README.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/api-1.6.2-changes.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
cp -r ${WRKSRC}/doc/Asterisk-Admin-Guide ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}/Asterisk-Admin-Guide
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../devel/libuuid/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"