Copy packaging from Subversion

This commit is contained in:
Tzafrir Cohen 2015-08-14 11:44:18 +02:00 committed by Tzafrir Cohen
parent 6057ef25e9
commit 0465400ea8
32 changed files with 1985 additions and 0 deletions

89
debian/README.Debian vendored Normal file
View File

@ -0,0 +1,89 @@
Echo Canceller
--------------
In DAHDI (software) echo cancellers are separate modules, that are
automatically loaded if their name is used in /etc/dahdi/system.conf .
dahdi_genconf, the configuration generator, thus defaults to creating a
system.conf with an echocanceller line for each channel. By default it is
'mg2' (the MG2 echo canceller) but this can be changed by setting
'echocanceller' (see the sample genconf_parameters file).
The Debian package of dahdi-linux is patched to include support of the
echo canceller OSLEC. Thus dahdi-tools has been patched accordingly to
make it the default echo canceller, and to remove 'echo' as well when
unloading modules.
However if you, for any strange reason, use a version of the DAHDI
kernel modules that does not include a working dahdi_echocan_oslec.ko,
just set in /etc/dahdi/genconf_parameters:
echo_can mg2
FXOTune
-------
FXOTune is a utility provided by Digium for fine-tuning parameters of the
FXO modules of their TDM cards and compatibles, as well as of those of the
Xorcom Astribank.
This package includes the fxotune utility. It will also load configuration
from /etc/fxotune.conf if fxotune was used to tune the FXO modules. Note
that fxotune will not work with X100P and similar cards.
Supported tone-zones
--------------------
DAHDI is capable of playing ring tone, buy tone etc. for a large variety of
countries. This is done using the loadzone and defaultzone settings in
system.conf. A list of tone-zones supported by DAHDI and libtonezone is
included in the file tonezones.txt in the documentation directory.
Example section of system.conf:
loadzone=us,uk,de
defaultzone=us
dahdi vs. dahdi-linux
---------------------
Upstream DAHDI is split to two parts: dahdi-linux are parts that are
supposed to be linux-specific, whereas dahdi-tools are supposed to be
generic utilities to use the DAHDI interface.
DAHDI-linux includes mostly kernel modules, but also udev rules, xpp
initialization scripts and firmwares (latter are stripped from the
Debian package). Those are included in the package dahdi-linux.
Most of the dahdi utilities, e.g. dahdi_cfg, dahdi_test, dahdi_monitor
and the dahdi-perl utilities are included in the package 'dahdi' that is
built from the source package dahdi-tools.
Automatic startup
-----------------
There is work in progress to start DAHDI devices automatically.
See also http://docs.tzafrir.org.il/dahdi-tools/#_initialization and for
the low-level description:
http://docs.tzafrir.org.il/dahdi-linux/#_span_assignments
The dahdi-linux package sets dahdi.auto_assigned_spans to 0 by default,
but the dahdi-tools should have the required scriptary in place to make
sure an upgrade will not break an existing system. That said, if your
system has more than one DAHDI device, you should create a
/etc/dahdi/assigned-spans.conf using 'dahdi_genconf assignedspan' (or
manually) rather than relying on any other ordering mechanism.
Much work has been put in place to make sure configurations
work as before if there are no changes. It is still recommended to create
a span-assignments file for your setup if you have more than one device:
dahdi_genconf assigedspans
The udev hook scripts run two main hooks:
* /usr/share/dahdi/dahdi_handle_device:
Run when a new DAHDI device is added or removed. Mainly to assign
spans.
* /usr/share/dahdi/dahdi_config_span:
Run when a new DAHDI span is added or removed. Mainly to configure
the new spans.
As you would expect, there are .d directories for the scripts and those
are places for your hooks, if needed.

3
debian/TODO.Debian vendored Normal file
View File

@ -0,0 +1,3 @@
* Transition from zaptel?
* Fix copyright
* xpp/README.Astribank.html

1255
debian/changelog vendored Normal file

File diff suppressed because it is too large Load Diff

5
debian/clean vendored Normal file
View File

@ -0,0 +1,5 @@
dahdi_tool
autoconfig.h
genconf_parameters.sample
version.c
debian/dahdi.udev

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

