[Pkg-voip-commits] r3851 - in zaptel/trunk/debian: . patches
tzafrir-guest at alioth.debian.org
tzafrir-guest at alioth.debian.org
Thu Jul 26 23:07:59 UTC 2007
Author: tzafrir-guest
Date: 2007-07-26 23:07:59 +0000 (Thu, 26 Jul 2007)
New Revision: 3851
Added:
zaptel/trunk/debian/patches/zaptel_perl.dpatch
zaptel/trunk/debian/zaptel.doc-base.astribank
zaptel/trunk/debian/zaptel.doc-base.readme
zaptel/trunk/debian/zaptel.doc-base.zaptel.conf
Modified:
zaptel/trunk/debian/changelog
zaptel/trunk/debian/control
zaptel/trunk/debian/docs
zaptel/trunk/debian/patches/00list
zaptel/trunk/debian/rules
zaptel/trunk/debian/zaptel.init
Log:
* zaptel_perl.dpatch: install perl modules to vendorlib rather than to
sitelib. This fixes the zaptel-perl utilities (e.g: zaptel_hardware).
* Build-depend on asciidoc to produce some package documentation.
* Mark doc-base documentation.
* Simplify Astribank initialization with zaptel-perl.
Modified: zaptel/trunk/debian/changelog
===================================================================
--- zaptel/trunk/debian/changelog 2007-07-26 17:38:14 UTC (rev 3850)
+++ zaptel/trunk/debian/changelog 2007-07-26 23:07:59 UTC (rev 3851)
@@ -1,8 +1,13 @@
zaptel (1:1.4.4~dfsg-2) UNRELEASED; urgency=low
* NOT RELEASED YET
+ * zaptel_perl.dpatch: install perl modules to vendorlib rather than to
+ sitelib. This fixes the zaptel-perl utilities (e.g: zaptel_hardware).
+ * Build-depend on asciidoc to produce some package documentation.
+ * Mark doc-base documentation.
+ * Simplify Astribank initialization with zaptel-perl.
- -- Mark Purcell <msp at debian.org> Wed, 18 Jul 2007 22:41:28 +0100
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Fri, 27 Jul 2007 02:04:11 +0300
zaptel (1:1.4.4~dfsg-1) unstable; urgency=low
Modified: zaptel/trunk/debian/control
===================================================================
--- zaptel/trunk/debian/control 2007-07-26 17:38:14 UTC (rev 3850)
+++ zaptel/trunk/debian/control 2007-07-26 23:07:59 UTC (rev 3851)
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
Uploaders: Kilian Krause <kilian at debian.org>, Jose Carlos Garcia Sogo <jsogo at debian.org>, Mark Purcell <msp at debian.org>, Santiago Garcia Mantinan <manty at debian.org>, Santiago Ruano Rincón <santiago at debian.org>, Tzafrir Cohen <tzafrir.cohen at xorcom.com>
-Build-Depends: debhelper (>= 5.0.37), libnewt-dev, dpatch (>= 2.0.9), bzip2, libusb-dev
+Build-Depends: debhelper (>= 5.0.37), libnewt-dev, dpatch (>= 2.0.9), bzip2, libusb-dev, asciidoc
Standards-Version: 3.7.2
XS-Vcs-Svn: svn://svn.debian.org/pkg-voip/
XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/
Modified: zaptel/trunk/debian/docs
===================================================================
--- zaptel/trunk/debian/docs 2007-07-26 17:38:14 UTC (rev 3850)
+++ zaptel/trunk/debian/docs 2007-07-26 23:07:59 UTC (rev 3851)
@@ -1,4 +1,5 @@
README
+README.html
README.fxotune
README.fxsusb
xpp/README.Astribank
Modified: zaptel/trunk/debian/patches/00list
===================================================================
--- zaptel/trunk/debian/patches/00list 2007-07-26 17:38:14 UTC (rev 3850)
+++ zaptel/trunk/debian/patches/00list 2007-07-26 23:07:59 UTC (rev 3851)
@@ -1,3 +1,4 @@
ztdiag
echocan_env
oslec_zaptel
+zaptel_perl
Copied: zaptel/trunk/debian/patches/zaptel_perl.dpatch (from rev 3773, zaptel1.2/trunk/debian/patches/zaptel_perl.dpatch)
===================================================================
--- zaptel/trunk/debian/patches/zaptel_perl.dpatch (rev 0)
+++ zaptel/trunk/debian/patches/zaptel_perl.dpatch 2007-07-26 23:07:59 UTC (rev 3851)
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## zaptel_perl.dpatch by Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Point Zaptel PERL modules to the right directory under
+## DP: which to install perl modules.
+
+ at DPATCH@
+diff -urNad zaptel1.2-1.2.18~dfsg~/xpp/utils/Makefile zaptel1.2-1.2.18~dfsg/xpp/utils/Makefile
+--- zaptel1.2-1.2.18~dfsg~/xpp/utils/Makefile 2007-05-17 22:34:32.000000000 +0300
++++ zaptel1.2-1.2.18~dfsg/xpp/utils/Makefile 2007-06-11 09:51:13.000000000 +0300
+@@ -24,7 +24,7 @@
+ MANDIR = $(mandir)/man8
+ HOTPLUG_USB_DIR = /etc/hotplug/usb
+ UDEV_RULES_DIR = /etc/udev/rules.d
+-PERLLIBDIR = $(shell eval `perl -V:sitelib`; echo "$$sitelib")
++PERLLIBDIR = $(shell eval `perl -V:vendorlib`; echo "$$vendorlib")
+ PERL_DIRS := Zaptel Zaptel/Hardware Zaptel/Xpp
+ PERL_MODS_PAT := *.pm $(PERL_DIRS:%=%/*.pm)
+ PERL_MODS := $(shell cd zconf; echo $(PERL_MODS_PAT))
Modified: zaptel/trunk/debian/rules
===================================================================
--- zaptel/trunk/debian/rules 2007-07-26 17:38:14 UTC (rev 3850)
+++ zaptel/trunk/debian/rules 2007-07-26 23:07:59 UTC (rev 3851)
@@ -83,8 +83,11 @@
| awk -F\" '{ print $$2"\t"$$4 }' \
>>$@
+README.html: README
+ $(MAKE) $@
+
build: build-stamp
-build-stamp: patch-stamp tonezones.txt
+build-stamp: patch-stamp tonezones.txt README.html
dh_testdir
./configure
@@ -102,6 +105,7 @@
# Add here commands to clean up after the build process.
rm -rf $(MOD_EXAMPLES_DIR)
rm -f tonezones.txt
+ rm -f README.html
rm -f $(GENERATED_SOURCES)
-$(MAKE) clean
Added: zaptel/trunk/debian/zaptel.doc-base.astribank
===================================================================
--- zaptel/trunk/debian/zaptel.doc-base.astribank (rev 0)
+++ zaptel/trunk/debian/zaptel.doc-base.astribank 2007-07-26 23:07:59 UTC (rev 3851)
@@ -0,0 +1,9 @@
+Document: zaptel.astribank
+Title: Xorcom Astribank Documentation
+Author: Tzafrir Cohen
+Abstract: Technical Documentation ofd the Xorcom Astribank
+Section: Comm
+
+Format: text
+Files: /usr/share/doc/zaptel/README.Astribank.gz
+
Added: zaptel/trunk/debian/zaptel.doc-base.readme
===================================================================
--- zaptel/trunk/debian/zaptel.doc-base.readme (rev 0)
+++ zaptel/trunk/debian/zaptel.doc-base.readme 2007-07-26 23:07:59 UTC (rev 3851)
@@ -0,0 +1,12 @@
+Document: zaptel
+Title: Zapata Telephony Interface Driver
+Author: Tzafrir Cohen
+Abstract: Basic documentation of the Zaptel telephony interface
+Section: Comm
+
+Format: HTML
+Files: /usr/share/doc/zaptel/README.html
+
+Format: text
+Files: /usr/share/doc/zaptel/README.gz
+
Added: zaptel/trunk/debian/zaptel.doc-base.zaptel.conf
===================================================================
--- zaptel/trunk/debian/zaptel.doc-base.zaptel.conf (rev 0)
+++ zaptel/trunk/debian/zaptel.doc-base.zaptel.conf 2007-07-26 23:07:59 UTC (rev 3851)
@@ -0,0 +1,10 @@
+Document: zaptel.conf
+Title: Reference Zaptel Configuration File
+Author: Zapata Telephony Project
+Abstract: A sample annotated zaptel.conf . This is the closest
+ thing to a reference for zaptel.conf (used by ztcfg(1) ).
+Section: Comm
+
+Format: text
+Files: /usr/share/doc/zaptel/examples/zaptel.conf.sample.gz
+
Modified: zaptel/trunk/debian/zaptel.init
===================================================================
--- zaptel/trunk/debian/zaptel.init 2007-07-26 17:38:14 UTC (rev 3850)
+++ zaptel/trunk/debian/zaptel.init 2007-07-26 23:07:59 UTC (rev 3851)
@@ -41,51 +41,23 @@
set -e
-zap_reg_xpp() {
- if [ ! -d /proc/xpp ]; then return; fi
-
- # Get a list of connected Astribank devices, sorted by the name of
- # the USB connector. That order is rather arbitrary, but will not
- # change without changes to the cabling.
- xbusses=`sort -k 2 /proc/xpp/xbuses | awk -F: '/STATUS=connected/ {print $1}'`
+# Initialize the Xorcom Astribank (xpp/) using perl utiliites:
+# intended to replace all the the three functions below if user has
+# installed the zaptel-perl utilities.
+xpp_startup() {
+ # do nothing if there are no astribank devices:
+ if ! grep -q connected /proc/xpp/xbuses 2>/dev/null; then return 0; fi
- # get a list of XPDs that were not yet registered as zaptel spans.
- # this will be the case if you set the parameter zap_autoreg=0 to
- # the module xpp
- # Append /dev/null to provide a valid file name in case of an empty pattern.
- xbusses_pattern=`echo $xbusses| sed -e 's|XBUS-[0-9]*|/proc/xpp/&/XPD-*/zt_registration|g'`' /dev/null'
- xpds_to_register=`grep -l 0 $xbusses_pattern 2>/dev/null` || true
- for file in $xpds_to_register; do
- echo 1 >$file
- done
-}
-
-fix_asterisbank_sync() {
- # do nothing if module not present
- if [ ! -d /proc/xpp ]; then return; fi
+ echo "Waiting for Astribank devices to initialize:"
+ cat /proc/xpp/XBUS-[0-9]*/waitfor_xpds 2>/dev/null || true
- #if ! grep -q '^HOST' /proc/xpp/sync 2>/dev/null; then return; fi
+ # overriding locales for the above two, as perl can be noisy
+ # when locales are missing.
+ # No register all the devices if they didn't auto-register:
+ LC_ALL=C zt_registration on
- case "$XPP_SYNC" in
- n*|N*) return;;
- host|HOST) sync_value="HOST";;
- [0-9]*)sync_value="$XPP_SYNC";;
- *)
- # find the number of the first bus, and sync from it:
- fxo_pat=`awk -F: '/STATUS=connected/{print $1}' /proc/xpp/xbuses | sed -e 's|.*|/proc/xpp/&/*/fxo_info|'`
- # find the first FXO unit, and set it as the sync master
- bus=`ls -1 $fxo_pat 2> /dev/null | head -n1 | cut -d- -f2 | cut -d/ -f1`
-
- # do nothing if there is no bus:
- case "$bus" in [0-9]*):;; *) return;; esac
- sync_value="$bus 0"
- ;;
- esac
- # the built-in echo of bash fails to print a proper error on failure
- if ! /bin/echo "$sync_value" >/proc/xpp/sync
- then
- echo >&2 "Updating XPP sync source failed (used XPP_SYNC='$XPP_SYNC')"
- fi
+ # this one could actually be run after ztcfg:
+ LC_ALL=C xpp_sync "$XPP_SYNC"
}
# recursively unload a module and its dependencies, if possible.
@@ -100,7 +72,8 @@
set -- $line
# $1: the original module, $2: size, $3: refcount, $4: deps list
mods=`echo $4 | tr , ' '`
- # xpd_fxs actually sort of depends on xpp:
+ # xpp_usb keeps the xpds below busy if an xpp hardware is
+ # connected. Hence must be removed before them:
case "$module" in xpd_*) mods="xpp_usb $mods";; esac
for mod in $mods; do
# run in a subshell, so it won't step over our vars:
@@ -110,17 +83,6 @@
set -e
}
-# sleep a while until the xpp modules fully register
-wait_for_xpp() {
- if [ -d /proc/xpp ] && \
- [ "`cat /sys/module/xpp/parameters/zap_autoreg`" = 'Y' ]
- then
- # wait for the XPDs to register:
- # TODO: improve error reporting and produce a messagee here
- cat /proc/xpp/XBUS-*/waitfor_xpds 2>/dev/null >/dev/null || true
- fi
-}
-
# this checks that:
# A. /dev/zap/pseudo exists (if devfs/udev is in use, it implies zaptel loaded)
# B. Readable to the user running this script. No poblem if run by root.
@@ -137,9 +99,7 @@
#do
# modprobe $module
#done
- wait_for_xpp
- zap_reg_xpp
- fix_asterisbank_sync
+ xpp_startup
# If there is no zaptel timing source, load
# ztdummy. Other modules should have been loaded by
More information about the Pkg-voip-commits
mailing list