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