summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/zaptel')
-rw-r--r--net-misc/zaptel/ChangeLog8
-rw-r--r--net-misc/zaptel/files/digest-zaptel-1.2.109
-rw-r--r--net-misc/zaptel/files/digest-zaptel-1.2.9.11
-rw-r--r--net-misc/zaptel/files/zaptel-1.2.10-gentoo.diff104
-rw-r--r--net-misc/zaptel/zaptel-1.2.10.ebuild352
5 files changed, 473 insertions, 1 deletions
diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog
index d5fd4945d685..10fd3a3557a6 100644
--- a/net-misc/zaptel/ChangeLog
+++ b/net-misc/zaptel/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/zaptel
# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.82 2006/10/06 22:54:22 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.83 2006/11/07 20:09:34 gustavoz Exp $
+
+*zaptel-1.2.10 (07 Nov 2006)
+
+ 07 Nov 2006; Gustavo Zacarias <gustavoz@gentoo.org>
+ +files/zaptel-1.2.10-gentoo.diff, +zaptel-1.2.10.ebuild:
+ Revbump with fixes for #148374 and #154241
06 Oct 2006; Chris Gianelloni <wolf31o2@gentoo.org> zaptel-1.2.9.1.ebuild:
Stable on x86 wrt bug #144941.
diff --git a/net-misc/zaptel/files/digest-zaptel-1.2.10 b/net-misc/zaptel/files/digest-zaptel-1.2.10
new file mode 100644
index 000000000000..2b2ac12e48d2
--- /dev/null
+++ b/net-misc/zaptel/files/digest-zaptel-1.2.10
@@ -0,0 +1,9 @@
+MD5 9da38a78556eb09749d1f789a8a2631c bristuff-0.3.0-PRE-1v.tar.gz 267644
+RMD160 5c5f034d29f4156351a495f40c9c4b176f65e06e bristuff-0.3.0-PRE-1v.tar.gz 267644
+SHA256 91254dd6c71b74a5990df622b523d06c2f0399c6e47630e5155392c1598fd39e bristuff-0.3.0-PRE-1v.tar.gz 267644
+MD5 541b0a5910843d3c0b6a9de9467b9401 zaphfc_0.3.0-PRE-1o_florz-12.diff.gz 10736
+RMD160 b95d2301402e1108bc480ce0e66e87e3062eccf8 zaphfc_0.3.0-PRE-1o_florz-12.diff.gz 10736
+SHA256 04a8dd22d581b5d28d46a589d695f6eb634bf2bf355347a637fe2d560a63528c zaphfc_0.3.0-PRE-1o_florz-12.diff.gz 10736
+MD5 25f9a78272104efdbd44261e33edb725 zaptel-1.2.10.tar.gz 1258750
+RMD160 3e33a496127c78e52178a73255f6da55c2b9a5d2 zaptel-1.2.10.tar.gz 1258750
+SHA256 170a0c18efe2da3cd17946850c6249a9824f753d6705a27ffef47fb8e8a7f9d7 zaptel-1.2.10.tar.gz 1258750
diff --git a/net-misc/zaptel/files/digest-zaptel-1.2.9.1 b/net-misc/zaptel/files/digest-zaptel-1.2.9.1
index 9f4750b3466b..0e5dc7eddaa4 100644
--- a/net-misc/zaptel/files/digest-zaptel-1.2.9.1
+++ b/net-misc/zaptel/files/digest-zaptel-1.2.9.1
@@ -1,6 +1,7 @@
MD5 760eba19b03d03cd1dc8648d6239b4af bristuff-0.3.0-PRE-1s.tar.gz 265953
RMD160 8d3abdbbae4c376d52225395c72f4538e1f84a94 bristuff-0.3.0-PRE-1s.tar.gz 265953
SHA256 30adea4f070ed44d1952163e850c177f976857b96965e18844ccd492ccef968d bristuff-0.3.0-PRE-1s.tar.gz 265953
+MD5 541b0a5910843d3c0b6a9de9467b9401 zaphfc_0.3.0-PRE-1o_florz-12.diff.gz 10736
RMD160 b95d2301402e1108bc480ce0e66e87e3062eccf8 zaphfc_0.3.0-PRE-1o_florz-12.diff.gz 10736
SHA256 04a8dd22d581b5d28d46a589d695f6eb634bf2bf355347a637fe2d560a63528c zaphfc_0.3.0-PRE-1o_florz-12.diff.gz 10736
MD5 c2f5798196ac1b53f4161547cc4efb2c zaptel-1.2.9.1.tar.gz 1255412
diff --git a/net-misc/zaptel/files/zaptel-1.2.10-gentoo.diff b/net-misc/zaptel/files/zaptel-1.2.10-gentoo.diff
new file mode 100644
index 000000000000..ab4b77e3b440
--- /dev/null
+++ b/net-misc/zaptel/files/zaptel-1.2.10-gentoo.diff
@@ -0,0 +1,104 @@
+diff -Nura zaptel-1.2.10/build_tools/genmodconf zaptel-1.2.10.gentoo/build_tools/genmodconf
+--- zaptel-1.2.10/build_tools/genmodconf 2006-05-23 14:51:00.000000000 -0300
++++ zaptel-1.2.10.gentoo/build_tools/genmodconf 2006-11-07 16:50:50.334340709 -0300
+@@ -79,20 +79,6 @@
+
+ echo Building ${target}...
+
+-if [ "${1}" == "linux24" ]; then
+- for mod in ${3}; do
+- if ! grep -q "post-install ${mod} " ${target}; then
+- echo "post-install ${mod} /sbin/ztcfg" >> ${target}
+- fi
+- done
+-elif [ "${1}" == "linux26" ]; then
+- for mod in ${3}; do
+- if ! grep -q "install ${mod} " ${target}; then
+- echo "install ${mod} /sbin/modprobe --ignore-install ${mod} ${cmdopts} && /sbin/ztcfg" >> ${target}
+- fi
+- done
+-fi
+-
+ if ! grep -q "alias wcfxs" ${target}; then
+ echo "alias wcfxs wctdm" >> ${target};
+ fi;
+diff -Nura zaptel-1.2.10/build_tools/genudevrules zaptel-1.2.10.gentoo/build_tools/genudevrules
+--- zaptel-1.2.10/build_tools/genudevrules 2006-05-17 13:49:46.000000000 -0300
++++ zaptel-1.2.10.gentoo/build_tools/genudevrules 2006-11-07 16:50:50.335340457 -0300
+@@ -22,9 +22,9 @@
+
+ cat <<EOF
+ # zaptel devices with ownership/permissions for running as non-root
+-KERNEL${match}"zapctl", NAME="zap/ctl", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+-KERNEL${match}"zaptimer", NAME="zap/timer", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+-KERNEL${match}"zapchannel", NAME="zap/channel", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+-KERNEL${match}"zappseudo", NAME="zap/pseudo", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+-KERNEL${match}"zap[0-9]*", NAME="zap/%n", OWNER="asterisk", GROUP="asterisk", MODE="0660"
++KERNEL${match}"zapctl", NAME="zap/ctl", OWNER="root", GROUP="dialout", MODE="0660"
++KERNEL${match}"zaptimer", NAME="zap/timer", OWNER="root", GROUP="dialout", MODE="0660"
++KERNEL${match}"zapchannel", NAME="zap/channel", OWNER="root", GROUP="dialout", MODE="0660"
++KERNEL${match}"zappseudo", NAME="zap/pseudo", OWNER="root", GROUP="dialout", MODE="0660"
++KERNEL${match}"zap[0-9]*", NAME="zap/%n", OWNER="root", GROUP="dialout", MODE="0660"
+ EOF
+diff -Nura zaptel-1.2.10/Makefile zaptel-1.2.10.gentoo/Makefile
+--- zaptel-1.2.10/Makefile 2006-10-11 14:22:10.000000000 -0300
++++ zaptel-1.2.10.gentoo/Makefile 2006-11-07 16:52:46.910007121 -0300
+@@ -23,7 +23,7 @@
+ endif
+ KINCLUDES:=$(KSRC)/include
+
+-CFLAGS+=-I. -O4 -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
++CFLAGS+=-I. -Iinclude -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
+ CFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
+ CFLAGS_X86-64:=$(shell if uname -m | grep -q x86_64; then echo "-m64"; fi)
+ CFLAGS+=$(CFLAGS_PPC) $(CFLAGS_X86-64)
+@@ -300,7 +300,8 @@
+ done
+ else # DYNFS
+ ifdef UDEVRULES
+- build_tools/genudevrules > $(INSTALL_PREFIX)/etc/udev/rules.d/zaptel.rules
++ build_tools/genudevrules > zaptel.rules
++ install -D -m 644 zaptel.rules $(INSTALL_PREFIX)/etc/udev/rules.d/10-zaptel.rules
+ else # !UDEVRULES
+ @echo "**** Dynamic filesystem detected -- not creating device nodes"
+ endif
+@@ -315,7 +316,7 @@
+ tar -zxf mISDNuser.tar.gz
+ $(MAKE) -C mISDNuser install
+
+-install: all devices firmware
++install: devices firmware
+ install -D -m 755 ztcfg $(INSTALL_PREFIX)/sbin/ztcfg
+ if [ -f sethdlc-new ]; then \
+ install -D -m 755 sethdlc-new $(INSTALL_PREFIX)/sbin/sethdlc; \
+@@ -338,24 +339,21 @@
+ fi; \
+ rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/wcfxs.o
+ install -D -m 755 $(LIBTONEZONE_SO) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER)
+- [ `id -u` = 0 ] && /sbin/ldconfig || :
++ [ `id -u` = 0 ] && /sbin/ldconfig -n $(INSTALL_PREFIX)/usr/lib || :
+ rm -f $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
+ ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
+ $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER)
+ ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
+ $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
+- if [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled") ; then restorecon -v $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO); 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
+- install -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8
+- install -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8
+- [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
++ install -d $(INSTALL_PREFIX)/usr/share/man/man8
++ install -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8/
++ install -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8/
+ [ -f $(CONFIG_FILE) ] || install -D -m 644 zaptel.conf.sample $(CONFIG_FILE)
+- build_tools/genmodconf $(BUILDVER) "$(ROOT_PREFIX)" "$(filter-out zaptel,$(MODULES))"
+- @if [ -d /etc/modutils ]; then \
+- /sbin/update-modules ; \
+- fi
++ install -d -m 755 $(INSTALL_PREFIX)/etc/modules.d
++ build_tools/genmodconf $(BUILDVER) "$(INSTALL_PREFIX)" "$(filter-out zaptel,$(MODULES))"
+
+ install-udev: devices
+
diff --git a/net-misc/zaptel/zaptel-1.2.10.ebuild b/net-misc/zaptel/zaptel-1.2.10.ebuild
new file mode 100644
index 000000000000..baebdbbe56b7
--- /dev/null
+++ b/net-misc/zaptel/zaptel-1.2.10.ebuild
@@ -0,0 +1,352 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.10.ebuild,v 1.1 2006/11/07 20:09:34 gustavoz Exp $
+
+inherit toolchain-funcs eutils linux-mod
+
+## NOTE:
+#
+#
+
+BRI_VERSION="0.3.0-PRE-1v"
+FLORZ_VERSION="0.3.0-PRE-1o_florz-12"
+
+IUSE="bri ecmark ecmark2 ecmark3 ecaggressive eckb1 ecmg2 ecsteve ecsteve2 florz rtc ukcid watchdog zapras zapnet"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="Drivers for Digium and ZapataTelephony cards"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://ftp.digium.com/pub/zaptel/releases/${MY_P}.tar.gz
+ bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )
+ florz? ( http://www.netdomination.org/pub/asterisk/zaphfc_${FLORZ_VERSION}.diff.gz )"
+
+S="${WORKDIR}/${MY_P}"
+
+S_BRI="${WORKDIR}/bristuff-${BRI_VERSION}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="virtual/libc
+ virtual/linux-sources
+ >=dev-libs/newt-0.50.0"
+
+# list of echo canceller use flags,
+# first active in this list is selected (=order does matter)
+ZAP_EC_FLAGS="ecmark ecmark2 ecmark3 ecsteve ecsteve2 eckb1 ecmg2"
+
+### Begin: Helper functions
+
+select_echo_cancel() {
+ local myEC=""
+
+ for x in ${ZAP_EC_FLAGS}; do
+ if use $x; then
+ myEC=$(echo "$x" | sed -e "s:^ec::" | tr '[:lower:]' '[:upper:]')
+ break;
+ fi
+ done
+
+ echo ${myEC}
+}
+
+zconfig_disable() {
+ if grep -q "${1}" ${S}/zconfig.h; then
+ # match a little more than ${1} so we can use zconfig_disable
+ # to disable all echo cancellers in zconfig.h w/o calling it several times
+ sed -i -e "s:^[ \t]*#define[ \t]\+\(${1}[a-zA-Z0-9_-]*\).*:#undef \1:" \
+ ${S}/zconfig.h
+ fi
+
+ return $?
+}
+
+zconfig_enable() {
+ if grep -q "${1}" ${S}/zconfig.h; then
+ sed -i -e "s:^/\*[ \t]*#define[ \t]\+\(${1}\).*:#define \1:" \
+ -e "s:^[ \t]*#undef[ \t]\+\(${1}\).*:#define \1:" \
+ ${S}/zconfig.h
+ fi
+
+ return $?
+}
+
+### End: Helper functions
+
+pkg_setup() {
+ local result=0 numec=0
+
+ linux-mod_pkg_setup
+
+ einfo "Running pre-flight checks..."
+
+ # basic zaptel checks
+ if ! linux_chkconfig_present CRC_CCITT; then
+ echo
+ eerror "Your kernel lacks CRC_CCIT support!"
+ eerror "Enable CONFIG_CRC_CCIT!"
+ result=$((result+1))
+ fi
+
+ # check if multiple echo cancellers have been selected
+ for x in ${ZAP_EC_FLAGS}; do
+ use $x && numec=$((numec+1))
+ done
+ if [[ $numec -gt 1 ]]; then
+ # multiple flags are active, only the first in the ZAP_EC_FLAGS list
+ # will be used, make sure the user knows about this
+ echo
+ ewarn "Multiple echo canceller flags are active but only one will be used!"
+ ewarn "Selected: $(select_echo_cancel)"
+ fi
+
+ # we need at least HDLC generic support
+ if use zapnet && ! linux_chkconfig_present HDLC; then
+ echo
+ eerror "zapnet: Your kernel lacks HDLC support!"
+ eerror "zapnet: Enable CONFIG_HDLC* to use zaptel network support!"
+ result=$((result+1))
+ fi
+
+ # zapras needs PPP support
+ if use zapras && ! linux_chkconfig_present PPP; then
+ echo
+ eerror "zapras: Your kernel lacks PPP support!"
+ eerror "zapras: Enable CONFIG_PPP* to use zaptel ras support!"
+ result=$((result+1))
+ fi
+
+ # rtc needs linux-2.6 and CONFIG_RTC
+ if use rtc; then
+ if ! kernel_is 2 6; then
+ echo
+ eerror "rtc: >=Linux-2.6.0 is needed for rtc support!"
+ result=$((result+1))
+ fi
+
+ if ! linux_chkconfig_present RTC; then
+ eerror "rtc: Your kernel lacks RealTime-Clock support!"
+ result=$((result+1))
+ fi
+ fi
+
+ if [[ $result -gt 0 ]]; then
+ echo
+ ewarn "One or more of the neccessary precondition(s) is/are not met!"
+ ewarn "Look at the messages above, resolve the problem (or disable the use-flag) and try again"
+ echo
+
+ if [[ $result -lt 3 ]]; then
+ eerror "[$result Error(s)] Zaptel is not happy :("
+ else
+ eerror "[$result Error(s)] You're making zaptel cry :'("
+ fi
+ die "[$result] Precondition(s) not met"
+ fi
+
+ echo
+ einfo "Zaptel is happy and continues... :)"
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ epatch ${FILESDIR}/${P}-gentoo.diff
+ epatch ${FILESDIR}/zaptel-1.2.9.1-gcc411_is_a_retard-kbuild.patch
+ epatch ${FILESDIR}/zaptel-1.2.9.1-ar.patch
+
+ use ukcid && \
+ epatch ${FILESDIR}/${PN}-1.2.0-ukcid.patch
+
+ # try to apply bristuff patch
+ if use bri; then
+ # fix for userpriv
+ chmod -R a=rwX ${S_BRI}
+
+ einfo "Patching zaptel w/ BRI stuff (${BRI_VERSION})"
+ epatch ${S_BRI}/patches/zaptel.patch
+
+ cd ${S_BRI}
+
+ if use florz; then
+ einfo "Using florz patches (${FLORZ_VERSION}) for zaphfc"
+
+ # remove as soon as there's a new florz patch available
+ sed -i -e "s:zaptel-1\.2\.5:zaptel-1.2.6:g" \
+ ${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff
+
+ 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 \
+ cwain/cwain.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 \
+ cwain/Makefile
+
+ sed -i -e "s:^\(CFLAGS+=-I. \).*:\1 \$(ZAP):" \
+ zaphfc/Makefile
+
+ cd ${S}
+ fi
+
+### Configuration changes
+ local myEC
+
+ # prepare zconfig.h
+ myEC=$(select_echo_cancel)
+ if [[ -n "${myEC}" ]]; then
+ einfo "Selected echo canceller: ${myEC}"
+ # disable default first, set new selected ec afterwards
+ zconfig_disable ECHO_CAN
+ zconfig_enable ECHO_CAN_${myEC}
+ fi
+
+ # enable rtc support on 2.6
+ if use rtc && linux_chkconfig_present RTC && kernel_is 2 6; then
+ einfo "Enabling ztdummy RTC support"
+ zconfig_enable USE_RTC
+ fi
+
+ # enable agressive echo surpression
+ use ecaggressive && \
+ zconfig_enable AGGRESSIVE_SUPPRESSOR
+
+ # ppp ras support
+ use zapras && \
+ zconfig_enable CONFIG_ZAPATA_PPP
+
+ # frame relay, syncppp...
+ use zapnet && \
+ zconfig_enable CONFIG_ZAPATA_NET
+
+ # zaptel watchdog
+ use watchdog && \
+ zconfig_enable CONFIG_ZAPTEL_WATCHDOG
+}
+
+src_compile() {
+ # build
+ make KVERS=${KV_FULL} \
+ KSRC=${KV_DIR} ARCH=$(tc-arch-kernel) || die
+
+ if use bri; then
+ cd ${S_BRI}
+ for x in cwain qozap zaphfc; do
+ einfo "Building ${x}..."
+ make KVERS=${KV_FULL} \
+ KSRC=/usr/src/linux \
+ ARCH=$(tc-arch-kernel) \
+ -C ${x} || die "make ${x} failed"
+ done
+ fi
+}
+
+src_install() {
+ make INSTALL_PREFIX=${D} ARCH=$(tc-arch-kernel) \
+ KVERS=${KV_FULL} KSRC=/usr/src/linux 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 fxotune
+
+ # install all header files, several packages need the complete set
+ # (e.g. sangoma wanpipe)
+ insinto /usr/include/zaptel
+ doins *.h
+
+ if use bri; then
+ einfo "Installing bri"
+ cd ${S_BRI}
+
+ insinto /lib/modules/${KV_FULL}/misc
+ doins qozap/qozap.${KV_OBJ}
+ doins zaphfc/zaphfc.${KV_OBJ}
+ doins cwain/cwain.${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
+
+ docinto bristuff/qozap
+ dodoc qozap/LICENSE qozap/TODO qozap/*.conf*
+
+ docinto bristuff/zaphfc
+ dodoc zaphfc/LICENSE zaphfc/*.conf
+
+ docinto bristuff/cwain
+ dodoc cwain/TODO cwain/LICENSE
+
+ cd ${S}
+ fi
+
+ # install init script
+ newinitd ${FILESDIR}/zaptel.rc6 zaptel
+ newconfd ${FILESDIR}/zaptel.confd zaptel
+
+ # install devfsd rule file
+ insinto /etc/devfs.d
+ newins ${FILESDIR}/zaptel.devfsd zaptel
+
+ # install udev rule file
+ insinto /etc/udev/rules.d
+ newins ${FILESDIR}/zaptel.udevd 10-zaptel.rules
+
+ # fix permissions if there's no udev / devfs around
+ if [[ -d ${D}/dev/zap ]]; then
+ chown -R root:dialout ${D}/dev/zap
+ chmod -R u=rwX,g=rwX,o= ${D}/dev/zap
+ fi
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ echo
+ einfo "Use the /etc/init.d/zaptel script to load zaptel.conf settings on startup!"
+ echo
+
+ 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
+
+ # fix permissions if there's no udev / devfs around
+ if [[ -d ${ROOT}dev/zap ]]; then
+ chown -R root:dialout ${ROOT}dev/zap
+ chmod -R u=rwX,g=rwX,o= ${ROOT}dev/zap
+ fi
+}