Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 204057 | Differences between
and this patch

Collapse All | Expand All

(-)zaptel-1.2.24.ebuild.original (-8 / +71 lines)
Lines 7-13 Link Here
7
BRI_VERSION="0.3.0-PRE-1y-l"
7
BRI_VERSION="0.3.0-PRE-1y-l"
8
FLORZ_VERSION="0.3.0-PRE-1y-l_florz-12.1"
8
FLORZ_VERSION="0.3.0-PRE-1y-l_florz-12.1"
9
9
10
IUSE="astribank bri ecmark ecmark2 ecmark3 ecaggressive eckb1 ecmg2 ecsteve ecsteve2 florz
10
OSLEC_VERSION="0.1"
11
OSLEC_PATCH="oslec-${OSLEC_VERSION}-${P}"
12
13
IUSE="astribank bri ecmark ecmark2 ecmark3 ecaggressive eckb1 ecmg2 ecsteve ecsteve2 ecoslec florz
11
rtc watchdog zapras zapnet"
14
rtc watchdog zapras zapnet"
12
15
13
MY_P="${P/_/-}"
16
MY_P="${P/_/-}"
Lines 17-27 Link Here
17
SRC_URI="http://downloads.digium.com/pub/zaptel/releases/${MY_P}.tar.gz
20
SRC_URI="http://downloads.digium.com/pub/zaptel/releases/${MY_P}.tar.gz
18
	 bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )
21
	 bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )
