diff options
author | Stefan Knoblich <stkn@gentoo.org> | 2004-12-19 00:16:42 +0000 |
---|---|---|
committer | Stefan Knoblich <stkn@gentoo.org> | 2004-12-19 00:16:42 +0000 |
commit | bf4992bbfc4d987b196cdad2b4a92289929c764b (patch) | |
tree | 479c162a27cb7f70d6999f7818e52b420b2271c1 /net-misc/zaptel | |
parent | Initial import. Go duck! Fixes #74818. (Manifest recommit) (diff) | |
download | gentoo-2-bf4992bbfc4d987b196cdad2b4a92289929c764b.tar.gz gentoo-2-bf4992bbfc4d987b196cdad2b4a92289929c764b.tar.bz2 gentoo-2-bf4992bbfc4d987b196cdad2b4a92289929c764b.zip |
new version, see changelog for details
Diffstat (limited to 'net-misc/zaptel')
-rw-r--r-- | net-misc/zaptel/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/zaptel/files/digest-zaptel-1.0.3 | 1 | ||||
-rw-r--r-- | net-misc/zaptel/files/zaptel-1.0.3-gentoo.diff | 65 | ||||
-rw-r--r-- | net-misc/zaptel/zaptel-1.0.3.ebuild | 110 |
4 files changed, 184 insertions, 1 deletions
diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog index 04270667eabd..1b7cbfcd8553 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.18 2004/11/10 02:53:40 stkn Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.19 2004/12/19 00:16:42 stkn Exp $ + +*zaptel-1.0.3 (19 Dec 2004) + + 19 Dec 2004; Stefan Knoblich <stkn@gentoo.org> + +files/zaptel-1.0.3-gentoo.diff, +zaptel-1.0.3.ebuild: + new version, changes: /etc/modules.d/zaptel cleanup, users will have to + use the zaptel init-script to load settings (or run /sbin/ztcfg manually) *zaptel-1.0.2 (10 Nov 2004) diff --git a/net-misc/zaptel/files/digest-zaptel-1.0.3 b/net-misc/zaptel/files/digest-zaptel-1.0.3 new file mode 100644 index 000000000000..9d54fa51df8c --- /dev/null +++ b/net-misc/zaptel/files/digest-zaptel-1.0.3 @@ -0,0 +1 @@ +MD5 6d6063f2181fc55ed4a240ccc1984933 zaptel-1.0.3.tar.gz 315184 diff --git a/net-misc/zaptel/files/zaptel-1.0.3-gentoo.diff b/net-misc/zaptel/files/zaptel-1.0.3-gentoo.diff new file mode 100644 index 000000000000..ef124759c3e1 --- /dev/null +++ b/net-misc/zaptel/files/zaptel-1.0.3-gentoo.diff @@ -0,0 +1,65 @@ +--- zaptel-1.0.3/Makefile.orig 2004-12-19 00:45:36.697309064 +0100 ++++ zaptel-1.0.3/Makefile 2004-12-19 00:48:07.578371656 +0100 +@@ -19,7 +19,7 @@ + CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) + CFLAGS+=$(shell if uname -m | grep -q x86_64; then echo "-m64"; fi) + LCFLAGS=-fPIC $(CFLAGS) -DBUILDING_TONEZONE +-KFLAGS+=-I/usr/src/linux-2.4/include -O6 ++KFLAGS+=-I/usr/src/linux/include -O6 + KFLAGS+=-DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I/usr/src/linux/drivers/net \ + -Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I/usr/src/linux/drivers/net/wan -I /usr/src/linux/include -I/usr/src/linux/include/net + KFLAGS+=$(shell [ -f $(KINCLUDES)/linux/modversions.h ] && echo "-DMODVERSIONS -include $(KINCLUDES)/linux/modversions.h") +@@ -39,7 +39,8 @@ + CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\" + + BUILDVER=$(shell if uname -r | grep -q ^2.6; then echo "linux26"; else echo "linux24"; fi) +-MODCONF=$(shell if [ -d $(ROOT_PREFIX)/etc/modprobe.d ]; then echo "$(ROOT_PREFIX)/etc/modprobe.d/zaptel"; elif [ -d $(ROOT_PREFIX)/etc/modutils ]; then echo "$(ROOT_PREFIX)/etc/modutils/zaptel"; elif [ -f $(ROOT_PREFIX)/etc/modprobe.conf ]; then echo "$(ROOT_PREFIX)/etc/modprobe.conf"; elif [ -f $(ROOT_PREFIX)/etc/modules.conf ]; then echo "$(ROOT_PREFIX)/etc/modules.conf"; else echo $(ROOT_PREFIX)/etc/conf.modules ; fi) ++# Gentoo uses /etc/modules.d/zaptel ++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 +@@ -286,7 +287,7 @@ + install -D -m 644 torisa.h $(INSTALL_PREFIX)/usr/include/linux/torisa.h + install -D -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include/tonezone.h + ( cd $(INSTALL_PREFIX)/usr/lib ; rm -f libtonezone.so ; ln -sf $(LIBTONEZONE) libtonezone.so ) +- [ `id -u` = 0 ] && /sbin/ldconfig || : ++ if [ ! -d `dirname $(MODCONF)` ]; then install -d -m 755 `dirname $(MODCONF)` ; fi + 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" | \ +@@ -298,23 +299,7 @@ + if ! grep "alias char-major-196" $(MODCONF); then \ + echo "alias char-major-196 $(PRIMARY)" >> $(MODCONF); \ + fi +- +- for x in $(MODULES); do \ +- if ! grep "post-install $$x" $(MODCONF); then \ +- if ! grep "install $$x " $(MODCONF); then \ +- if [ "$$x" != "zaptel" ] ; then \ +- if [ -f zaptel.ko ]; then echo "install $$x /sbin/modprobe --ignore-install $$x && /sbin/ztcfg" >> $(MODCONF); \ +- else echo "post-install $$x /sbin/ztcfg" >> $(MODCONF); \ +- fi; \ +- fi; \ +- fi; \ +- fi; \ +- done + +- if [ -d /etc/modutils ]; then \ +- /sbin/update-modules ; \ +- fi +- [ `id -u` = 0 ] && /sbin/depmod -a || : + [ -f $(CONFIG_FILE) ] || install -D -m 644 zaptel.conf.sample $(CONFIG_FILE) + + config: +--- zaptel-1.0.3/Makefile.orig 2004-12-19 00:58:31.599506024 +0100 ++++ zaptel-1.0.3/Makefile 2004-12-19 01:00:45.109209464 +0100 +@@ -15,7 +15,7 @@ + HOSTCC=gcc + KINCLUDES=$(shell if [ -d /usr/src/linux-2.4/include ]; then echo /usr/src/linux-2.4/include ; else echo /usr/src/linux/include ; fi) + +-CFLAGS+=-I. -O4 -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER ++CFLAGS+=-I. -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER + CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) + CFLAGS+=$(shell if uname -m | grep -q x86_64; then echo "-m64"; fi) + LCFLAGS=-fPIC $(CFLAGS) -DBUILDING_TONEZONE diff --git a/net-misc/zaptel/zaptel-1.0.3.ebuild b/net-misc/zaptel/zaptel-1.0.3.ebuild new file mode 100644 index 000000000000..a60b31ccf27f --- /dev/null +++ b/net-misc/zaptel/zaptel-1.0.3.ebuild @@ -0,0 +1,110 @@ +# 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.3.ebuild,v 1.1 2004/12/19 00:16:42 stkn Exp $ + +IUSE="devfs26" + +inherit eutils kernel-mod + +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" + ewarn "" + 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..." + eerror " 4. And more important: This is not officially supported by Digium / the Asterisk project!!!" + ewarn "" + 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" + 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} + # >= 1.0.3 requires new patch (-modulesd patch renamed to -gentoo) + epatch ${FILESDIR}/${PN}-1.0.3-gentoo.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}/${PN}-1.0.0-experimental-devfs26.diff + fi +} + +src_compile() { + set_arch_to_kernel + make || die + set_arch_to_portage +} + +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 LICENSE + + # 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 + + echo + einfo "Use the /etc/init.d/zaptel script to load zaptel.conf settings on startup!" +} |