diff options
Diffstat (limited to 'net-misc/asterisk-chan_capi/asterisk-chan_capi-1.1.1.ebuild')
-rw-r--r-- | net-misc/asterisk-chan_capi/asterisk-chan_capi-1.1.1.ebuild | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/net-misc/asterisk-chan_capi/asterisk-chan_capi-1.1.1.ebuild b/net-misc/asterisk-chan_capi/asterisk-chan_capi-1.1.1.ebuild new file mode 100644 index 000000000000..4d979a32f9f9 --- /dev/null +++ b/net-misc/asterisk-chan_capi/asterisk-chan_capi-1.1.1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-chan_capi/asterisk-chan_capi-1.1.1.ebuild,v 1.1 2008/10/26 22:42:29 sbriesen Exp $ + +inherit eutils + +DESCRIPTION="CAPI 2.0 channel module for Asterisk" +HOMEPAGE="http://www.melware.org/ChanCapi" +SRC_URI="ftp://ftp.chan-capi.org/chan-capi/${P/asterisk-}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~ppc ~x86" + +RDEPEND=">=net-misc/asterisk-1.2.0 + net-dialup/capi4k-utils" + +DEPEND="${RDEPEND} + sys-apps/sed" + +S="${WORKDIR}/${P/asterisk-}" + +src_unpack() { + unpack ${A} + cd "${S}" + + # patch locations and compile flags + sed -i \ + -e "s:^\(CFLAGS.*-O6.*\):# \1:g" \ + -e "s:^\(CFLAGS.*-march=.*\):# \1:g" \ + -e "s:/usr/lib/:/usr/$(get_libdir)/:g" \ + -e "s:\(-shared\):\$(LDFLAGS) \1:g" Makefile +} + +src_compile() { + emake V="1" CC="$(tc-getCC)" OPTIMIZE="${CFLAGS}" || die "emake failed" +} + +src_install() { + emake AVERSION="" INSTALL_PREFIX="${D}" install install_config || die "emake install failed" + newdoc libcapi20/README README.capi20 + dodoc CHANGES README* capi.conf + + # fix permissions + if [ -n "$(egetent group asterisk)" ]; then + chown -R root:asterisk "${D}etc/asterisk/capi.conf" + chmod -R u=rwX,g=rX,o= "${D}etc/asterisk/capi.conf" + fi +} + +pkg_postinst() { + elog + elog "Please don't forget to enable chan_capi in" + elog "your /etc/asterisk/modules.conf:" + elog + elog " load => chan_capi.so" + elog + elog "and in the [global] section:" + elog + elog " chan_capi.so=yes" + elog + elog "Don't forget a trailing newline at the end of modules.conf!" + elog "See /usr/share/doc/${PF} for more information." + elog +} |