48
debian/control vendored Normal file
View File

@ -0,0 +1,48 @@
Source: dahdi-tools
Section: comm
Priority: optional
Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>
Uploaders: Tzafrir Cohen <tzafrir@debian.org>, Mark Purcell <msp@debian.org>
# groff, man-db and asciidoc are required for generating documentation
Build-Depends: debhelper (>= 9), autotools-dev,
dahdi-source (>= 1:2.7), libnewt-dev, bzip2, libusb-dev, asciidoc, groff, man-db
Standards-Version: 3.9.4
Homepage: http://www.asterisk.org/
Vcs-Svn: svn://anonscm.debian.org/pkg-voip/dahdi-tools/trunk/
Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-voip/dahdi-tools/
Package: dahdi
Architecture: linux-any
Multi-Arch: foreign
Depends: ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends}, procps, fxload, dahdi-linux, usbutils
Conflicts: zaptel
Replaces: zaptel
Description: utilities for using the DAHDI kernel modules
DAHDI (formly Zaptel) is an interface for telephony devices used by e.g.
the Asterisk PBX software. The dahdi-* packages provide the kernel
DAHDI kernel modules and their required setup environment.
.
This package includes userspace utilities required to configure DAHDI
modules.
Package: libtonezone2.0
Section: libs
Architecture: linux-any
Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: tonezone library (runtime)
A library for generating tones to be sent through the DAHDI telephony
interface.
.
This package contains the runtime library files.
Package: libtonezone-dev
Section: libdevel
Architecture: linux-any
Multi-Arch: same
Depends: libtonezone2.0 (= ${binary:Version}), ${misc:Depends}
Description: tonezone library (development)
A library for generating tones to be sent through the DAHDI telephony
interface.
.
This package contains the development files.

17
debian/control.modules.in vendored Normal file
View File

@ -0,0 +1,17 @@
Source: zaptel
Section: comm
Priority: extra
Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>
Uploaders: Kilian Krause <kk@verfaction.de>, Jose Carlos Garcia Sogo <jsogo@debian.org>, Mark Purcell <msp@debian.org>, Santiago Garcia Mantinan <manty@debian.org>, Santiago Ruano Rincon <santiago@unicauca.edu.co>
Build-Depends: debhelper (>> 3.0.0), bzip2
Standards-Version: 3.6.1.1
Package: zaptel-modules-_KVERS_
Architecture: any
Provides: zaptel-modules
Description: zaptel modules for Linux (kernel _KVERS_).
This package contains the set of loadable kernel modules for the
zapata telephony API.
This package contains the compiled kernel modules for _KVERS_
.
In order to compile these modules use the module-assistant utility.

114
debian/copyright vendored Normal file
View File

