pkgsrc/comms/asterisk18/Makefile
jnemeth 12dcabb06c Update to 1.8.7.0 (mainly bug fixes).
pkgsrc changes:
- adjust for ilbc changes after it was acquired by Google
- install AST.pdf IAX2-security.pdf into share/doc/asterisk

1.8.7.0:
========

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

Please note that a significant numbers of changes and fixes have
gone into features.c in this release (call parking, built-in
transfers, call pickup, etc.).

NOTE:

Recently, we were notified that the mechanism included in our
Asterisk source code releases to download and build support for
the iLBC codec had stopped working correctly; a little investigation
revealed that this occurred because of some changes on the
ilbcfreeware.org website. These changes occurred as a result of
Google's acquisition of GIPS, who produced (and provided licenses
for) the iLBC codec.

If you are a user of Asterisk and iLBC together, and you've already
executed a license agreement with GIPS, we believe you can continue
using iLBC with Asterisk. If you are a user of Asterisk and iLBC
together, but you had not executed a license agreement with GIPS,
we encourage you to research the situation and consult with your
own legal representatives to determine what actions you may want
to take (or avoid taking).

More information is available on the Asterisk blog:

http://blogs.asterisk.org/2011/09/19/ilbc-support-in-asterisk-after-googles-acquisition-of-gips/

The following is a sample of the issues resolved in this release:

* Added the 'storesipcause' option to sip.conf to allow the user to
   disable the setting of HASH(SIP_CAUSE,) on the channel. Having
   chan_sip set HASH(SIP_CAUSE,) on the channel carries a significant
   performance penalty because of the usage of the MASTER_CHANNEL()
   dialplan function.

   We've decided to disable this feature by default in future 1.8
   versions. This would be an unexpected behavior change for anyone
   depending on that SIP_CAUSE update in their dialplan. Please
   refer to the asterisk-dev mailing list more information:

   http://lists.digium.com/pipermail/asterisk-dev/2011-August/050626.html

* Significant fixes and improvements to parking lots.
   (Closes issues ASTERISK-17183, ASTERISK-17870, ASTERISK-17430,
   ASTERISK-17452, ASTERISK-17452, ASTERISK-15792.)

* Numerous issues have been reported for deadlocks that are caused
   by a blocking read in res_timing_timerfd on a file descriptor
   that will never be written to.

   A change to Asterisk adds some checks to make sure that the
   timerfd is both valid and armed before calling read(). Should
   fix: ASTERISK-18142, ASTERISK-18197, ASTERISK-18166 and possibly
   others.  (In essence, this change should make res_timing_timerfd
   usable.)

* Resolve segfault when publishing device states via XMPP and not connected.
   (Closes issue ASTERISK-18078.)

* Refresh peer address if DNS unavailable at peer creation.
   (Closes issue ASTERISK-18000)

* Fix the missing DAHDI channels when using the newer chan_dahdi.conf
   sections for channel configuration.
   (Closes issue ASTERISK-18496.)

* Remove unnecessary libpri dependency checks in the configure script.
   (Closes issue ASTERISK-18535.)

* Update get_ilbc_source.sh script to work again.
   (Closes issue ASTERISK-18412)

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

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

Thank you for your continued support of Asterisk!


1.8.6.0:
========

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

The following is a sample of the issues resolved in this release:

* Fix an issue with Music on Hold classes losing files in playlist
   when realtime is used.  (Closes issue ASTERISK-17875.)

* Resolve a potential crash in chan_sip when utilizing auth= and
   performing a 'sip reload' from the console.  (Closes issue
   ASTERISK-17939.)

* Address some improper sql statements in res_odbc that would cause
   an update to fail on realtime peers due to trying to set as
   "(NULL)" rather than an actual NULL.  (Closes issue ASTERISK-17791.)

* Resolve issue where 403 Forbidden would always be sent maximum
   number of times regardless to receipt of ACK.

* Resolve issue where if a call to MeetMe includes both the dynamic(D)
   and always request PIN(P) options, MeetMe will ask for the PIN
   two times:  once for creating the conference and once for entering
   the conference.

* Fix New Zealand indications profile based on
   http://www.telepermit.co.nz/TNA102.pdf
   (Closes issue ASTERISK-16263.)

* Segfault in shell_helper in func_shell.c
   (Closes issue ASTERISK-18109.)

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

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

Thank you for your continued support of Asterisk!
2011-10-11 03:12:55 +00:00

212 lines
10 KiB
Makefile

# $NetBSD: Makefile,v 1.13 2011/10/11 03:12:55 jnemeth Exp $
#
# NOTE: when updating this package, there are two places that sound
# tarballs need to be checked
DISTNAME= asterisk-1.8.7.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
CONFLICTS+= asterisk-sounds-extra-[0-9]*
PKG_DESTDIR_SUPPORT= user-destdir
.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
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
.include "options.mk"
# check sounds/Makefile for current version when upgrading package
DISTFILES+= asterisk-extra-sounds-en-gsm-1.4.11.tar.gz
# Override default paths in config files
SUBST_CLASSES+= configs
SUBST_STAGE.configs= pre-configure
SUBST_FILES.configs= configs/festival.conf.sample
SUBST_FILES.configs+= configs/http.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_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}|"
# XXX gross hack, remove when atomics properly implemented
.if (${OPSYS} == "NetBSD")
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|"
.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 adsi.conf agents.conf ais.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_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 chan_ooh323.conf \
cli.conf cli_aliases.conf cli_permissions.conf codecs.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 musiconhold.conf muted.conf \
osp.conf oss.conf phone.conf phoneprov.conf queuerules.conf \
queues.conf res_config_mysql.conf res_config_sqlite.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 rpt.conf rtp.conf say.conf sip.conf \
sip_notify.conf skinny.conf sla.conf smdi.conf telcordia-1.adsi \
udptl.conf unistim.conf usbradio.conf users.conf voicemail.conf \
vpb.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.21.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.11.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.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/Zaptel-to-DAHDI.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/AST.pdf ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/AST.txt ${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}
.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"