19
	 florz? ( http://zaphfc.florz.dyndns.org/zaphfc_${FLORZ_VERSION}.diff.gz )
22
	 florz? ( http://zaphfc.florz.dyndns.org/zaphfc_${FLORZ_VERSION}.diff.gz )
20
	 "
23
	 ecoslec? ( http://www.rowetel.com/ucasterisk/downloads/oslec-${OSLEC_VERSION}.tar.gz
24
			mirror://gentoo/${OSLEC_PATCH}.diff.gz )"
21
25
22
S="${WORKDIR}/${MY_P}"
26
S="${WORKDIR}/${MY_P}"
23
27
24
S_BRI="${WORKDIR}/bristuff-${BRI_VERSION}"
28
S_BRI="${WORKDIR}/bristuff-${BRI_VERSION}"
29
S_OSLEC="${WORKDIR}/oslec-${OSLEC_VERSION}/kernel"
25
30
26
SLOT="0"
31
SLOT="0"
27
LICENSE="GPL-2"
32
LICENSE="GPL-2"
Lines 30-42 Link Here
30
RDEPEND="virtual/libc
35
RDEPEND="virtual/libc
31
	dev-libs/libusb
36
	dev-libs/libusb
32
	>=dev-libs/newt-0.50.0
37
	>=dev-libs/newt-0.50.0
33
	astribank? ( dev-lang/perl )"
38
	astribank? ( dev-lang/perl )
39
	ecoslec? ( dev-util/dialog )"
34
40
35
DEPEND="${RDEPEND} virtual/linux-sources"
41
DEPEND="${RDEPEND} virtual/linux-sources"
36
42
37
# list of echo canceller use flags,
43
# list of echo canceller use flags,
38
# first active in this list is selected (=order does matter)
44
# first active in this list is selected (=order does matter)
39
ZAP_EC_FLAGS="ecmark ecmark2 ecmark3 ecsteve ecsteve2 eckb1 ecmg2"
45
ZAP_EC_FLAGS="ecmark ecmark2 ecmark3 ecsteve ecsteve2 eckb1 ecmg2 ecoslec"
40
46
41
### Begin: Helper functions
47
### Begin: Helper functions
42
48
Lines 208-213 Link Here
208
		cd "${S}"
214
		cd "${S}"
209
	fi
215
	fi
210
216
217
	# oslec echo canceller
218
	if use ecoslec; then
219
		#
220
		# meh... bristuff and oslec patch are touching the same place,
221
		# apply bristuff first then fixup the oslec patch
222
		# ugly, but saves us from creating yet another set of patches
223
		#
224
		if use bri; then
225
			sed -i \
226
				-e "s:^-\(#define ECHO_CAN_KB1\).*:-/* \1 */:" \
227
				-e "s:^.*\(#define ECHO_CAN_MG2\).*: \1:" \
228
				"${WORKDIR}/${OSLEC_PATCH}.diff" || die "Failed to fix oslec patch for bri"
229
		fi
230
231
		EPATCH_SINGLE_MSG="Applying ${OSLEC_PATCH} zaptel patch" \
232
			epatch "${WORKDIR}/${OSLEC_PATCH}.diff"
233
	fi
234
211
### Configuration changes
235
### Configuration changes
212
	local myEC
236
	local myEC
213
237
Lines 244-249 Link Here
244
}
268
}
245
269
246
src_compile() {
270
src_compile() {
271
	# build oslec first to avoid warnings about undefined symbols
272
	if use ecoslec; then
273
		cd "${S_OSLEC}"
274
		make KVERS=${KV_FULL} \
275
			KDIR=${KV_DIR} \
276
			ARCH=$(tc-arch-kernel) || die "emake oslec failed"
277
		cp Module.symvers ${S}/ || einfo "unable to copy oslec Module.symvers"
278
		cd ${S}
279
	fi
280
	
247
	# build
281
	# build
248
	make KVERS=${KV_FULL} \
282
	make KVERS=${KV_FULL} \
249
	     KSRC=${KV_DIR} ARCH=$(tc-arch-kernel) || die
283
	     KSRC=${KV_DIR} ARCH=$(tc-arch-kernel) || die
Lines 258-264 Link Here
258
		for x in cwain qozap zaphfc; do
292
		for x in cwain qozap zaphfc; do
259
			einfo "Building ${x}..."
293
			einfo "Building ${x}..."
260
			make KVERS=${KV_FULL} \
294
			make KVERS=${KV_FULL} \
261
				KSRC=/usr/src/linux \
295
				KSRC=${KV_DIR} \
262
				ARCH=$(tc-arch-kernel) \
296
				ARCH=$(tc-arch-kernel) \
263
				-C ${x} || die "make ${x} failed"
297
				-C ${x} || die "make ${x} failed"
264
		done
298
		done
Lines 271-281 Link Here
271
305
272
	kernel_is 2 4 && cp /etc/modules.conf "${D}"/etc
306
	kernel_is 2 4 && cp /etc/modules.conf "${D}"/etc
273
	make DESTDIR="${D}" ARCH=$(tc-arch-kernel) \
307
	make DESTDIR="${D}" ARCH=$(tc-arch-kernel) \
274
	KVERS=${KV_FULL} KSRC=/usr/src/linux devices firmware \
308
	KVERS=${KV_FULL} KSRC=${KV_DIR} devices firmware \
275
	install-modules install-programs || die
309
	install-modules install-programs || die
276
310
277
	dodoc ChangeLog README README.udev README.fxsusb zaptel.init
311
	dodoc ChangeLog README README.udev README.fxsusb zaptel.init
278
	dodoc zaptel.conf.sample zaptel.sysconfig README.fxotune
312
	dodoc zaptel.conf.sample LICENSE zaptel.sysconfig README.fxotune
279
313
280
	# additional tools
314
	# additional tools
281
	dobin ztmonitor ztspeed zttest fxotune
315
	dobin ztmonitor ztspeed zttest fxotune
Lines 320-325 Link Here
320
		cd "${S}"
354
		cd "${S}"
321
	fi
355
	fi
322
356
357
	if use ecoslec; then
358
		cd "${S_OSLEC}"
359
		insinto /lib/modules/${KV_FULL}/misc
360
		doins oslec.${KV_OBJ}
361
362
		newsbin oslec-ctrl-panel.sh	oslec-ctrl-panel
363
364
		docinto oslec
365
		dodoc ../{README.txt,COPYING}
366
367
		cd "${S}"
368
	fi
369
323
	# install init script
370
	# install init script
324
	newinitd "${FILESDIR}"/zaptel.rc6 zaptel
371
	newinitd "${FILESDIR}"/zaptel.rc6 zaptel
325
	newconfd "${FILESDIR}"/zaptel.confd zaptel
372
	newconfd "${FILESDIR}"/zaptel.confd zaptel
Lines 332-338 Link Here
332
		cd "${S}"/xpp/utils
379
		cd "${S}"/xpp/utils
333
		eval `perl '-V:installarchlib'`
380
		eval `perl '-V:installarchlib'`
334
		make DESTDIR="${D}" PERLLIBDIR=${installarchlib} install || die "failed xpp utils install"
381
		make DESTDIR="${D}" PERLLIBDIR=${installarchlib} install || die "failed xpp utils install"
335
		dosbin zt_registration xpp_sync lszaptel
382
		dosbin zt_registration xpp_sync xpp_blink lszaptel zapconf zaptel_drivers zaptel_hardware
383
		docinto astribank
384
		dodoc ../README.Astribank ../README.metering
336
	fi
385
	fi
337
}
386
}
338
387
Lines 360-363 Link Here
360
		einfo "    zapata.conf.octoBRI"
409
		einfo "    zapata.conf.octoBRI"
361
		echo
410
		echo
362
	fi
411
	fi
412
413
	if use ecoslec; then
414
		einfo "The OSLEC control panel has been installed as:"
415
		einfo "   \"/usr/sbin/oslec-ctrl-panel\""
416
		echo
417
		einfo "Important options in zapata.conf:"
418
		einfo "   echocancel=yes"
419
		einfo "   echocancelwhenbridged=no"
420
		einfo "   ;echotraining=400 (must be disabled)"
421
		echo
422
		einfo "More information about the OSLEC echo canceller:"
423
		einfo "   \"http://www.rowetel.com/ucasterisk/oslec.html\""
424
		echo
425
	fi
363
}
426
}

Return to bug 204057