/[gentoo-x86]/net-misc/zaptel/zaptel-1.0.3.ebuild
Gentoo

Contents of /net-misc/zaptel/zaptel-1.0.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Mon Sep 19 19:45:56 2005 UTC (14 years, 2 months ago) by stkn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Removed outdated ebuilds.
(Portage version: 2.0.51.22-r2)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.0.3.ebuild,v 1.7 2005/09/15 02:38:26 stkn Exp $
4
5 IUSE="devfs26"
6
7 inherit eutils kernel-mod toolchain-funcs
8
9 DESCRIPTION="Pseudo-TDM engine"
10 HOMEPAGE="http://www.asterisk.org"
11 SRC_URI="ftp://ftp.digium.com/pub/telephony/zaptel/old/zaptel-${PV}.tar.gz"
12
13 SLOT="0"
14 LICENSE="GPL-2"
15 KEYWORDS="~x86 ~ppc"
16
17 DEPEND="virtual/libc
18 virtual/linux-sources
19 >=dev-libs/newt-0.50.0"
20
21 pkg_setup() {
22 einfo "Please make sure that your kernel has the appropriate"
23 einfo "ppp support enabled or present as modules before merging"
24 einfo "e.g."
25 einfo "CONFIG_PPP=m"
26 einfo "CONFIG_PPP_ASYNC=m"
27 einfo "CONFIG_PPP_DEFLATE=m"
28 einfo "CONFIG_PPPOE=m"
29 einfo "Otherwise quit this ebuild, rebuild your kernel and reboot"
30
31 # show an nice warning message about zaptel not supporting devfs on 2.6
32 if [ $(echo $KV | cut -d. -f1) -eq 2 ] && [ $(echo $KV|cut -d. -f2) -eq 6 ]; then
33 echo
34 einfo "You're using zaptel with linux-2.6:"
35 ewarn " Zaptel doesn't support devfs with 2.6, your options:"
36 ewarn " * use udev and disable devfs"
37 ewarn " * use devfs and write a script that re-creates the necessary device nodes for you"
38 ewarn " * enable the devfs26 useflag (see below)"
39 ewarn ""
40 ewarn "There's an experimental patch which adds devfs support when using linux-2.6, but:"
41 ewarn " 1. It's an ugly hack atm and needs a cleanup..."
42 ewarn " 2. I was only abled to test loding / unloading with the ztd-eth driver..."
43 ewarn " 3. I _really_ don't know if it works with real hardware..."
44 eerror " 4. And more important: This is not officially supported by Digium / the Asterisk project!!!"
45 ewarn ""
46 ewarn "If you're still interested, abort now (ctrl+c) and enable the devfs26 USE-flag"
47 einfo "Feedback and bug-reports should go to: stkn@gentoo.org"
48 ewarn "You have been warned!"
49 echo
50 einfo "Sleeping 20 Seconds..."
51 epause 20
52 else
53 echo
54 einfo "Sleeping 10 Seconds..."
55 epause 10
56 fi
57 }
58
59 src_unpack() {
60 unpack ${A}
61
62 cd ${S}
63 # >= 1.0.3 requires new patch (-modulesd patch renamed to -gentoo)
64 epatch ${FILESDIR}/${PN}-1.0.3-gentoo.diff
65
66 # remove all from install target
67 sed -i -e "s#^\(install:\)[ \t]\+all[ \t]\+\(.*\)#\1 \2#" Makefile
68
69 # enable ztdummy...
70 sed -i -e "s:#\( ztdummy.*\):\1:" Makefile
71
72 # devfs support
73 if use devfs26; then
74 einfo "Enabling experimental devfs support for linux-2.6..."
75 epatch ${FILESDIR}/${PN}-1.0.0-experimental-devfs26.diff
76 fi
77
78 # apply patch for gcc-3.4.x if that's the compiler in use...
79 # fixes (#76707)
80 if use x86 && [[ `gcc-fullversion` = "3.4.3" ]]; then
81 epatch ${FILESDIR}/${P}-gcc34.patch
82 fi
83 }
84
85 src_compile() {
86 make ARCH=$(tc-arch-kernel) || die
87 }
88
89 src_install() {
90 make INSTALL_PREFIX=${D} install || die
91
92 dodoc ChangeLog README README.udev README.Linux26 README.fxsusb zaptel.init zaptel.sysconfig
93 dodoc zaptel.conf.sample LICENSE
94
95 # additional tools
96 dobin ztmonitor ztspeed zttest
97
98 # install init script
99 exeinto /etc/init.d
100 newexe ${FILESDIR}/zaptel.rc6 zaptel
101 insinto /etc/conf.d
102 newins ${FILESDIR}/zaptel.confd zaptel
103 }
104
105 pkg_postinst() {
106 if use devfs26; then
107 ewarn "*** Warning! ***"
108 ewarn "Devfs support for linux-2.6 is experimental and not"
109 ewarn "supported by digium or the asterisk project!"
110 echo
111 ewarn "Send bug-reports to: stkn@gentoo.org"
112 fi
113
114 echo
115 einfo "Use the /etc/init.d/zaptel script to load zaptel.conf settings on startup!"
116 }

  ViewVC Help
Powered by ViewVC 1.1.20