diff options
author | Rambaldi <rambaldi@xs4all.nl> | 2008-03-21 12:42:04 +0000 |
---|---|---|
committer | Rambaldi <rambaldi@xs4all.nl> | 2008-03-21 12:42:04 +0000 |
commit | bd1863073ea41e20c467de732941f7048663f627 (patch) | |
tree | 6d3b21a7677e771d7f5cc64874fa958eb18328e8 /net-misc/asterisk-addons | |
parent | wengophone: fix qt-4.3 patch (diff) | |
download | voip-bd1863073ea41e20c467de732941f7048663f627.tar.gz voip-bd1863073ea41e20c467de732941f7048663f627.tar.bz2 voip-bd1863073ea41e20c467de732941f7048663f627.zip |
Initial versions
svn path=/trunk/; revision=668
Diffstat (limited to 'net-misc/asterisk-addons')
-rw-r--r-- | net-misc/asterisk-addons/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/asterisk-addons/Manifest | 6 | ||||
-rw-r--r-- | net-misc/asterisk-addons/asterisk-addons-1.4.6.ebuild | 208 | ||||
-rw-r--r-- | net-misc/asterisk-addons/asterisk-addons-1.6.0_beta2.ebuild | 219 | ||||
-rw-r--r-- | net-misc/asterisk-addons/files/install-1.6.0.patch | 12 | ||||
-rw-r--r-- | net-misc/asterisk-addons/files/install.patch | 12 |
6 files changed, 466 insertions, 0 deletions
diff --git a/net-misc/asterisk-addons/ChangeLog b/net-misc/asterisk-addons/ChangeLog new file mode 100644 index 0000000..d6458bd --- /dev/null +++ b/net-misc/asterisk-addons/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for net-misc/asterisk-addons +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 21 Mar 2008; Rambaldi <rambaldi@xs4all.nl> +files/install-1.6.0.patch, + +files/install.patch, +asterisk-addons-1.4.6.ebuild, + +asterisk-addons-1.6.0_beta2.ebuild: + initial ebuilds + diff --git a/net-misc/asterisk-addons/Manifest b/net-misc/asterisk-addons/Manifest new file mode 100644 index 0000000..38e36ff --- /dev/null +++ b/net-misc/asterisk-addons/Manifest @@ -0,0 +1,6 @@ +AUX install-1.6.0.patch 383 RMD160 45d92826ea261a97289f455f33ad2b32cabcb691 SHA1 e4e6c13f55542fef9d4cbe2f8c2ab3400fe67af9 SHA256 36b732ad59e04c69ba854dfe6a5a302eb1a0538ff8e1eb5d1be4ea8796921e8b +AUX install.patch 341 RMD160 2a8a543c9075ac8ef36898e9394a6993d7d23d1f SHA1 97e90105d7288d3d076e9879044e31b3891484e9 SHA256 4c7b45deb0ae2dbc588b1cfc850a7d3c8ee3b186182ec4e7b95876a74f57ade0 +DIST asterisk-addons-1.4.6.tar.gz 798869 RMD160 0bef2703aa989389123bbb86381c1533edac9ebb SHA1 0d8176b1aab5dba70e97e706e0a6d35037689a39 SHA256 af7c0258837a9f211ecbb58c47cd1a793e943577f37e8e47155e8d07b0c93a73 +DIST asterisk-addons-1.6.0-beta2.tar.gz 832303 RMD160 14299eef8c414731c0aad9a911c24bb39097b9e9 SHA1 5ed35e39fe5910490507d4aab88b0b804dc9450d SHA256 1af141e3d74b802e37bee75ef93f873b424363a287b6ca3d3f9e2e41dc2e88cf +EBUILD asterisk-addons-1.4.6.ebuild 4949 RMD160 2e125820c9a86a92b0d0f609423f92773d956ee4 SHA1 84e0a0a0d4a2a43404ff9275d236ca88cef389c6 SHA256 4b5cdbca3b12dd30a13ddd99584eea6f4efac2d7cec06f50b991875ff23214ee +EBUILD asterisk-addons-1.6.0_beta2.ebuild 5193 RMD160 8ee8402ca7c0b3e06297cd4572667452ff89d893 SHA1 6eabc569b7ff97e273b4d35db1b0e96eb213e5d8 SHA256 3c9793e0dc42eff35788361da2e9c0872463d79b989e3dd75e3ae300869b176b diff --git a/net-misc/asterisk-addons/asterisk-addons-1.4.6.ebuild b/net-misc/asterisk-addons/asterisk-addons-1.4.6.ebuild new file mode 100644 index 0000000..7bc848b --- /dev/null +++ b/net-misc/asterisk-addons/asterisk-addons-1.4.6.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-addons/asterisk-addons-1.2.5.ebuild,v 1.1 2007/01/17 18:55:23 gustavoz Exp $ + +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" + +inherit eutils flag-o-matic autotools + +IUSE="elibc_uclibc mysql h323 mp3 debug" + +MY_P="${P/_/-}" + +DESCRIPTION="Additional Plugins for Asterisk" +HOMEPAGE="http://www.asterisk.org/" +SRC_URI="http://ftp.digium.com/pub/asterisk/${MY_P}.tar.gz" + +S=${WORKDIR}/${MY_P} + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +DEPEND=">=net-misc/asterisk-1.4.0 + mysql? ( virtual/mysql )" + + +get_available_modules() { + local modules mod x + + # build list of available modules... + for x in app cdr codec format func pbx res chan; do + + for mod in $(find "${S}" -type f -name "${x}_*.c*" -print) + do + modules="${modules} $(basename ${mod/%.c*})" + done + done + + echo "${modules}" +} + +pkg_setup() { + local n dosleep=0 + einfo "Running pre-flight checks..." + + if use h323 && built_with_use net-misc/asterisk h323; then + echo + ewarn "h323: Emerging ${PN} with the h323 flag enabled will overwrite asterisk's chan_h323.so!" + ewarn "h323: Be sure to upgrade ${ROOT}etc/asterisk/h323.conf afterwards!" + dosleep=1 + fi + + echo + if [[ $dosleep -gt 0 ]]; then + ebeep + n=10 + while [[ $n -gt 0 ]]; do + echo -en " Waiting $n seconds...\r" + sleep 1 + (( n-- )) + done + fi +} + +src_unpack() { + unpack ${A} + cd ${S} + + # create install dir + # + epatch "${FILESDIR}"/install.patch || die "patch failed" + + econf +} + +src_compile() { + local modules + + append-flags -fPIC + + # build MODULE_LIST + # + if ! use mysql; then + modules="${modules} app_addon_sql_mysql cdr_mysql cdr_addon_mysql res_mysql res_config_mysql" + fi + + if ! use mp3 ; then + modules="${modules} format_mp3" + fi + + if ! use h323 ; then + modules="${modules} chan_ooh323" + fi + + einfo "available modules $(get_available_modules)" + einfo " skipping modules ${modules}" + + # run menuselect to evaluate the list of modules + # and rewrite the list afterwards + # + if [[ -n "${modules}" ]] + then + local mod category tmp_list failed_list + + ### + # run menuselect + + emake menuselect.makeopts || die "emake menuselect.makeopts failed" + + ### + # get list of modules with failed dependencies + + failed_list="$(awk -F= '/^MENUSELECT_DEPSFAILED=/{ print $3 }' menuselect.makeopts)" + + ### + # traverse our list of modules + einfo "Building menuselect.makeopts..." + + for category in app cdr codec format func pbx res chan; do + tmp_list="" + + # search list of modules for matching ones first... + for mod in ${modules}; do + # module is from current category? + if [[ "${mod/%_*}" = "${category}" ]] + then + # check menuselect thinks the dependencies are met + if has ${mod} ${failed_list} + then + eerror "${mod}: dependencies required to build this module are not met, NOT BUILDING!" + else + tmp_list="${tmp_list} ${mod}" + fi + fi + done + + use debug && echo "${category} tmp: ${tmp_list}" + + # replace the module list for $category with our custom one + if [[ -n "${tmp_list}" ]] + then + category="$(echo ${category} | tr '[:lower:]' '[:upper:]')" + sed -i -e "s:^\(MENUSELECT_${category}.*=\):\1 ${tmp_list}:" \ + menuselect.makeopts || die "failed to set list of ${category} applications" + fi + done + fi + + emake -j1 OPTIMIZE="${CFLAGS}" || die "Make failed" +} + +src_install() { + mkdir -p ${D}/usr/lib/asterisk/modules + make DESTDIR=${D} install || die "Make install failed" + + +# if use h323; then +# make -C asterisk-ooh323c \ +# DESTDIR=${D} install || die "Make instal ooh323c failed" +# fi + + # install standard docs... + dodoc README + dodoc doc/cdr_mysql.txt + + insinto /usr/share/doc/${PF} + doins configs/*.sample + + if use h323; then + cd ${S}/asterisk-ooh323c + docinto chan_ooh323c + dodoc AUTHORS INSTALL NEWS README COPYING ChangeLog + dodoc h323.conf.sample extensions.conf.sample + + insinto /etc/asterisk + newins h323.conf.sample h323.conf + fi + + cd ${S} + + if use mysql; then + insinto /etc/asterisk + newins configs/cdr_mysql.conf.sample cdr_mysql.conf + newins configs/res_mysql.conf.sample res_mysql.conf + fi + + einfo "Fixing permissions" + chown -R root:asterisk ${D}etc/asterisk + chmod -R u=rwX,g=rX,o= ${D}etc/asterisk + +# chown -R asterisk:asterisk ${D}var/lib/asterisk +# chmod -R u=rwX,g=rX,o= ${D}var/lib/asterisk +} + +pkg_postinst() { + # + # Announcements, warnings, reminders... + # + einfo "********* Some notes from the asterisk-addons-1.4.6 readme: **********" + echo + ewarn "\"Using res_config_mysql at the same time as res_config_odbc can create" + ewarn "system instability on some systems. Please load only one or the other.\"" + echo + ewarn "\"format_mp3 can cause Asterisk to crash on certain mp3 files (notably" + ewarn "8k files made with lame) due to bugs in mpglib. If you must use this" + ewarn "module, use it only with mp3's you know will work with it.\"" +} diff --git a/net-misc/asterisk-addons/asterisk-addons-1.6.0_beta2.ebuild b/net-misc/asterisk-addons/asterisk-addons-1.6.0_beta2.ebuild new file mode 100644 index 0000000..41ba51b --- /dev/null +++ b/net-misc/asterisk-addons/asterisk-addons-1.6.0_beta2.ebuild @@ -0,0 +1,219 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-addons/asterisk-addons-1.2.5.ebuild,v 1.1 2007/01/17 18:55:23 gustavoz Exp $ + +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" + +inherit eutils flag-o-matic autotools + +IUSE="elibc_uclibc +mysql h323 mp3 mobile fax debug" + +MY_P="${P/_/-}" + +DESCRIPTION="Additional Plugins for Asterisk" +HOMEPAGE="http://www.asterisk.org/" +SRC_URI="http://ftp.digium.com/pub/asterisk/${MY_P}.tar.gz" + +S=${WORKDIR}/${MY_P} + +SLOT="0" +LICENSE="GPL-2" +#KEYWORDS="~amd64 ~x86" +KEYWORDS="" + +DEPEND=">=net-misc/asterisk-1.6.0_beta1 + mysql? ( virtual/mysql ) + fax? ( >=media-libs/spandsp-0.0.3_pre26 ) + mobile? ( net-wireless/bluez-libs )" + + +get_available_modules() { + local modules mod x + + # build list of available modules... + for x in app cdr codec format func pbx res chan; do + + for mod in $(find "${S}" -type f -name "${x}_*.c*" -print) + do + modules="${modules} $(basename ${mod/%.c*})" + done + done + + echo "${modules}" +} + +pkg_setup() { + local n dosleep=0 + einfo "Running pre-flight checks..." + + if use h323 && built_with_use net-misc/asterisk h323; then + echo + ewarn "h323: Emerging ${PN} with the h323 flag enabled will overwrite asterisk's chan_h323.so!" + ewarn "h323: Be sure to upgrade ${ROOT}etc/asterisk/h323.conf afterwards!" + dosleep=1 + fi + + echo + if [[ $dosleep -gt 0 ]]; then + ebeep + n=10 + while [[ $n -gt 0 ]]; do + echo -en " Waiting $n seconds...\r" + sleep 1 + (( n-- )) + done + fi +} + +src_unpack() { + unpack ${A} + cd ${S} + + # create install dir + # + epatch "${FILESDIR}"/install-1.6.0.patch || die "patch failed" + + econf +} + +src_compile() { + local modules + + append-flags -fPIC + + # build MODULE_LIST + # + if ! use mysql; then + modules="${modules} app_addon_sql_mysql cdr_mysql cdr_addon_mysql res_mysql res_config_mysql" + fi + + if ! use mp3 ; then + modules="${modules} format_mp3" + fi + + if ! use h323 ; then + modules="${modules} chan_ooh323" + fi + + if ! use fax ; then + modules="${modules} app_fax" + fi + + if ! use mobile ; then + modules="${modules} chan_mobile" + fi + + einfo "available modules $(get_available_modules)" + einfo " skipping modules ${modules}" + + # run menuselect to evaluate the list of modules + # and rewrite the list afterwards + # + if [[ -n "${modules}" ]] + then + local mod category tmp_list failed_list + + ### + # run menuselect + + emake menuselect.makeopts || die "emake menuselect.makeopts failed" + + ### + # get list of modules with failed dependencies + + failed_list="$(awk -F= '/^MENUSELECT_DEPSFAILED=/{ print $3 }' menuselect.makeopts)" + + ### + # traverse our list of modules + einfo "Building menuselect.makeopts..." + + for category in app cdr codec format func pbx res chan; do + tmp_list="" + + # search list of modules for matching ones first... + for mod in ${modules}; do + # module is from current category? + if [[ "${mod/%_*}" = "${category}" ]] + then + # check menuselect thinks the dependencies are met + if has ${mod} ${failed_list} + then + eerror "${mod}: dependencies required to build this module are not met, NOT BUILDING!" + else + tmp_list="${tmp_list} ${mod}" + fi + fi + done + + use debug && echo "${category} tmp: ${tmp_list}" + + # replace the module list for $category with our custom one + if [[ -n "${tmp_list}" ]] + then + category="$(echo ${category} | tr '[:lower:]' '[:upper:]')" + sed -i -e "s:^\(MENUSELECT_${category}.*=\):\1 ${tmp_list}:" \ + menuselect.makeopts || die "failed to set list of ${category} applications" + fi + done + fi + + emake -j1 OPTIMIZE="${CFLAGS}" || die "Make failed" +} + +src_install() { + mkdir -p ${D}/usr/lib/asterisk/modules + make DESTDIR=${D} install || die "Make install failed" + + +# if use h323; then +# make -C asterisk-ooh323c \ +# DESTDIR=${D} install || die "Make instal ooh323c failed" +# fi + + # install standard docs... + dodoc README + dodoc doc/cdr_mysql.txt + + insinto /usr/share/doc/${PF} + doins configs/*.sample + + if use h323; then + cd ${S}/asterisk-ooh323c + docinto chan_ooh323c + dodoc AUTHORS INSTALL NEWS README COPYING ChangeLog + dodoc h323.conf.sample extensions.conf.sample + + insinto /etc/asterisk + newins h323.conf.sample h323.conf + fi + + cd ${S} + + if use mysql; then + insinto /etc/asterisk + newins configs/cdr_mysql.conf.sample cdr_mysql.conf + newins configs/res_mysql.conf.sample res_mysql.conf + fi + + einfo "Fixing permissions" + chown -R root:asterisk ${D}etc/asterisk + chmod -R u=rwX,g=rX,o= ${D}etc/asterisk + +# chown -R asterisk:asterisk ${D}var/lib/asterisk +# chmod -R u=rwX,g=rX,o= ${D}var/lib/asterisk +} + +pkg_postinst() { + # + # Announcements, warnings, reminders... + # + einfo "********* Some notes from the asterisk-addons-1.6.0_beta2 readme: **********" + echo + ewarn "\"Using res_config_mysql at the same time as res_config_odbc can create" + ewarn "system instability on some systems. Please load only one or the other.\"" + echo + ewarn "\"format_mp3 can cause Asterisk to crash on certain mp3 files (notably" + ewarn "8k files made with lame) due to bugs in mpglib. If you must use this" + ewarn "module, use it only with mp3's you know will work with it.\"" +} diff --git a/net-misc/asterisk-addons/files/install-1.6.0.patch b/net-misc/asterisk-addons/files/install-1.6.0.patch new file mode 100644 index 0000000..745fda6 --- /dev/null +++ b/net-misc/asterisk-addons/files/install-1.6.0.patch @@ -0,0 +1,12 @@ +*** Makefile.moddir_rules.org Sun Mar 9 15:46:10 2008 +--- Makefile.moddir_rules Sun Mar 9 15:46:35 2008 +*************** +*** 123,128 **** +--- 123,129 ---- + + install:: all + @echo "Installing modules from `basename $(CURDIR)`..." ++ mkdir -p $(DESTDIR)$(MODULES_DIR) + @for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done + + uninstall:: diff --git a/net-misc/asterisk-addons/files/install.patch b/net-misc/asterisk-addons/files/install.patch new file mode 100644 index 0000000..994c2a5 --- /dev/null +++ b/net-misc/asterisk-addons/files/install.patch @@ -0,0 +1,12 @@ +*** Makefile.moddir_rules.org Tue Mar 4 15:57:47 2008 +--- Makefile.moddir_rules Tue Mar 4 15:58:51 2008 +*************** +*** 75,80 **** +--- 75,81 ---- + rm -f modules.link + + install:: all ++ mkdir -p $(DESTDIR)$(MODULES_DIR) + for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done + + uninstall:: |