diff options
author | Stefan Knoblich <stkn@gentoo.org> | 2005-03-21 00:44:58 +0000 |
---|---|---|
committer | Stefan Knoblich <stkn@gentoo.org> | 2005-03-21 00:44:58 +0000 |
commit | 1f272192944eca37eb34b98355199157b3691fd5 (patch) | |
tree | 60ef84af6ea9ee836da0718aea12436250867e08 /net-misc/zaptel | |
parent | Fix DEPEND so mod_ssl-2.8.21 will work with <=apache-1.3.33-r1. (diff) | |
download | gentoo-2-1f272192944eca37eb34b98355199157b3691fd5.tar.gz gentoo-2-1f272192944eca37eb34b98355199157b3691fd5.tar.bz2 gentoo-2-1f272192944eca37eb34b98355199157b3691fd5.zip |
Version bump and fix for #85052
(Portage version: 2.0.51.19)
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.7 | 3 | ||||
-rw-r--r-- | net-misc/zaptel/files/zaptel-1.0.7-gentoo.diff | 91 | ||||
-rw-r--r-- | net-misc/zaptel/zaptel-1.0.7.ebuild | 211 |
4 files changed, 313 insertions, 1 deletions
diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog index 752bad2849b5..3c235bc9e39c 100644 --- a/net-misc/zaptel/ChangeLog +++ b/net-misc/zaptel/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/zaptel # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.35 2005/03/18 14:35:39 chrb Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.36 2005/03/21 00:44:58 stkn Exp $ + +*zaptel-1.0.7 (21 Mar 2005) + + 21 Mar 2005; Stefan Knoblich <stkn@gentoo.org> + +files/zaptel-1.0.7-gentoo.diff, +zaptel-1.0.7.ebuild: + Version bump and moved some sed lines into the patch. Removed + selinux line in Makefile to fix #85052. 18 Mar 2005; Chris Bainbridge <chrb@gentoo.org> zaptel-1.0.6.ebuild: Add missing call to linux-mod_pkg_postinst diff --git a/net-misc/zaptel/files/digest-zaptel-1.0.7 b/net-misc/zaptel/files/digest-zaptel-1.0.7 new file mode 100644 index 000000000000..78d43d0998b0 --- /dev/null +++ b/net-misc/zaptel/files/digest-zaptel-1.0.7 @@ -0,0 +1,3 @@ +MD5 d043f54f38b6262ab3cd5599982a7032 zaptel-1.0.7.tar.gz 316693 +MD5 b07d5f949b90677a2925ba2dd50593cb bristuff-0.2.0-RC7k.tar.gz 114265 +MD5 510ab7103516fd574fd5f38db2a08c81 zaphfc_0.2.0-RC7j_florz-4.diff.gz 10204 diff --git a/net-misc/zaptel/files/zaptel-1.0.7-gentoo.diff b/net-misc/zaptel/files/zaptel-1.0.7-gentoo.diff new file mode 100644 index 000000000000..13740a62e037 --- /dev/null +++ b/net-misc/zaptel/files/zaptel-1.0.7-gentoo.diff @@ -0,0 +1,91 @@ +--- zaptel-1.0.7/Makefile.orig 2005-03-20 23:08:04.803610656 +0000 ++++ zaptel-1.0.7/Makefile 2005-03-20 23:10:24.390390240 +0000 +@@ -13,13 +13,13 @@ + # (assuming He's running Linux -- which we all know He must). + # + 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) ++KINCLUDES=/usr/src/linux/include + +-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 +-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 if [ -f $(KINCLUDES)/linux/modversions.h ] ; then echo "-DMODVERSIONS -include $(KINCLUDES)/linux/modversions.h" ; fi) +@@ -39,7 +39,7 @@ + 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) ++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 +@@ -54,7 +54,7 @@ + TZOBJS=zonedata.lo tonezone.lo + LIBTONEZONE=libtonezone.so.1.0 + MODULES=zaptel tor2 torisa wcusb wcfxo wcfxs \ +- ztdynamic ztd-eth wct1xxp wct4xxp wcte11xp # ztdummy ++ ztdynamic ztd-eth wct1xxp wct4xxp wcte11xp ztdummy + #MODULES+=wcfxsusb + + MODULESO=$(shell for x in $(MODULES); do echo "$$x.o "; done ) +@@ -255,7 +255,7 @@ + @echo "**** If you are running udev, read README.udev" + endif + +-install: all devices $(LIBTONEZONE) ++install: devices $(LIBTONEZONE) + install -D -m 755 ztcfg $(INSTALL_PREFIX)/sbin/ztcfg + if [ -f sethdlc-new ]; then \ + install -D -m 755 sethdlc-new $(INSTALL_PREFIX)/sbin/sethdlc; \ +@@ -281,43 +281,21 @@ + fi + + install -D -m 755 $(LIBTONEZONE) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE) +- if [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled") ; then restorecon -v $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE); fi + install -D -m 644 zaptel.h $(INSTALL_PREFIX)/usr/include/linux/zaptel.h + 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 [ -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" | \ +- grep -v "post-install wcfxsusb /sbin/ztcfg" | \ +- grep -v "post-install wcfxs /sbin/ztcfg" > $(MODCONF) || true ++ if [ ! -d `dirname $(MODCONF)` ]; then install -d -m 755 `dirname $(MODCONF)` ; fi + if ! grep "options torisa" $(MODCONF); then \ + echo "options torisa base=$(BASEADDR)" >> $(MODCONF); \ + fi + 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 ! grep "alias wctdm" $(MODCONF); then \ + echo "alias wctdm wcfxs" >> $(MODCONF); \ + fi \ + +- 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: diff --git a/net-misc/zaptel/zaptel-1.0.7.ebuild b/net-misc/zaptel/zaptel-1.0.7.ebuild new file mode 100644 index 000000000000..734cae501cb1 --- /dev/null +++ b/net-misc/zaptel/zaptel-1.0.7.ebuild @@ -0,0 +1,211 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.0.7.ebuild,v 1.1 2005/03/21 00:44:58 stkn Exp $ + +IUSE="devfs26 bri florz" + +inherit toolchain-funcs eutils linux-mod + +BRI_VERSION="0.2.0-RC7k" +FLORZ_VERSION="0.2.0-RC7j_florz-4" + +DESCRIPTION="Drivers for Digium and ZapataTelephony cards" +HOMEPAGE="http://www.asterisk.org" +SRC_URI="ftp://ftp.asterisk.org/pub/telephony/zaptel/zaptel-${PV}.tar.gz + bri? http://www.junghanns.net/asterisk/downloads/bristuff-${BRI_VERSION}.tar.gz + florz? http://zaphfc.florz.dyndns.org/zaphfc_${FLORZ_VERSION}.diff.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86 ~ppc ~amd64" + +DEPEND="virtual/libc + virtual/linux-sources + >=dev-libs/newt-0.50.0" + +pkg_setup() { + linux-mod_pkg_setup + + # show an nice warning message about zaptel not supporting devfs on 2.6 + if kernel_is 2 6 && linux_chkconfig_present DEVFS_FS ; then + echo + einfo "You're using a 2.6 kernel with DEVFS." + einfo "The Zaptel drivers won't work unless you either:" + einfo " * switch to udev" + einfo " * write a script that re-creates the necessary device nodes for you" + einfo " * enable the devfs26 useflag (see below)" + einfo "" + einfo "There's an experimental patch which adds devfs support when using linux-2.6, but:" + einfo " 1. It's an ugly hack atm and needs a cleanup..." + einfo " 2. I was only abled to test loding / unloading with the ztd-eth driver..." + einfo " 3. I _really_ don't know if it works with real hardware..." + einfo " 4. It disables udev support to avoid conflicts" + eerror " 5. And more important: This is not officially supported by Digium / the Asterisk project!" + einfo "" + einfo "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" + einfo "You have been warned!" + echo + einfo "Sleeping 20 Seconds..." + epause 20 + fi +} + +src_unpack() { + unpack ${A} + + cd ${S} + # >= 1.0.7 requires new patch (-modulesd patch renamed to -gentoo) + epatch ${FILESDIR}/${PN}-1.0.7-gentoo.diff + + # devfs support + if use devfs26; then + einfo "Enabling experimental devfs support for linux-2.6..." + epatch ${FILESDIR}/${PN}-1.0.4-experimental-devfs26.diff + + # disable udev + sed -i -e "s:#define[\t ]\+\(CONFIG_ZAP_UDEV\):#undef \1:" \ + zconfig.h + fi + + # apply patch for gcc-3.4.x if that's the compiler in use... + # fixes (#76707) + if use x86 && [[ `gcc-fullversion` = "3.4.3" ]]; then + epatch ${FILESDIR}/${PN}-1.0.4-gcc34.patch + fi + + # try to apply bristuff patch + if use bri; then + einfo "Patching zaptel w/ BRI stuff (${BRI_VERSION})" + epatch ${FILESDIR}/zaptel-bristuff-${BRI_VERSION}.patch + + cd ${WORKDIR}/bristuff-${BRI_VERSION} + + if use florz; then + einfo "Using florz patches (${FLORZ_VERSION}) for zaphfc" + epatch ${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff + fi + + # patch includes + sed -i -e "s:^#include.*zaptel\.h.*:#include <zaptel.h>:" \ + qozap/qozap.c \ + zaphfc/zaphfc.c + + # patch makefiles + sed -i -e "s:^ZAP[\t ]*=.*:ZAP=-I${S}:" \ + -e "s:^MODCONF=.*:MODCONF=/etc/modules.d/zaptel:" \ + -e "s:linux-2.6:linux:g" \ + qozap/Makefile \ + zaphfc/Makefile + + sed -i -e "s:^\(CFLAGS+=-I. \).*:\1 \$(ZAP):" \ + zaphfc/Makefile + fi + + # replace `uname -r` with ${KV_FULL} in all Makefiles + find ${WORKDIR} -iname "Makefile" -exec sed -i -e "s:\`uname -r\`:${KV_FULL}:g" {} \; +} + +src_compile() { + # TODO: bristuff modules + + set_arch_to_kernel + make KERNEL_SOURCE=/usr/src/linux || die + + if use bri; then + cd ${WORKDIR}/bristuff-${BRI_VERSION} + make -C qozap || die + make -C zaphfc || die + fi + set_arch_to_portage +} + +src_install() { + make INSTALL_PREFIX=${D} install || die + + dodoc ChangeLog README README.udev README.Linux26 README.fxsusb zaptel.init + dodoc zaptel.conf.sample LICENSE zaptel.sysconfig + + # additional tools + dobin ztmonitor ztspeed zttest + + if use bri; then + einfo "Installing bri" + cd ${WORKDIR}/bristuff-${BRI_VERSION} + + insinto /lib/modules/${KV_FULL}/misc + doins qozap/qozap.${KV_OBJ} + doins zaphfc/zaphfc.${KV_OBJ} + + # install example configs for octoBRI and quadBRI + insinto /etc + doins qozap/zaptel.conf.octoBRI + newins qozap/zaptel.conf zaptel.conf.quadBRI + newins zaphfc/zaptel.conf zaptel.conf.zaphfc + + insinto /etc/asterisk + doins qozap/zapata.conf.octoBRI + newins qozap/zapata.conf zapata.conf.quadBRI + newins zaphfc/zapata.conf zapata.conf.zaphfc + + docinto bristuff + dodoc CHANGES INSTALL README-ZAPHFC-USERS.1st + + docinto bristuff/qozap + dodoc qozap/LICENSE qozap/TODO qozap/*.conf* + + docinto bristuff/zaphfc + dodoc zaphfc/LICENSE zaphfc/*.conf + fi + + # install init script + exeinto /etc/init.d + newexe ${FILESDIR}/zaptel.rc6 zaptel + insinto /etc/conf.d + newins ${FILESDIR}/zaptel.confd zaptel +} + +pkg_postinst() { + linux-mod_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!" + echo + + # devfs26 disables udev ... so don't nag users + if ! use devfs26; then +# FIXME!! Can we (we should) do this automatically + einfo "If you're using udev add the following to" + einfo "/etc/udev/rules.d/50-udev.rules (as in README.udev):" + einfo "# Section for zaptel device" + einfo "KERNEL=\"zapctl\", NAME=\"zap/ctl\"" + einfo "KERNEL=\"zaptimer\", NAME=\"zap/timer\"" + einfo "KERNEL=\"zapchannel\", NAME=\"zap/channel\"" + einfo "KERNEL=\"zappseudo\", NAME=\"zap/pseudo\"" + einfo "KERNEL=\"zap[0-9]*\", NAME=\"zap/%n\"" + echo + fi + + if use bri; then + einfo "Bristuff configs have been merged as:" + einfo "" + einfo "${ROOT}etc/" + einfo " zaptel.conf.zaphfc" + einfo " zaptel.conf.quadBRI" + einfo " zaptel.conf.octoBRI" + einfo "" + einfo "${ROOT}etc/asterisk/" + einfo " zapata.conf.zaphfc" + einfo " zapata.conf.quadBRI" + einfo " zapata.conf.octoBRI" + echo + fi +} |