Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 147851 Details for
Bug 159013
asterisk-1.4.0 (and related) ebuilds
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
zaptel-1.4.9.ebuild.diff
zaptel-1.4.9.ebuild.diff (text/plain), 8.87 KB, created by
Natanael Copa
on 2008-03-31 14:51:42 UTC
(
hide
)
Description:
zaptel-1.4.9.ebuild.diff
Filename:
MIME Type:
Creator:
Natanael Copa
Created:
2008-03-31 14:51:42 UTC
Size:
8.87 KB
patch
obsolete
>--- /in/zaptel-1.4.9.ebuild 2008-03-31 14:17:13 +0000 >+++ zaptel-1.4.9.2.ebuild 2008-03-31 14:29:06 +0000 >@@ -2,31 +2,81 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: $ > >-# inherit subversion linux-mod toolchain-funcs eutils >-inherit linux-mod toolchain-funcs eutils >+inherit toolchain-funcs eutils linux-info linux-mod >+ >+## NOTE: >+# >+# florz disabled >+# >+ >+BRI_VERSION="0.4.0-test6" >+ >+IUSE="bri ecmark ecmark2 ecmark3 ecaggressive eckb1 ecmg2 ecsteve ecsteve2 florz rtc usb watchdog zapras zapnet" > >-# ESVN_REPO_URI="http://svn.digium.com/svn/zaptel/branches/1.4" > MY_P="${P/_/-}" > > DESCRIPTION="Drivers for Digium and ZapataTelephony cards" > HOMEPAGE="http://www.asterisk.org" >-# SRC_URI="" >-SRC_URI="http://ftp.digium.com/pub/zaptel/releases/${MY_P}.tar.gz" >+SRC_URI="http://ftp.digium.com/pub/zaptel/releases/${MY_P}.tar.gz >+ bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )" > > S="${WORKDIR}/${MY_P}" > >+S_BRI="${WORKDIR}/bristuff-${BRI_VERSION}" >+ > SLOT="0" > LICENSE="GPL-2" >-KEYWORDS="~amd64 ~x86" >-IUSE="ztdummy-only rtc" >+KEYWORDS="~x86 ~amd64" > > > RDEPEND="virtual/libc >+ usb? ( dev-libs/libusb ) > >=dev-libs/newt-0.50.0" > > DEPEND="${RDEPEND} > virtual/linux-sources" > >+# list of echo canceller use flags, >+# first active in this list is selected (=order does matter) >+ZAP_EC_FLAGS="ecmark ecmark2 ecmark3 ecsteve ecsteve2 eckb1 ecmg2" >+ >+### Begin: Helper functions >+ >+select_echo_cancel() { >+ local myEC="" >+ >+ for x in ${ZAP_EC_FLAGS}; do >+ if use $x; then >+ myEC=$(echo "$x" | sed -e "s:^ec::" | tr '[:lower:]' '[:upper:]') >+ break; >+ fi >+ done >+ >+ echo ${myEC} >+} >+ >+zconfig_disable() { >+ if grep -q "${1}" "${S}"/zconfig.h; then >+ # match a little more than ${1} so we can use zconfig_disable >+ # to disable all echo cancellers in zconfig.h w/o calling it several times >+ sed -i -e "s:^[ \t]*#define[ \t]\+\(${1}[a-zA-Z0-9_-]*\).*:#undef \1:" \ >+ "${S}"/zconfig.h >+ fi >+ >+ return $? >+} >+ >+zconfig_enable() { >+ if grep -q "${1}" "${S}"/zconfig.h; then >+ sed -i -e "s:^/\*[ \t]*#define[ \t]\+\(${1}\).*:#define \1:" \ >+ -e "s:^[ \t]*#undef[ \t]\+\(${1}\).*:#define \1:" \ >+ "${S}"/zconfig.h >+ fi >+ >+ return $? >+} >+ >+### End: Helper functions > > pkg_setup() { > local result=0 numec=0 >@@ -35,12 +85,50 @@ > > einfo "Running pre-flight checks..." > >+ # basic zaptel checks >+ if kernel_is 2 4 ; then >+ if ! linux_chkconfig_present CRC32; then >+ echo >+ eerror "Your kernel lacks CRC32 support!" >+ eerror "Enable CONFIG_CRC32!" >+ result=$((result+1)) >+ fi >+ else > if ! linux_chkconfig_present CRC_CCITT; then > echo > eerror "Your kernel lacks CRC_CCIT support!" > eerror "Enable CONFIG_CRC_CCIT!" > result=$((result+1)) > fi >+ fi >+ >+ # check if multiple echo cancellers have been selected >+ for x in ${ZAP_EC_FLAGS}; do >+ use $x && numec=$((numec+1)) >+ done >+ if [[ $numec -gt 1 ]]; then >+ # multiple flags are active, only the first in the ZAP_EC_FLAGS list >+ # will be used, make sure the user knows about this >+ echo >+ ewarn "Multiple echo canceller flags are active but only one will be used!" >+ ewarn "Selected: $(select_echo_cancel)" >+ fi >+ >+ # we need at least HDLC generic support >+ if use zapnet && ! linux_chkconfig_present HDLC; then >+ echo >+ eerror "zapnet: Your kernel lacks HDLC support!" >+ eerror "zapnet: Enable CONFIG_HDLC* to use zaptel network support!" >+ result=$((result+1)) >+ fi >+ >+ # zapras needs PPP support >+ if use zapras && ! linux_chkconfig_present PPP; then >+ echo >+ eerror "zapras: Your kernel lacks PPP support!" >+ eerror "zapras: Enable CONFIG_PPP* to use zaptel ras support!" >+ result=$((result+1)) >+ fi > > # rtc needs linux-2.6 and CONFIG_RTC > if use rtc; then >@@ -74,38 +162,200 @@ > einfo "Zaptel is happy and continues... :)" > } > >+src_unpack() { >+ unpack ${A} > >-src_compile() { >+ cd "${S}" >+ epatch "${FILESDIR}/${PN}-1.4.9.2-gentoo.diff" > >- econf \ >- --sysconfdir=/etc \ >- || die >+ # try to apply bristuff patch >+ if use bri; then >+ # fix for userpriv >+ chmod -R a=rwX "${S_BRI}" >+ >+ cd "${S}/kernel" >+ einfo "Patching zaptel with bristuff" >+ epatch "${S_BRI}/patches/zaptel/100-bri_dchan.diff" >+ >+ einfo "Patching zaphfc" >+ cd "${S_BRI}" >+ for PATCH in `sed -e 's/#.*$//' ${S_BRI}/patches/zaphfc/series` ; do >+ epatch "${S_BRI}/patches/zaphfc/$PATCH" >+ done >+ >+ # patch includes >+ sed -i -e "s:^#include.*zaptel\.h.*:#include <zaptel.h>:" \ >+ qozap/qozap.c \ >+ zaphfc/zaphfc.c \ >+ cwain/cwain.c >+ >+ # patch makefiles >+ sed -i -e "s:^ZAP[\t ]*=.*:ZAP=-I${S}/kernel:" \ >+ -e "s:^MODCONF=.*:MODCONF=/etc/modules.d/zaptel:" \ >+ -e "s:linux-2.6:linux:g" \ >+ qozap/Makefile \ >+ zaphfc/Makefile \ >+ cwain/Makefile >+ >+ sed -i -e "s:^\(CFLAGS+=-I. \).*:\1 \$(ZAP):" \ >+ zaphfc/Makefile >+ >+ epatch "${FILESDIR}"/${PN}-1.4.9.2-bristuff-KSRC.patch >+ cd "${S}" >+ fi > >- # menuselect.makeopts for ztdummy only >+### Configuration changes >+ local myEC >+ >+ # prepare zconfig.h >+ myEC=$(select_echo_cancel) >+ if [[ -n "${myEC}" ]]; then >+ einfo "Selected echo canceller: ${myEC}" >+ # disable default first, set new selected ec afterwards >+ zconfig_disable ECHO_CAN >+ zconfig_enable ECHO_CAN_${myEC} >+ fi >+ >+ # enable rtc support on 2.6 >+ if use rtc && linux_chkconfig_present RTC && kernel_is 2 6; then >+ einfo "Enabling ztdummy RTC support" >+ zconfig_enable USE_RTC >+ fi >+ >+ # enable agressive echo surpression >+ use ecaggressive && \ >+ zconfig_enable AGGRESSIVE_SUPPRESSOR >+ >+ # ppp ras support >+ use zapras && \ >+ zconfig_enable CONFIG_ZAPATA_PPP >+ >+ # frame relay, syncppp... >+ use zapnet && \ >+ zconfig_enable CONFIG_ZAPATA_NET >+ >+ # zaptel watchdog >+ use watchdog && \ >+ zconfig_enable CONFIG_ZAPTEL_WATCHDOG >+} > >- use ztdummy-only && cp "${FILESDIR}"/menuselect.makeopts ${S} >- >- epatch ${FILESDIR}/zaptel-1.4.9-gentoo.diff >- >- # build >- make DESTDIR="${D}" KVERS=${KV_FULL} KSRC=${KV_DIR} || die >+src_compile() { >+ # fun, zaptel uses autotools now >+ econf \ >+ --sysconfdir=/etc \ >+ $(use_with usb) || die > >+ # build. xpp stuff is included >+ make KVERS=${KV_FULL} \ >+ KSRC=${KV_DIR} ARCH=$(tc-arch-kernel) || \ >+ die "KVERS=${KV_FULL} KSRC=${KV_DIR} ARCH=$(tc-arch-kernel)" >+ >+ # zaphfc driver >+ if use bri; then >+ cd "${S_BRI}" >+ for x in zaphfc; do >+ einfo "Building ${x}..." >+ make KVERS="${KV_FULL}" \ >+ KSRC="${KV_DIR}" \ >+ INSTALL_PREFIX="${D}" \ >+ ARCH=$(tc-arch-kernel) \ >+ -C ${x} || die "make ${x} failed" >+ done >+ fi > } > > src_install() { >+ kernel_is 2 4 && cp /etc/modules.conf "${D}"/etc >+ make DESTDIR="${D}" ARCH=$(tc-arch-kernel) \ >+ KVERS=${KV_FULL} KSRC=${KV_DIR} install || die >+ >+ dodoc ChangeLog README README.Linux26 README.fxsusb zaptel.init >+ dodoc zaptel.conf.sample LICENSE zaptel.sysconfig README.fxotune >+ >+ # additional tools >+ dobin ztmonitor ztspeed zttest fxotune >+ >+ # install all header files, several packages need the complete set >+ # (e.g. sangoma wanpipe) >+ insinto /usr/include/zaptel >+ doins *.h >+ >+ if use bri; then >+ einfo "Installing bri" >+ cd "${S_BRI}" >+ >+ insinto /lib/modules/${KV_FULL}/misc >+ doins qozap/qozap.${KV_OBJ} >+ doins zaphfc/zaphfc.${KV_OBJ} >+ doins cwain/cwain.${KV_OBJ} >+ >+ # install example configs for octoBRI and quadBRI >+ insinto /etc >+ doins qozap/zaptel.conf.octoBRI >+ newins qozap/zaptel.conf zaptel.conf.quadBRI >+ newins zaphfc/zaptel.conf zaptel.conf.zaphfc >+ >+ insinto /etc/asterisk >+ doins qozap/zapata.conf.octoBRI >+ newins qozap/zapata.conf zapata.conf.quadBRI >+ newins zaphfc/zapata.conf zapata.conf.zaphfc >+ >+ docinto bristuff >+ dodoc CHANGES INSTALL >+ >+ docinto bristuff/qozap >+ dodoc qozap/LICENSE qozap/TODO qozap/*.conf* >+ >+ docinto bristuff/zaphfc >+ dodoc zaphfc/LICENSE zaphfc/*.conf >+ >+ docinto bristuff/cwain >+ dodoc cwain/TODO cwain/LICENSE >+ >+ cd "${S}" >+ fi > > # install init script >- newinitd ${FILESDIR}/zaptel.rc6 zaptel >- newconfd ${FILESDIR}/zaptel.confd zaptel >- >+ newinitd "${FILESDIR}"/zaptel.rc6 zaptel >+ newconfd "${FILESDIR}"/zaptel.confd zaptel >+ >+ # install devfsd rule file >+ insinto /etc/devfs.d >+ newins "${FILESDIR}"/zaptel.devfsd zaptel >+ >+ # fix permissions if there's no udev / devfs around >+ if [[ -d "${D}"/dev/zap ]]; then >+ chown -R root:dialout "${D}"/dev/zap >+ chmod -R u=rwX,g=rwX,o= "${D}"/dev/zap >+ fi > >- make DESTDIR="${D}" KVERS=${KV_FULL} KSRC=${KV_DIR} install || die > } > > pkg_postinst() { >+ linux-mod_pkg_postinst > > echo > einfo "Use the /etc/init.d/zaptel script to load zaptel.conf settings on startup!" > echo > >+ if use bri; then >+ einfo "Bristuff configs have been merged as:" >+ einfo "" >+ einfo "${ROOT}etc/" >+ einfo " zaptel.conf.zaphfc" >+ einfo " zaptel.conf.quadBRI" >+ einfo " zaptel.conf.octoBRI" >+ einfo "" >+ einfo "${ROOT}etc/asterisk/" >+ einfo " zapata.conf.zaphfc" >+ einfo " zapata.conf.quadBRI" >+ einfo " zapata.conf.octoBRI" >+ echo >+ fi >+ >+ # fix permissions if there's no udev / devfs around >+ if [[ -d "${ROOT}"dev/zap ]]; then >+ chown -R root:dialout "${ROOT}"dev/zap >+ chmod -R u=rwX,g=rwX,o= "${ROOT}"dev/zap >+ fi > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 159013
:
105003
|
105004
|
105448
|
120258
|
120271
|
120272
|
124810
|
124811
|
124812
|
128192
|
131363
|
136200
|
136202
|
136204
|
136205
|
136207
|
136209
|
140019
|
140021
|
140038
|
140041
|
140042
|
140043
|
143656
|
143658
|
143660
|
143940
|
143941
|
143942
|
144324
|
144326
|
147840
|
147843
|
147845
| 147851 |
161232
|
161233