@ -0,0 +1,114 @@
This package was debianized by Tzafrir Cohen <tzafrir.cohen@xorcom.com> on
Tue, 26 Aug 2008 10:06:40 +0300
It was downloaded from
http://downloads.asterisk.org/pub/telephony/dahdi-tools/
Copyright: (from dahdi_cfg.c)
* Written by Mark Spencer <markster@digium.com>
* Based on previous works, designs, and architectures conceived and
* written by Jim Dixon <jim@lambdatel.com>.
*
* Copyright (C) 2001 Jim Dixon / Zapata Telephony.
* Copyright (C) 2001-2008 Digium, Inc.
*
* All rights reserved.
*
* Primary Author: Mark Spencer <markster@digium.com>
* Radio Support by Jim Dixon <jim@lambdatel.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2 as published by the
* Free Software Foundation. See the LICENSE file included with
* this program for more details.
On Debian systems, a copy of the GNU General Public License Version 2
may be found in /usr/share/common-licenses/GPL-2 .
Other Portions:
dahdi_monitor.c: * Copyright (C) 2001 Jim Dixon / Zapata Telephony.
dahdi_monitor.c: * Copyright (C) 2001-2008 Digium, Inc.
dahdi_scan.c: * Copyright (C) 2007 Digium, Inc.
dahdi_tool.c: * Copyright (C) 2001 Jim Dixon / Zapata Telephony.
dahdi_tool.c: * Copyright (C) 2001-2008 Digium, Inc.
sethdlc.c: * Copyright (C) 1999 - 2002 Krzysztof Halasa <khc@pm.waw.pl>
sethdlc.c: "Copyright (C) 2000 - 2003 Krzysztof Halasa <khc@pm.waw.pl>\n"
Files in the xpp/ subdirectory:
* Written by Oron Peled <oron@actcom.co.il>
* Copyright (C) 2004-2010, Xorcom
Perl programs and modules in the xpp/ directory:
# This program is free software; you can redistribute and/or
# modify it under the same terms as Perl itself.
Other scripts in the xpp directory:
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
Files in menuselect/:
menuselect is a GPLed program used in the build process of Asterisk and
other Digium programs. Thus expect to find the same on those packages,
and also not to find it in any binary package.
menuselect/Makefile:# Copyright (C) 2005-2008, Digium, Inc.
menuselect/menuselect.c: * Copyright (C) 2005 - 2006, Russell Bryant
menuselect/menuselect_curses.c: * Copyright (C) 2005 - 2006, Russell Bryant
menuselect/menuselect.h: * Copyright (C) 2005-2006, Russell Bryant
menuselect/menuselect_newt.c: * Copyright (C) 2008 Sean Bright
menuselect/menuselect_stub.c: * Copyright (C) 2005 - 2006, Russell Bryant
menuselect/missing:# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
menuselect/README:Copyright (C) 2005-2006, Digium, Inc.
menuselect/strcompat.c: * Copyright (C) 1999 - 2006, Digium, Inc.
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
Portions of menuselect/strcompat.c:
* Based on Code from bsd-asprintf from OpenSSH
* Copyright (c) 2004 Darren Tucker.
*
* Based originally on asprintf.c from OpenBSD:
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Files under menuselect/mxml/:
mxml is a minimal XML parsing library used by Asterisk and co. Likewise
used at build time for building menuselect above.
* Copyright 2003-2005 by Michael Sweet.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
On Debian systems, a copy of the GNU General Public License may be found in
/usr/share/common-licenses/GPL-2.

1
debian/dahdi.dirs vendored Normal file
View File

@ -0,0 +1 @@
etc/init.d

13
debian/dahdi.doc-base.astribank vendored Normal file
View File

@ -0,0 +1,13 @@
Document: dahdi.astribank
Title: Xorcom Astribank Documentation
Author: Tzafrir Cohen
Abstract: Technical Documentation of the Xorcom Astribank
Section: Network/Communication
Format: HTML
Index: /usr/share/doc/dahdi/README.Astribank.html
Files: /usr/share/doc/dahdi/README.Astribank.html
Format: text
Files: /usr/share/doc/dahdi/README.Astribank.gz

13
debian/dahdi.doc-base.readme vendored Normal file
View File

@ -0,0 +1,13 @@
Document: dahdi
Title: DAHDI Telephony Interface Driver
Author: Tzafrir Cohen
Abstract: Basic documentation of the DAHDI telephony interface
Section: Network/Communication
Format: HTML
Index: /usr/share/doc/dahdi/README.html
Files: /usr/share/doc/dahdi/README.html
Format: text
Files: /usr/share/doc/dahdi/README.gz

4
debian/dahdi.examples vendored Normal file
View File

@ -0,0 +1,4 @@
hotplug/span_config.d/50-asterisk
xpp/genconf_parameters
*.conf.sample
*.conf

4
debian/dahdi.install vendored Normal file
View File

@ -0,0 +1,4 @@
usr/sbin/*
usr/share/perl5/Dahdi*
usr/share/dahdi/*
usr/share/man/man8/*

1
debian/dahdi.lintian vendored Normal file
View File

@ -0,0 +1 @@
dahdi: mknod-in-maintainer-script postinst:16

5
debian/docs vendored Normal file
View File

@ -0,0 +1,5 @@
README
README.html
tonezones.txt
xpp/README.Astribank
README.Astribank.html

3
debian/libtonezone-dev.install vendored Normal file
View File

@ -0,0 +1,3 @@
usr/include/dahdi/tonezone.h
usr/lib/*/lib*.a
usr/lib/*/lib*.so

1
debian/libtonezone2.0.docs vendored Normal file
View File

@ -0,0 +1 @@
tonezones.txt

1
debian/libtonezone2.0.install vendored Normal file
View File

@ -0,0 +1 @@
usr/lib/*/lib*.so.2*

