1 |
rajiv 08/05/29 04:34:29 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: zaptel-1.2.26.ebuild |
5 |
Removed: zaptel-1.2.25.ebuild |
6 |
Log: |
7 |
version bump, bug #224045. |
8 |
(Portage version: 2.1.5.2) |
9 |
|
10 |
Revision Changes Path |
11 |
1.108 net-misc/zaptel/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/zaptel/ChangeLog?rev=1.108&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/zaptel/ChangeLog?rev=1.108&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/zaptel/ChangeLog?r1=1.107&r2=1.108 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v |
20 |
retrieving revision 1.107 |
21 |
retrieving revision 1.108 |
22 |
diff -u -r1.107 -r1.108 |
23 |
--- ChangeLog 18 May 2008 14:50:53 -0000 1.107 |
24 |
+++ ChangeLog 29 May 2008 04:34:28 -0000 1.108 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for net-misc/zaptel |
27 |
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.107 2008/05/18 14:50:53 rajiv Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.108 2008/05/29 04:34:28 rajiv Exp $ |
30 |
+ |
31 |
+*zaptel-1.2.26 (29 May 2008) |
32 |
+ |
33 |
+ 29 May 2008; Rajiv Aaron Manglani <rajiv@g.o> |
34 |
+ -zaptel-1.2.25.ebuild, +zaptel-1.2.26.ebuild: |
35 |
+ version bump, bug #224045. |
36 |
|
37 |
*zaptel-1.2.25 (18 May 2008) |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.1 net-misc/zaptel/zaptel-1.2.26.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/zaptel/zaptel-1.2.26.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/zaptel/zaptel-1.2.26.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: zaptel-1.2.26.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2008 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.26.ebuild,v 1.1 2008/05/29 04:34:28 rajiv Exp $ |
52 |
|
53 |
inherit toolchain-funcs eutils linux-mod flag-o-matic |
54 |
|
55 |
BRI_VERSION="0.3.0-PRE-1y-l" |
56 |
FLORZ_VERSION="0.3.0-PRE-1y-l_florz-12.1" |
57 |
|
58 |
IUSE="astribank bri ecmark ecmark2 ecmark3 ecaggressive eckb1 ecmg2 ecsteve ecsteve2 florz |
59 |
rtc watchdog zapras zapnet" |
60 |
|
61 |
MY_P="${P/_/-}" |
62 |
|
63 |
DESCRIPTION="Drivers for Digium and ZapataTelephony cards" |
64 |
HOMEPAGE="http://www.asterisk.org" |
65 |
SRC_URI="http://downloads.digium.com/pub/zaptel/releases/${MY_P}.tar.gz |
66 |
bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz ) |
67 |
florz? ( http://zaphfc.florz.dyndns.org/zaphfc_${FLORZ_VERSION}.diff.gz ) |
68 |
" |
69 |
|
70 |
S="${WORKDIR}/${MY_P}" |
71 |
|
72 |
S_BRI="${WORKDIR}/bristuff-${BRI_VERSION}" |
73 |
|
74 |
SLOT="0" |
75 |
LICENSE="GPL-2" |
76 |
KEYWORDS="~amd64 ~ppc ~x86" |
77 |
|
78 |
RDEPEND="virtual/libc |
79 |
dev-libs/libusb |
80 |
>=dev-libs/newt-0.50.0 |
81 |
astribank? ( dev-lang/perl )" |
82 |
|
83 |
DEPEND="${RDEPEND} virtual/linux-sources" |
84 |
|
85 |
# list of echo canceller use flags, |
86 |
# first active in this list is selected (=order does matter) |
87 |
ZAP_EC_FLAGS="ecmark ecmark2 ecmark3 ecsteve ecsteve2 eckb1 ecmg2" |
88 |
|
89 |
### Begin: Helper functions |
90 |
|
91 |
select_echo_cancel() { |
92 |
local myEC="" |
93 |
|
94 |
for x in ${ZAP_EC_FLAGS}; do |
95 |
if use $x; then |
96 |
myEC=$(echo "$x" | sed -e "s:^ec::" | tr '[:lower:]' '[:upper:]') |
97 |
break; |
98 |
fi |
99 |
done |
100 |
|
101 |
echo ${myEC} |
102 |
} |
103 |
|
104 |
zconfig_disable() { |
105 |
if grep -q "${1}" "${S}"/zconfig.h; then |
106 |
# match a little more than ${1} so we can use zconfig_disable |
107 |
# to disable all echo cancellers in zconfig.h w/o calling it several times |
108 |
sed -i -e "s:^[ \t]*#define[ \t]\+\(${1}[a-zA-Z0-9_-]*\).*:#undef \1:" \ |
109 |
"${S}"/zconfig.h |
110 |
fi |
111 |
|
112 |
return $? |
113 |
} |
114 |
|
115 |
zconfig_enable() { |
116 |
if grep -q "${1}" "${S}"/zconfig.h; then |
117 |
sed -i -e "s:^/\*[ \t]*#define[ \t]\+\(${1}\).*:#define \1:" \ |
118 |
-e "s:^[ \t]*#undef[ \t]\+\(${1}\).*:#define \1:" \ |
119 |
"${S}"/zconfig.h |
120 |
fi |
121 |
|
122 |
return $? |
123 |
} |
124 |
|
125 |
### End: Helper functions |
126 |
|
127 |
pkg_setup() { |
128 |
local result=0 numec=0 |
129 |
|
130 |
linux-mod_pkg_setup |
131 |
|
132 |
einfo "Running pre-flight checks..." |
133 |
|
134 |
# basic zaptel checks |
135 |
if kernel_is 2 4 ; then |
136 |
if ! linux_chkconfig_present CRC32; then |
137 |
echo |
138 |
eerror "Your kernel lacks CRC32 support!" |
139 |
eerror "Enable CONFIG_CRC32!" |
140 |
result=$((result+1)) |
141 |
fi |
142 |
else |
143 |
if ! linux_chkconfig_present CRC_CCITT; then |
144 |
echo |
145 |
eerror "Your kernel lacks CRC_CCIT support!" |
146 |
eerror "Enable CONFIG_CRC_CCIT!" |
147 |
result=$((result+1)) |
148 |
fi |
149 |
if ! linux_chkconfig_present FW_LOADER; then |
150 |
echo |
151 |
eerror "Your kernel lacks FW_LOADER support!" |
152 |
eerror "Enable CONFIG_FW_LOADER!" |
153 |
result=$((result+1)) |
154 |
fi |
155 |
fi |
156 |
|
157 |
# check if multiple echo cancellers have been selected |
158 |
for x in ${ZAP_EC_FLAGS}; do |
159 |
use $x && numec=$((numec+1)) |
160 |
done |
161 |
if [[ $numec -gt 1 ]]; then |
162 |
# multiple flags are active, only the first in the ZAP_EC_FLAGS list |
163 |
# will be used, make sure the user knows about this |
164 |
echo |
165 |
ewarn "Multiple echo canceller flags are active but only one will be used!" |
166 |
ewarn "Selected: $(select_echo_cancel)" |
167 |
fi |
168 |
|
169 |
# we need at least HDLC generic support |
170 |
if use zapnet && ! linux_chkconfig_present HDLC; then |
171 |
echo |
172 |
eerror "zapnet: Your kernel lacks HDLC support!" |
173 |
eerror "zapnet: Enable CONFIG_HDLC* to use zaptel network support!" |
174 |
result=$((result+1)) |
175 |
fi |
176 |
|
177 |
# zapras needs PPP support |
178 |
if use zapras && ! linux_chkconfig_present PPP; then |
179 |
echo |
180 |
eerror "zapras: Your kernel lacks PPP support!" |
181 |
eerror "zapras: Enable CONFIG_PPP* to use zaptel ras support!" |
182 |
result=$((result+1)) |
183 |
fi |
184 |
|
185 |
# rtc needs linux-2.6 and CONFIG_RTC |
186 |
if use rtc; then |
187 |
if ! kernel_is 2 6; then |
188 |
echo |
189 |
eerror "rtc: >=Linux-2.6.0 is needed for rtc support!" |
190 |
result=$((result+1)) |
191 |
fi |
192 |
|
193 |
if ! linux_chkconfig_present RTC; then |
194 |
eerror "rtc: Your kernel lacks RealTime-Clock support!" |
195 |
result=$((result+1)) |
196 |
fi |
197 |
fi |
198 |
|
199 |
if [[ $result -gt 0 ]]; then |
200 |
echo |
201 |
ewarn "One or more of the neccessary precondition(s) is/are not met!" |
202 |
ewarn "Look at the messages above, resolve the problem (or disable the use-flag) and try again" |
203 |
echo |
204 |
|
205 |
if [[ $result -lt 3 ]]; then |
206 |
eerror "[$result Error(s)] Zaptel is not happy :(" |
207 |
else |
208 |
eerror "[$result Error(s)] You're making zaptel cry :'(" |
209 |
fi |
210 |
die "[$result] Precondition(s) not met" |
211 |
fi |
212 |
|
213 |
echo |
214 |
einfo "Zaptel is happy and continues... :)" |
215 |
} |
216 |
|
217 |
src_unpack() { |
218 |
unpack ${A} |
219 |
|
220 |
cd "${S}" |
221 |
epatch "${FILESDIR}"/${PN}-1.2.23-gentoo.diff |
222 |
epatch "${FILESDIR}"/zaptel-1.2.9.1-ar.patch |
223 |
epatch "${FILESDIR}"/zaptel-1.2.25-xpputils.diff |
224 |
|
225 |
# try to apply bristuff patch |
226 |
if use bri; then |
227 |
# fix for userpriv |
228 |
chmod -R a=rwX ${S_BRI} |
229 |
|
230 |
einfo "Patching zaptel w/ BRI stuff (${BRI_VERSION})" |
231 |
epatch ${S_BRI}/patches/zaptel.patch |
232 |
|
233 |
cd ${S_BRI} |
234 |
|
235 |
if use florz; then |
236 |
einfo "Patching zaptel with florz (${FLORZ_VERSION}) for zaphfc" |
237 |
epatch "${WORKDIR}"/zaphfc_${FLORZ_VERSION}.diff |
238 |
fi |
239 |
|
240 |
# patch includes |
241 |
sed -i -e "s:^#include.*zaptel\.h.*:#include <zaptel.h>:" \ |
242 |
qozap/qozap.c \ |
243 |
zaphfc/zaphfc.c \ |
244 |
cwain/cwain.c |
245 |
|
246 |
# patch makefiles |
247 |
sed -i -e "s:^ZAP[\t ]*=.*:ZAP=-I${S}:" \ |
248 |
-e "s:^MODCONF=.*:MODCONF=/etc/modules.d/zaptel:" \ |
249 |
-e "s:linux-2.6:linux:g" \ |
250 |
qozap/Makefile \ |
251 |
zaphfc/Makefile \ |
252 |
cwain/Makefile |
253 |
|
254 |
sed -i -e "s:^\(CFLAGS+=-I. \).*:\1 \$(ZAP):" \ |
255 |
zaphfc/Makefile |
256 |
|
257 |
cd "${S}" |
258 |
fi |
259 |
|
260 |
### Configuration changes |
261 |
local myEC |
262 |
|
263 |
# prepare zconfig.h |
264 |
myEC=$(select_echo_cancel) |
265 |
if [[ -n "${myEC}" ]]; then |
266 |
einfo "Selected echo canceller: ${myEC}" |
267 |
# disable default first, set new selected ec afterwards |
268 |
zconfig_disable ECHO_CAN |
269 |
zconfig_enable ECHO_CAN_${myEC} |
270 |
fi |
271 |
|
272 |
# enable rtc support on 2.6 |
273 |
if use rtc && linux_chkconfig_present RTC && kernel_is 2 6; then |
274 |
einfo "Enabling ztdummy RTC support" |
275 |
zconfig_enable USE_RTC |
276 |
fi |
277 |
|
278 |
# enable agressive echo surpression |
279 |
use ecaggressive && \ |
280 |
zconfig_enable AGGRESSIVE_SUPPRESSOR |
281 |
|
282 |
# ppp ras support |
283 |
use zapras && \ |
284 |
zconfig_enable CONFIG_ZAPATA_PPP |
285 |
|
286 |
# frame relay, syncppp... |
287 |
use zapnet && \ |
288 |
zconfig_enable CONFIG_ZAPATA_NET |
289 |
|
290 |
# zaptel watchdog |
291 |
use watchdog && \ |
292 |
zconfig_enable CONFIG_ZAPTEL_WATCHDOG |
293 |
} |
294 |
|
295 |
src_compile() { |
296 |
# build |
297 |
make KVERS=${KV_FULL} \ |
298 |
KSRC=${KV_DIR} ARCH=$(tc-arch-kernel) || die |
299 |
|
300 |
if use astribank; then |
301 |
cd "${S}"/xpp/utils |
302 |
make || die "make xpp utils failed" |
303 |
fi |
304 |
|
305 |
if use bri; then |
306 |
cd ${S_BRI} |
307 |
for x in cwain qozap zaphfc; do |
308 |
einfo "Building ${x}..." |
309 |
make KVERS=${KV_FULL} \ |
310 |
KSRC=/usr/src/linux \ |
311 |
ARCH=$(tc-arch-kernel) \ |
312 |
-C ${x} || die "make ${x} failed" |
313 |
done |
314 |
fi |
315 |
} |
316 |
|
317 |
src_install() { |
318 |
# Create firmware directory |
319 |
mkdir -p "${D}"/lib/firmware/ |
320 |
|
321 |
kernel_is 2 4 && cp /etc/modules.conf "${D}"/etc |
322 |
make DESTDIR="${D}" ARCH=$(tc-arch-kernel) \ |
323 |
KVERS=${KV_FULL} KSRC=/usr/src/linux devices firmware \ |
324 |
install-modules install-programs || die |
325 |
|
326 |
dodoc ChangeLog README README.udev README.fxsusb zaptel.init |
327 |
dodoc zaptel.conf.sample zaptel.sysconfig README.fxotune |
328 |
|
329 |
# additional tools |
330 |
dobin ztmonitor ztspeed zttest fxotune |
331 |
|
332 |
# install all header files, several packages need the complete set |
333 |
# (e.g. sangoma wanpipe) |
334 |
insinto /usr/include/zaptel |
335 |
doins *.h |
336 |
|
337 |
if use bri; then |
338 |
einfo "Installing bri" |
339 |
cd ${S_BRI} |
340 |
|
341 |
insinto /lib/modules/${KV_FULL}/misc |
342 |
doins qozap/qozap.${KV_OBJ} |
343 |
doins zaphfc/zaphfc.${KV_OBJ} |
344 |
doins cwain/cwain.${KV_OBJ} |
345 |
|
346 |
# install example configs for octoBRI and quadBRI |
347 |
insinto /etc |
348 |
doins qozap/zaptel.conf.octoBRI |
349 |
newins qozap/zaptel.conf zaptel.conf.quadBRI |
350 |
newins zaphfc/zaptel.conf zaptel.conf.zaphfc |
351 |
|
352 |
insinto /etc/asterisk |
353 |
doins qozap/zapata.conf.octoBRI |
354 |
newins qozap/zapata.conf zapata.conf.quadBRI |
355 |
newins zaphfc/zapata.conf zapata.conf.zaphfc |
356 |
|
357 |
docinto bristuff |
358 |
dodoc CHANGES INSTALL |
359 |
|
360 |
docinto bristuff/qozap |
361 |
dodoc qozap/TODO qozap/*.conf* |
362 |
|
363 |
docinto bristuff/zaphfc |
364 |
dodoc zaphfc/*.conf |
365 |
|
366 |
docinto bristuff/cwain |
367 |
dodoc cwain/TODO |
368 |
|
369 |
cd "${S}" |
370 |
fi |
371 |
|
372 |
# install init script |
373 |
newinitd "${FILESDIR}"/zaptel.rc6 zaptel |
374 |
newconfd "${FILESDIR}"/zaptel.confd zaptel |
375 |
|
376 |
# install udev rule file |
377 |
insinto /etc/udev/rules.d |
378 |
newins "${FILESDIR}"/zaptel.udevd 10-zaptel.rules |
379 |
|
380 |
if use astribank; then |
381 |
cd "${S}"/xpp/utils |
382 |
eval `perl '-V:installarchlib'` |
383 |
make DESTDIR="${D}" PERLLIBDIR=${installarchlib} install || die "failed xpp utils install" |
384 |
dosbin zt_registration xpp_sync lszaptel |
385 |
fi |
386 |
} |
387 |
|
388 |
pkg_postinst() { |
389 |
linux-mod_pkg_postinst |
390 |
|
391 |
echo |
392 |
einfo "Use the /etc/init.d/zaptel script to load zaptel.conf settings on startup!" |
393 |
einfo "This ebuild no longer sets permissions on device nodes. Please review" |
394 |
einfo " /etc/udev/rules.d/10-zaptel.rules or the appropriate configuration" |
395 |
einfo " method for your device node manager." |
396 |
echo |
397 |
|
398 |
if use bri; then |
399 |
einfo "Bristuff configs have been merged as:" |
400 |
einfo "" |
401 |
einfo "${ROOT}etc/" |
402 |
einfo " zaptel.conf.zaphfc" |
403 |
einfo " zaptel.conf.quadBRI" |
404 |
einfo " zaptel.conf.octoBRI" |
405 |
einfo "" |
406 |
einfo "${ROOT}etc/asterisk/" |
407 |
einfo " zapata.conf.zaphfc" |
408 |
einfo " zapata.conf.quadBRI" |
409 |
einfo " zapata.conf.octoBRI" |
410 |
echo |
411 |
fi |
412 |
} |
413 |
|
414 |
|
415 |
|
416 |
-- |
417 |
gentoo-commits@l.g.o mailing list |