summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/asterisk/ChangeLog8
-rw-r--r--net-misc/asterisk/asterisk-1.0.0.ebuild130
-rw-r--r--net-misc/asterisk/files/1.0.0/asterisk.confd9
-rw-r--r--net-misc/asterisk/files/1.0.0/asterisk.rc620
-rw-r--r--net-misc/asterisk/files/digest-asterisk-1.0.02
-rw-r--r--net-misc/zaptel/ChangeLog9
-rw-r--r--net-misc/zaptel/files/digest-zaptel-1.0.01
-rw-r--r--net-misc/zaptel/files/zaptel-1.0.0-experimental-devfs26.diff202
-rw-r--r--net-misc/zaptel/files/zaptel-1.0.0-modulesd.diff43
-rw-r--r--net-misc/zaptel/zaptel-1.0.0.ebuild119
10 files changed, 541 insertions, 2 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog
index bcd2030dda47..9ca6925cbaba 100644
--- a/net-misc/asterisk/ChangeLog
+++ b/net-misc/asterisk/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/asterisk
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.22 2004/07/30 00:03:51 stkn Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.23 2004/09/24 00:01:57 stkn Exp $
+
+*asterisk-1.0.0 (24 Sep 2004)
+
+ 24 Sep 2004; <stkn@gentoo.org> +files/1.0.0/asterisk.confd,
+ +files/1.0.0/asterisk.rc6, +asterisk-1.0.0.ebuild:
+ version bump, init script uses start-stop-daemon now
27 Jul 2004; Stefan Knoblich <stkn@gentoo.org> asterisk-0.9.0.ebuild:
stable on x86, removed obsolete iax dependency
diff --git a/net-misc/asterisk/asterisk-1.0.0.ebuild b/net-misc/asterisk/asterisk-1.0.0.ebuild
new file mode 100644
index 000000000000..12204e351cd1
--- /dev/null
+++ b/net-misc/asterisk/asterisk-1.0.0.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.0.ebuild,v 1.1 2004/09/24 00:01:57 stkn Exp $
+
+IUSE="alsa doc gtk mmx mysql nopri nozaptel"
+
+inherit eutils webapp-apache
+
+DESCRIPTION="Asterisk: A Modular Open Source PBX System"
+HOMEPAGE="http://www.asterisk.org/"
+SRC_URI="ftp://ftp.asterisk.org/pub/telephony/asterisk/${P}.tar.gz
+ ftp://ftp.asterisk.org/pub/telephony/asterisk/${PN}-sounds-${PV}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86"
+
+DEPEND="virtual/libc
+ media-sound/mpg123
+ dev-libs/newt
+ doc? ( app-doc/doxygen )
+ alsa? ( media-libs/alsa-lib )
+ mysql? ( dev-db/mysql )
+ gtk? ( =x11-libs/gtk+-1.2* )
+ !nopri? ( >=net-libs/libpri-1.0.0 )
+ !nozaptel? ( >=net-misc/zaptel-1.0.0
+ >=net-libs/zapata-1.0.0 )"
+
+pkg_setup() {
+ NO_WEBSERVER=0
+
+ webapp-detect || NO_WEBSERVER=1
+ webapp-pkg_setup "${NO_WEBSERVER}"
+ if [ $NO_WEBSERVER -eq 0 ]; then
+ einfo "Voicemail webapp will be installed into: ${ROOT}${HTTPD_ROOT}"
+ else
+ einfo "Skipping installation of Voicemail webapp"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+# epatch ${FILESDIR}/${PV}/${P}-makefile-fix.diff
+
+ # set cflags & mmx optimization
+ sed -i -e "s:^\(OPTIMIZE=\).*:\1 ${CFLAGS}:" Makefile
+
+ if use mmx; then
+ einfo "enabling mmx optimization"
+ sed -i -e "s:^#\(K6OPT.*\):\1:" Makefile
+ fi
+
+ # change image path in voicemail cgi
+ sed -i -e "s:^\(\$astpath = \).*:\1 \"/asterisk\";:" contrib/scripts/vmail.cgi
+}
+
+src_compile() {
+ # build asterisk first...
+ einfo "Building Asterisk..."
+ cd ${S}
+ emake -j1 || die "Make failed"
+}
+
+src_install() {
+ emake -j1 DESTDIR=${D} install || die "Make install failed"
+ emake -j1 DESTDIR=${D} samples || die "Make install samples failed"
+
+ # install addmailbox and astgenkey
+ dosbin contrib/scripts/addmailbox
+ dosbin contrib/scripts/astgenkey
+
+ # documentation
+ use doc && \
+ emake -j1 DESTDIR=${D} progdocs
+
+ # voicemail webapp
+ if [ $NO_WEBSERVER -eq 0 ]; then
+ einfo "Installing voicemail webapp"
+ insinto ${HTTPD_CGIBIN}
+ doins contrib/scripts/vmail.cgi
+ fperms 1755 ${HTTPD_CGIBIN}/vmail.cgi
+
+ insinto ${HTTPD_ROOT}/asterisk
+ for i in "images/*.gif"; do
+ doins $i
+ done
+ fi
+
+
+ # install necessary files
+ dodir /etc/env.d
+ echo "LD_LIBRARY_PATH=\"/usr/lib/asterisk\"" > ${D}/etc/env.d/25asterisk
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/${PV}/asterisk.rc6 asterisk
+
+ insinto /etc/conf.d
+ newins ${FILESDIR}/${PV}/asterisk.confd asterisk
+
+ # don't delete these, even if they are empty
+ keepdir /var/spool/asterisk/voicemail/default/1234/INBOX
+ keepdir /var/log/asterisk/cdr-csv
+
+ # install standard docs...
+ dodoc BUGS CREDITS LICENSE ChangeLog HARDWARE README README.fpm SECURITY
+
+ docinto scripts
+ dodoc contrib/scripts/*
+ docinto firmware/iax
+ dodoc contrib/firmware/iax/*
+
+ # install additional sounds...
+ einfo "Installing additional sounds..."
+ cd ${WORKDIR}/${PN}-sounds-${PV}
+ emake -j1 DESTDIR=${D} install || die "Make install failed"
+}
+
+pkg_postinst() {
+ einfo "Asterisk has been installed"
+ einfo ""
+ einfo "to add new Mailboxes use: /usr/sbin/addmailbox"
+ einfo ""
+ einfo "If you want to know more about asterisk, visit these sites:"
+ einfo "http://www.automated.it/guidetoasterisk.htm"
+ einfo "http://asterisk.xvoip.com/"
+ einfo "http://www.voip-info.org/wiki-Asterisk"
+ einfo "http://ns1.jnetdns.de/jn/relaunch/asterisk/"
+}
diff --git a/net-misc/asterisk/files/1.0.0/asterisk.confd b/net-misc/asterisk/files/1.0.0/asterisk.confd
new file mode 100644
index 000000000000..c025d64f3f0c
--- /dev/null
+++ b/net-misc/asterisk/files/1.0.0/asterisk.confd
@@ -0,0 +1,9 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.0.0/asterisk.confd,v 1.1 2004/09/24 00:01:57 stkn Exp $
+
+#
+# see "asterisk -h" for a list of options
+#
+
+OPTIONS=""
diff --git a/net-misc/asterisk/files/1.0.0/asterisk.rc6 b/net-misc/asterisk/files/1.0.0/asterisk.rc6
new file mode 100644
index 000000000000..758c81241032
--- /dev/null
+++ b/net-misc/asterisk/files/1.0.0/asterisk.rc6
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.0.0/asterisk.rc6,v 1.1 2004/09/24 00:01:57 stkn Exp $
+
+depend() {
+ need net logger
+}
+
+start() {
+ ebegin "Starting asterisk PBX"
+ start-stop-daemon --start --exec /usr/sbin/asterisk -- ${OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping asterisk PBX"
+ start-stop-daemon --stop --pidfile /var/run/asterisk.pid
+ eend $?
+}
diff --git a/net-misc/asterisk/files/digest-asterisk-1.0.0 b/net-misc/asterisk/files/digest-asterisk-1.0.0
new file mode 100644
index 000000000000..c652cb2804b7
--- /dev/null
+++ b/net-misc/asterisk/files/digest-asterisk-1.0.0
@@ -0,0 +1,2 @@
+MD5 7d14fb592d3922b5c16bb0423467a165 asterisk-1.0.0.tar.gz 9555336
+MD5 6f969ad544db7e222b01725c732b38a1 asterisk-sounds-1.0.0.tar.gz 1702227
diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog
index fbc2a05cfd52..ccd24f0a5758 100644
--- a/net-misc/zaptel/ChangeLog
+++ b/net-misc/zaptel/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/zaptel
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.14 2004/09/06 00:50:54 ciaranm Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.15 2004/09/23 23:57:02 stkn Exp $
+
+*zaptel-1.0.0 (24 Sep 2004)
+
+ 24 Sep 2004; <stkn@gentoo.org>
+ +files/zaptel-1.0.0-experimental-devfs26.diff,
+ +files/zaptel-1.0.0-modulesd.diff, +zaptel-1.0.0.ebuild:
+ version bump
06 Sep 2004; Ciaran McCreesh <ciaranm@gentoo.org> zaptel-0.7.0.ebuild,
zaptel-0.8.1.ebuild, zaptel-0.9.1.ebuild:
diff --git a/net-misc/zaptel/files/digest-zaptel-1.0.0 b/net-misc/zaptel/files/digest-zaptel-1.0.0
new file mode 100644
index 000000000000..1ae4460f487f
--- /dev/null
+++ b/net-misc/zaptel/files/digest-zaptel-1.0.0
@@ -0,0 +1 @@
+MD5 9088735d344cb79bb703a8d73e4ee0d3 zaptel-1.0.0.tar.gz 296584
diff --git a/net-misc/zaptel/files/zaptel-1.0.0-experimental-devfs26.diff b/net-misc/zaptel/files/zaptel-1.0.0-experimental-devfs26.diff
new file mode 100644
index 000000000000..1357661a5612
--- /dev/null
+++ b/net-misc/zaptel/files/zaptel-1.0.0-experimental-devfs26.diff
@@ -0,0 +1,202 @@
+--- zaptel-1.0.0/zaptel.c.orig 2004-09-11 17:48:45.000000000 +0200
++++ zaptel-1.0.0/zaptel.c 2004-09-24 00:41:48.856014048 +0200
+@@ -143,12 +143,14 @@
+
+ /* Here are a couple important little additions for devfs */
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ static devfs_handle_t zaptel_devfs_dir;
+ static devfs_handle_t channel;
+ static devfs_handle_t pseudo;
+ static devfs_handle_t ctl;
+ static devfs_handle_t timer;
+ #endif
++#endif
+
+ /* udev necessary data structures. Yeah! */
+ #ifdef CONFIG_ZAP_UDEV
+@@ -1087,6 +1089,7 @@
+ }
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ static devfs_handle_t register_devfs_channel(struct zt_chan *chan, devfs_handle_t dir)
+ {
+ char path[100];
+@@ -1129,6 +1132,28 @@
+
+ return chan_dev;
+ }
++#else
++static dev_t register_devfs_channel(struct zt_chan *chan, dev_t dir)
++{
++ char path[100];
++ char link[100];
++ dev_t chan_dev;
++ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
++
++ /* create /dev/zap/span%d/%d channel device node */
++ if ((chan_dev = devfs_mk_cdev(MKDEV(ZT_MAJOR, chan->channo), mode, "zap/span%d/%d", dir, chan->chanpos)) < 0) {
++ printk("zaptel: Something really bad happened. Unable to register devfs entry\n");
++ return 0;
++ }
++
++ /* link /dev/zap/span%d/%d -> /dev/zap/%d ?!? */
++ sprintf(path, "zap/span%d/%d", dir, chan->chanpos);
++ sprintf(link, "zap/%d", chan->chanpos);
++ devfs_mk_symlink(link, path);
++
++ return chan_dev;
++}
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+
+ static int zt_chan_reg(struct zt_chan *chan)
+@@ -4285,6 +4310,7 @@
+ #endif
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ {
+ char span_name[50];
+ sprintf(span_name, "span%d", span->spanno);
+@@ -4294,6 +4320,15 @@
+ chan->fhandle = register_devfs_channel(chan, chan->span->dhandle); /* Register our stuff with devfs */
+ }
+ }
++#else
++ {
++ devfs_mk_dir("zap/span%d", span->spanno);
++ for (x = 0; x < span->channels; x++) {
++ struct zt_chan *chan = &span->chans[x];
++ register_devfs_channel(chan, span->spanno); /* Register our stuff with devfs */
++ }
++ }
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+
+ #ifdef CONFIG_ZAP_UDEV
+@@ -4341,11 +4376,22 @@
+ remove_proc_entry(tempfile, NULL);
+ #endif /* CONFIG_PROC_FS */
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ for (x = 0; x < span->channels; x++) {
+ devfs_unregister(span->chans[x].fhandle);
+ devfs_unregister(span->chans[x].fhandle_symlink);
+ }
+ devfs_unregister(span->dhandle);
++#else
++ for (x = 0; x < span->channels; x++) {
++ /* remove symlink first */
++ devfs_remove("zap/span%d/%d", span->spanno, span->chans[x].chanpos);
++ /* remove channel device */
++ devfs_remove("zap/%d", span->chans[x].chanpos);
++ }
++ /* remove span dir */
++ devfs_remove("zap/span%d", span->spanno);
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+
+ #ifdef CONFIG_ZAP_UDEV
+@@ -6282,6 +6328,7 @@
+ #endif /* CONFIG_ZAP_UDEV */
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ {
+ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
+ devfs_register_chrdev(ZT_MAJOR, "zaptel", &zt_fops);
+@@ -6293,6 +6340,22 @@
+ ctl = devfs_register(zaptel_devfs_dir, "ctl", DEVFS_FL_DEFAULT, ZT_MAJOR, 0, mode, &zt_fops, NULL);
+ }
+ #else
++ {
++ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
++ if ((res = register_chrdev(ZT_MAJOR, "zaptel", &zt_fops)) < 0) {
++ printk(KERN_ERR "Unable to register for device on %d, error: %d\n", ZT_MAJOR, res);
++ return res;
++ }
++
++ devfs_mk_dir("zap");
++
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 253), mode, "zap/timer");
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 254), mode, "zap/channel");
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 255), mode, "zap/pseudo");
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 0), mode, "zap/ctl");
++ }
++#endif
++#else
+ if ((res = register_chrdev(ZT_MAJOR, "zaptel", &zt_fops))) {
+ printk(KERN_ERR "Unable to register tor device on %d\n", ZT_MAJOR);
+ return res;
+@@ -6323,6 +6386,7 @@
+ if (tone_zones[x])
+ kfree(tone_zones[x]);
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ devfs_unregister(timer);
+ devfs_unregister(channel);
+ devfs_unregister(pseudo);
+@@ -6338,6 +6402,16 @@
+ class_simple_destroy(zap_class);
+ #endif /* CONFIG_ZAP_UDEV */
+ unregister_chrdev(ZT_MAJOR, "zaptel");
++
++ devfs_remove("zap/timer");
++ devfs_remove("zap/ctl");
++ devfs_remove("zap/pseudo");
++ devfs_remove("zap/channel");
++
++ devfs_remove("zap");
++#endif
++#else
++ unregister_chrdev(ZT_MAJOR, "zaptel");
+ #endif
+ #ifdef CONFIG_ZAPTEL_WATCHDOG
+ watchdog_cleanup();
+--- zaptel-1.0.0/zaptel.h.orig 2004-09-11 17:48:45.000000000 +0200
++++ zaptel-1.0.0/zaptel.h 2004-09-24 00:40:26.169584296 +0200
+@@ -52,12 +52,7 @@
+ #include "fasthdlc.h"
+ #endif
+ #ifdef CONFIG_DEVFS_FS
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+ #include <linux/devfs_fs_kernel.h>
+-#else
+-#undef CONFIG_DEVFS_FS
+-//#warning "Zaptel doesn't support DEVFS in post 2.4 kernels. Disabling DEVFS in zaptel"
+-#endif
+ #endif /* CONFIG_DEVFS_FS */
+ #include <linux/ioctl.h>
+
+@@ -65,6 +60,8 @@
+ #define ELAST 500
+ #endif
+
++
++
+ /* Per-span configuration values */
+ #define ZT_CONFIG_TXLEVEL 7 /* bits 0-2 are tx level */
+
+@@ -1122,8 +1119,10 @@
+ #endif
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ devfs_handle_t fhandle; /* File handle in devfs for the channel */
+ devfs_handle_t fhandle_symlink;
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+ };
+
+@@ -1253,7 +1252,9 @@
+ int lastalarms; /* Previous alarms */
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ devfs_handle_t dhandle; /* Directory name */
++#endif
+ #endif
+ /* If the watchdog detects no received data, it will call the
+ watchdog routine */
diff --git a/net-misc/zaptel/files/zaptel-1.0.0-modulesd.diff b/net-misc/zaptel/files/zaptel-1.0.0-modulesd.diff
new file mode 100644
index 000000000000..3c9d2f8de4d1
--- /dev/null
+++ b/net-misc/zaptel/files/zaptel-1.0.0-modulesd.diff
@@ -0,0 +1,43 @@
+--- Makefile.orig 2004-05-03 01:10:37.392241008 +0200
++++ Makefile 2004-05-03 01:11:30.235207656 +0200
+@@ -33,7 +33,8 @@
+ INSTALL_PREFIX=
+
+ BUILDVER=$(shell if uname -r | grep -q ^2.6; then echo "linux26"; else echo "linux24"; fi)
+-MODCONF=$(shell if [ -d $(INSTALL_PREFIX)/etc/modprobe.d ]; then echo "$(INSTALL_PREFIX)/etc/modprobe.d/zaptel"; elif [ -d $(INSTALL_PREFIX)/etc/modutils ]; then echo "$(INSTALL_PREFIX)/etc/modutils/zaptel"; elif [ -f $(INSTALL_PREFIX)/etc/modprobe.conf ]; then echo "$(INSTALL_PREFIX)/etc/modprobe.conf"; elif [ -f $(INSTALL_PREFIX)/etc/modules.conf ]; then echo "$(INSTALL_PREFIX)/etc/modules.conf"; else echo $(INSTALL_PREFIX)/etc/conf.modules ; fi)
++# Patch for Gentoo, uses modules.d
++MODCONF=$(INSTALL_PREFIX)/etc/modules.d/zaptel
+
+ ifeq (${BUILDVER},linux24)
+ #We only support DEVFS in linux 2.4 kernels, since its considered obsolete post 2.4
+@@ -272,6 +273,7 @@
+ install -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include
+ ( cd $(INSTALL_PREFIX)/usr/lib ; rm -f libtonezone.so ; ln -sf $(LIBTONEZONE) libtonezone.so )
+ /sbin/ldconfig
++ mkdir -p $(INSTALL_PREFIX)/etc/modules.d
+ if [ -f $(MODCONF) ]; then mv -f $(MODCONF) $(MODCONF).bak ; fi
+ cat $(MODCONF).bak | grep -v "alias char-major-250" | \
+ grep -v "post-install torisa /sbin/ztcfg" | \
+@@ -296,10 +298,6 @@
+ fi; \
+ done
+
+- if [ -d /etc/modutils ]; then \
+- /sbin/update-modules ; \
+- fi
+- -/sbin/depmod -a
+ [ -f $(INSTALL_PREFIX)/etc/zaptel.conf ] || install -m 644 zaptel.conf.sample $(INSTALL_PREFIX)/etc/zaptel.conf
+
+ config:
+--- Makefile.orig 2004-05-03 01:16:52.352238424 +0200
++++ Makefile 2004-05-03 01:17:09.821582680 +0200
+@@ -64,8 +64,7 @@
+
+ linux26:
+ linux26: prereq $(BINS)
+- @if ! [ -d /usr/src/linux-2.6 ]; then echo "Link /usr/src/linux-2.6 to your kernel sources first!"; exit 1 ; fi
+- make -C /usr/src/linux-2.6 SUBDIRS=$(PWD) modules
++ make -C /usr/src/linux SUBDIRS=$(PWD) modules
+
+ obj-m := $(MODULESO)
+
diff --git a/net-misc/zaptel/zaptel-1.0.0.ebuild b/net-misc/zaptel/zaptel-1.0.0.ebuild
new file mode 100644
index 000000000000..143f237cc0fc
--- /dev/null
+++ b/net-misc/zaptel/zaptel-1.0.0.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.0.0.ebuild,v 1.1 2004/09/23 23:57:02 stkn Exp $
+
+IUSE="devfs26"
+
+inherit eutils
+
+DESCRIPTION="Pseudo-TDM engine"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="ftp://ftp.asterisk.org/pub/telephony/zaptel/zaptel-${PV}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~ppc"
+
+DEPEND="virtual/libc
+ virtual/linux-sources
+ >=dev-libs/newt-0.50.0"
+
+pkg_setup() {
+ einfo "Please make sure that your kernel has the appropriate"
+ einfo "ppp support enabled or present as modules before merging"
+ einfo "e.g."
+ einfo "CONFIG_PPP=m"
+ einfo "CONFIG_PPP_ASYNC=m"
+ einfo "CONFIG_PPP_DEFLATE=m"
+ einfo "CONFIG_PPPOE=m"
+ einfo "Otherwise quit this ebuild, rebuild your kernel and reboot"
+
+ # show an nice warning message about zaptel not supporting devfs on 2.6
+ if [ $(echo $KV | cut -d. -f1) -eq 2 ] && [ $(echo $KV|cut -d. -f2) -eq 6 ]; then
+ echo
+ einfo "You're using zaptel with linux-2.6:"
+ ewarn " Zaptel doesn't support devfs with 2.6, you'll need to use udev or disable devfs"
+ ewarn " or use devfs and write a script which re-creates the device nodes for you"
+ echo
+ ewarn "There's an experimental patch which adds devfs support when using linux-2.6, but:"
+ ewarn " 1. It's an ugly hack atm and needs a cleanup..."
+ ewarn " 2. I was only abled to test loding / unloading with the ztd-eth driver..."
+ ewarn " 3. I _really_ don't know if it works with real hardware..."
+ echo
+ eerror " 4. And more important: This is not officially supported by Digium / the Asterisk project!!!"
+ echo
+ ewarn "If you're still interested, abort now (ctrl+c) and enable the devfs26 USE-flag"
+ einfo "Feedback and bug-reports should go to: stkn@gentoo.org"
+ echo
+ ewarn "You have been warned!"
+
+ echo
+ einfo "Sleeping 20 Seconds..."
+ epause 20
+ else
+ echo
+ einfo "Sleeping 10 Seconds..."
+ epause 10
+ fi
+
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ # >= 0.9.1 requires new patch
+ epatch ${FILESDIR}/${P}-modulesd.diff
+
+ # remove all from install target
+ sed -i -e "s#^\(install:\)[ \t]\+all[ \t]\+\(.*\)#\1 \2#" Makefile
+
+ # enable ztdummy...
+ sed -i -e "s:#\( ztdummy.*\):\1:" Makefile
+
+ # devfs support
+ if use devfs26; then
+ einfo "Enabling experimental devfs support for linux-2.6..."
+ epatch ${FILESDIR}/${P}-experimental-devfs26.diff
+ fi
+}
+
+src_compile() {
+ # workaround for 2.6 build system
+ if [ $(echo $KV | cut -d. -f1) -eq 2 ] && [ $(echo $KV|cut -d. -f2) -eq 6 ]; then
+ einfo "Enabled 2.6 module building workaround..."
+ addwrite /usr/src/linux
+ fi
+
+ if use x86; then
+ make ARCH="i386" || die
+ else
+ make || die
+ fi
+}
+
+src_install() {
+ make INSTALL_PREFIX=${D} install || die
+
+ dodoc ChangeLog README README.udev README.Linux26 README.fxsusb zaptel.init zaptel.sysconfig
+ dodoc zaptel.conf.sample
+
+ # additional tools
+ dobin ztmonitor ztspeed zttest
+
+ # install init script
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/zaptel.rc6 zaptel
+ insinto /etc/conf.d
+ newins ${FILESDIR}/zaptel.confd zaptel
+}
+
+pkg_postinst() {
+ if use devfs26; then
+ ewarn "*** Warning! ***"
+ ewarn "Devfs support for linux-2.6 is experimental and not"
+ ewarn "supported by digium or the asterisk project!"
+ echo
+ ewarn "Send bug-reports to: stkn@gentoo.org"
+ fi
+}