11
debian/libtonezone2.0.symbols vendored Normal file
View File

@ -0,0 +1,11 @@
libtonezone.so.2.0 libtonezone2.0 #MINVER#
builtin_zones@Base 1:2.2.1.1
dahdi_tools_version@Base 1:2.2.1.1
tone_zone_find@Base 1:2.2.1.1
tone_zone_find_by_num@Base 1:2.2.1.1
tone_zone_get_zone@Base 1:2.2.1.1
tone_zone_play_tone@Base 1:2.2.1.1
tone_zone_register@Base 1:2.2.1.1
tone_zone_register_zone@Base 1:2.2.1.1
tone_zone_set_zone@Base 1:2.2.1.1
tone_zone_tone_name@Base 1:2.2.1.1

71
debian/modulestest vendored Executable file
View File

@ -0,0 +1,71 @@
#!/bin/sh
# debian/modulestest: a postbuild script to build zaptel modules
# example usage:
#
# svn-buildpackage --svn-postbuild='debian/modulestest -r' --svn-ignore-new
# At least one of the following two must be set to a sensible value:
# If both are empty, the script does nothing useful)
#
# kernel versions: Comma-separated. Use those if you have their
# kernel-headers/linux-headers packages installed
#
# Full pathes to trees:
# Use this to provide a full path to a custom kernel tree:
#KERNEL_SOURCES=$HOME/Proj/Debs/Kernel/SwSusp/linux-2.6.15-rc5
KERNEL_HEADERS=
KERNEL_SOURCES=
# run module-asustant with environment params that will generate
# .changes files even without signing
MODASS="env SIGNCHANGES=1 DEBSIGNCOMMAND=not_an_executable m-a"
me=`basename $0`
# workaround for silly bash parsing issue in our build scripts:
if [ "$#" -lt 1 ]; then
set -- $MODULESTEST_ARGS
fi
while getopts ah:rs:t arg
do
case "$arg" in
a) # All of the kernel-headers packages installed:
KERNEL_HEADERS=`COLUMNS=160 dpkg -l 'kernel-headers-2.[46].*-*-*' | awk '/^.i/{print $2}' | sed -e 's/^kernel-headers-//'| xargs| tr ' ' ,`
;;
h) KERNEL_HEADERS=$OPTARG;;
s) KERNEL_SOURCES=$OPTARG;;
r) KERNEL_HEADERS=`uname -r`;;
t) # TODO: make this test per-distro or something
KERNEL_HEADERS=2.4.27-2-386,2.6.8-2-686-smp
;;
esac
done
shift $(( $OPTIND-1 ))
echo "Building for: Headers: $KERNEL_HEADERS, Sources: $KERNEL_SOURCES"
if [ "$KERNEL_HEADERS" != '' ]; then hdrs_sw="-l $KERNEL_HEADERS"; fi
if [ "$KERNEL_SOURCES" != '' ]; then srcs_sw="-k $KERNEL_SOURCES"; fi
# must be absolute for m-a ta accept TARBALL:
# Also note that $PWD is ugly and is about to be deleted. We need
# $PWD/..
TOP_DIR=`dirname $PWD`
MODS_DIR=$TOP_DIR/modules
TAR_BALL=$MODS_DIR/usr/src/zaptel.tar.bz2
DEB=$TOP_DIR/$PACKAGE-source_${TAG_VERSION}_all.deb
LOG_FILE=$TOP_DIR/$PACKAGE-modules-build-$TAG_VERSION.log
rm -f $LOG_FILE
dpkg -x $DEB $MODS_DIR
if [ "$hdrs_sw" != '' ]; then
TARBALL=$TAR_BALL $MODASS -u $TOP_DIR -t -i -f $hdrs_sw build $PACKAGE >>$LOG_FILE
fi
if [ "$srcs_sw" != '' ]; then
TARBALL=$TAR_BALL $MODASS -u $TOP_DIR -t -i -f $srcs_sw build $PACKAGE >>$LOG_FILE
fi
ls -l $TOP_DIR/$PACKAGE-modules-*_$TAG_VERSION+*.deb
echo "$me: Log file: $LOG_FILE"

31
debian/patches/debian-cflags.patch vendored Normal file
View File

@ -0,0 +1,31 @@
From: Tzafrir Cohen <tzafrir@debian.org>
Subject: Get hardening flags to some dahdi tools
--- a/Makefile
+++ b/Makefile
@@ -153,6 +153,7 @@ version.c: FORCE
tests: $(TEST_BINS)
$(UTILS): %: %.o
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
$(UTILS): version.o
@@ -163,7 +164,7 @@ $(UTILS): version.o
$(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
%: %.o
- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
prereq: config.status
@@ -177,7 +178,7 @@ $(LTZ_A): $(LTZ_A_OBJS)
ranlib $@
$(LTZ_SO): $(LTZ_SO_OBJS)
- $(CC) $(CFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ -lm
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ -lm
dahdi_cfg: $(LTZ_A)
dahdi_cfg: LIBS+=-lm -lpthread

21
debian/patches/echocan_oslec vendored Normal file
View File

@ -0,0 +1,21 @@
Subject: Make OSLEC the default DAHDI echo canceller
Author: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Forwarded: no
Our dahdi-linux packages provide OSLEC, which is generally a better echo
canceller than those included with DAHDI. Thus we should make it the
default echo canceller in generated configurations.
Debian-specific configuration tweak.
--- a/xpp/perl_modules/Dahdi/Config/Params.pm
+++ b/xpp/perl_modules/Dahdi/Config/Params.pm
@@ -111,7 +111,7 @@ sub item($$@) {
group_lines => '0',
brint_overlap => 'no',
bri_sig_style => 'bri_ptmp',
- echo_can => 'mg2',
+ echo_can => 'oslec',
bri_hardhdlc => 'auto',
pri_connection_type => 'PRI',
r2_idle_bits => '1101',

33
debian/patches/gcc5.patch vendored Normal file
View File

@ -0,0 +1,33 @@
From 5db44e215090e7d61602e206a09a4af394b022cb Mon Sep 17 00:00:00 2001
From: Russ Meyerriecks <rmeyerriecks@digium.com>
Date: Wed, 17 Jun 2015 11:36:16 -0500
Subject: [PATCH] xpp: Fix a logical not being applied to the wrong operand
gcc 5 found this with the new -Werror=logical-not-parenthesis warning. Since we
have -Wall by default, it would also fail the compile.
Internal-Issue-ID: DAHLIN-347
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
(cherry picked from commit 9a181ccfbcfa846aab20bd1dcbea8f83356e2705)
---
xpp/mpptalk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xpp/mpptalk.c b/xpp/mpptalk.c
index e49c3cd..9bab867 100644
--- a/xpp/mpptalk.c
+++ b/xpp/mpptalk.c
@@ -512,7 +512,7 @@ int mpp_send_seg(struct astribank_device *astribank, const uint8_t *data, uint16
assert(astribank != NULL);
xtalk_dev = astribank->xtalk_dev;
- if(!astribank->burn_state == BURN_STATE_STARTED) {
+ if(astribank->burn_state != BURN_STATE_STARTED) {
ERR("Tried to send a segment while burn_state=%d\n",
astribank->burn_state);
return -EINVAL;
--
2.1.4

26
debian/patches/init_unload_oslec vendored Normal file
View File

@ -0,0 +1,26 @@
Subject: also unload OSLEC (echo) on module unload
From: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Forwarded: no
This patch sets the DAHDI init.d script to also unload 'echo' (OSLEC)
in the 'stop' target. This adds to the default of unloading dahdi and
all of its dependent modules.
The package dahdi-linux includes 'echo' and with the default settings,
will attempts load 'echo', that does not depend on dahdi, and hence
will not be unloaded by default. Thus upgrading to a newer version (of
a newer build) may break.
This change will not be commited upstream, as OSLEC is not used there.
--- a/dahdi.init
+++ b/dahdi.init
@@ -40,7 +40,7 @@ DAHDI_DEV_TIMEOUT=20
# A list of modules to unload when stopping.
# All of their dependencies will be unloaded as well.
-DAHDI_UNLOAD_MODULES="dahdi"
+DAHDI_UNLOAD_MODULES="dahdi echo"
#
# Determine which kind of configuration we're using

97
debian/patches/perl_diet vendored Normal file
View File

@ -0,0 +1,97 @@
Remove the dependency on the module File::Basename.
This provides the ability to run the scripts using a local modules
directory. While that ability is very handy with the source distribution
and in testing environments, it is useless on a Debian package.
It is removed in a (currently still failed) attempt to remove the
dependency on perl and depend on perl-base alone.
--- a/xpp/dahdi.cgi
+++ b/xpp/dahdi.cgi
@@ -6,8 +6,6 @@
# modify it under the same terms as Perl itself.
use strict;
-use File::Basename;
-BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/perl_modules"); }
use CGI::Pretty qw/:standard start_ul start_li start_div start_pre/;
use Dahdi;
--- a/xpp/dahdi_drivers
+++ b/xpp/dahdi_drivers
@@ -1,7 +1,5 @@
#! /usr/bin/perl -w
use strict;
-use File::Basename;
-BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/perl_modules"); }
use Dahdi::Hardware;
--- a/xpp/dahdi_genconf
+++ b/xpp/dahdi_genconf
@@ -8,8 +8,6 @@
# $Id: dahdi_genconf 5440 2008-12-05 00:24:09Z tzafrir $
#
use strict;
-use File::Basename;
-BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/perl_modules"); }
use Dahdi;
use Dahdi::Hardware;
--- a/xpp/dahdi_hardware
+++ b/xpp/dahdi_hardware
@@ -8,9 +8,7 @@
# $Id: dahdi_hardware 4484 2008-06-29 16:57:48Z tzafrir $
#
use strict;
-use File::Basename;
use Getopt::Std;
-BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/perl_modules"); }
use Dahdi;
use Dahdi::Span;
--- a/xpp/dahdi_registration
+++ b/xpp/dahdi_registration
@@ -8,8 +8,6 @@
# $Id: dahdi_registration 4533 2008-07-03 08:22:02Z tzafrir $
#
use strict;
-use File::Basename;
-BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/perl_modules"); }
use Dahdi;
use Dahdi::Span;
--- a/xpp/lsdahdi
+++ b/xpp/lsdahdi
@@ -8,8 +8,6 @@
# $Id: lsdahdi 4764 2008-08-12 10:21:53Z tzafrir $
#
use strict;
-use File::Basename;
-BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/perl_modules"); }
use Dahdi;
use Dahdi::Span;
--- a/xpp/xpp_blink
+++ b/xpp/xpp_blink
@@ -8,8 +8,6 @@
# $Id: xpp_blink 4416 2008-06-19 17:34:36Z tzafrir $
#
use strict;
-use File::Basename;
-BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/perl_modules"); }
use Dahdi;
use Dahdi::Span;
--- a/xpp/xpp_sync
+++ b/xpp/xpp_sync
@@ -8,8 +8,6 @@
# $Id: xpp_sync 4484 2008-06-29 16:57:48Z tzafrir $
#
use strict;
-use File::Basename;
-BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/perl_modules"); }
use Dahdi::Xpp;
use Dahdi::Xpp::Xbus;

16
debian/patches/remove_dahdi_speed vendored Normal file
View File

@ -0,0 +1,16 @@
Author: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Description: Remove the useless utility dahdi_speed
It was useful long ago, but pointless now.
--- a/Makefile
+++ b/Makefile
@@ -98,7 +98,7 @@ UTILS += patgen pattest patlooptest hdl
hdlcverify timertest dahdi_maint
-BINS:=fxotune dahdi_cfg dahdi_monitor dahdi_speed dahdi_test dahdi_scan dahdi_maint
+BINS:=fxotune dahdi_cfg dahdi_monitor dahdi_test dahdi_scan dahdi_maint
ifeq (1,$(PBX_NEWT))
BINS += dahdi_tool
endif

6
debian/patches/series vendored Normal file
View File

@ -0,0 +1,6 @@
zaptel_perl
echocan_oslec
init_unload_oslec
remove_dahdi_speed
debian-cflags.patch
gcc5.patch

17
debian/patches/udev_owener vendored Normal file
View File

@ -0,0 +1,17 @@
Description: proper dahdi permissions as in Debian
Author: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
In Debian DAHDI devices are owned by root:comm rather than
asterisk:asterisk.
Note that those rules are duplication of the rules in dahdi-linux. But
this file is probably a better place for them.
--- a/dahdi.rules
+++ b/dahdi.rules
@@ -1,4 +1,4 @@
# DAHDI devices with ownership/permissions for running as non-root
-SUBSYSTEM=="dahdi", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+SUBSYSTEM=="dahdi", GROUP="comm", MODE="0660"
SUBSYSTEM=="dahdi_devices", RUN="/usr/share/dahdi/handle_device"
SUBSYSTEM=="dahdi_spans", RUN="/usr/share/dahdi/span_config"

22
debian/patches/zaptel_perl vendored Executable file
View File

@ -0,0 +1,22 @@
Subject: Set perl installation path to vendorlib
Author: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Forwarded: no
Point Zaptel PERL modules to the right directory under which to install
perl modules.
(sitelib in Debian is under /usr/local. We don't want to install there)
Debian-specific configuration.
--- a/xpp/Makefile
+++ b/xpp/Makefile
@@ -30,7 +30,7 @@ SBINDIR = $(prefix)/sbin
DATADIR = $(datadir)/dahdi
MANDIR = $(mandir)/man8
HOTPLUG_USB_DIR = $(sysconfdir)/hotplug/usb
-PERLLIBDIR := $(shell eval `perl -V:sitelib`; echo "$$sitelib")
+PERLLIBDIR := $(shell eval `perl -V:vendorlib`; echo "$$vendorlib")
PERL_DIRS := $(shell cd perl_modules; find * -name '[A-Z]*' -type d| xargs)
PERL_MODS_PAT := *.pm $(PERL_DIRS:%=%/*.pm)
PERL_MODS := $(shell cd perl_modules; echo $(PERL_MODS_PAT))

51
debian/rules vendored Executable file
View File

@ -0,0 +1,51 @@
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
PREFIX:=dahdi
PACKAGE_SRC:=$(PREFIX)-tools
DEBVERSION:=$(shell head -n 1 debian/changelog \
| sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
DEB_BASE_VERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//')
UPVERSION:=$(shell echo $(DEB_BASE_VERSION) | sed -e 's/~dfsg\(~\|$$\)/\1/' -e 's/~\(rc\|beta\)/-\1/')
UPFILENAME := $(PACKAGE_SRC)_$(UPVERSION).orig.tar.gz
FILENAME := $(PACKAGE_SRC)_$(DEB_BASE_VERSION).orig.tar.gz
URL := http://downloads.asterisk.org/pub/telephony/$(PACKAGE_SRC)/releases/$(PACKAGE_SRC)-$(UPVERSION).tar.gz
%:
dh $@ --wth autotools_dev
override_dh_auto_configure:
dh_auto_configure -- --enable-pinned
override_dh_auto_build:
$(MAKE) programs docs
# FIXME: xpp/README.Astribank.html
cp dahdi.rules debian/dahdi.udev
override_dh_auto_install:
# also run the 'config' target, in addition to the 'install' target:
dh_auto_install -- config
rm $(CURDIR)/debian/tmp/usr/share/dahdi/span_config.d/50-asterisk
print-version:
@@echo "Debian version: $(DEBVERSION)"
@@echo "Upstream version: $(UPVERSION)"
TARBALL_DIR=../tarballs/zaptel-$(UPVERSION).tmp
get-orig-source:
@@dh_testdir
@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
@@echo Downloading $(UPFILENAME) from $(URL) ...
@@wget -nv -T10 -t3 --verbose -O ../tarballs/$(FILENAME) $(URL)

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

4
debian/watch vendored Normal file
View File

@ -0,0 +1,4 @@
version=3
opts=uversionmangle=s/-rc/\~rc/; \
http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-(.*)\.tar\.gz\
debian svn-upgrade