# # spec file for package dahdi-tools # # Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if 0%{?suse_version} < 1550 %bcond_without init %else %bcond_with init %endif Name: dahdi-tools Version: 3.1.0 Release: 5.10.70 #Release: 5.18 Summary: Tools for the Digium Asterisk Hardware Device Interface driver License: GPL-2.0 Group: Productivity/Telephony/Utilities URL: http://asterisk.org/ #DL-URL: http://downloads.asterisk.org/pub/telephony/dahdi-tools/ Source: http://downloads.asterisk.org/pub/telephony/dahdi-tools/%name-%version.tar.gz Source2: http://downloads.asterisk.org/pub/telephony/dahdi-tools/%name-%version.tar.gz.asc Source3: %name.keyring Source4: %name-rpmlintrc Source5: dahdi.init Source6: dahdi.sysconfig Patch1: dahdi-gcc47.diff Patch2: xpp-makefile.patch Patch3: dahdi-tools-fix-members.diff Patch4: dahdi-tools-fix-lto.patch # X-TENSIONS dahdi_hfcs patch eisfair Patch100: dahdi-tools-xtensions-dahdi-hfcs.patch BuildRequires: autoconf >= 2.59 BuildRequires: automake BuildRequires: bash-completion BuildRequires: dahdi-linux-devel >= 3.0.0 BuildRequires: libusb-devel BuildRequires: libtool BuildRequires: newt-devel BuildRequires: perl BuildRequires: pkgconf-pkg-config BuildRequires: wget BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(libxml-2.0) Requires(pre): %fillup_prereq %if %{with init} Requires(pre): %insserv_prereq %endif Requires: perl = %perl_version Requires: udev Recommends: sethdlc %if !0%{?_fillupdir:1} %define _fillupdir /var/adm/fillup-templates %endif %description This package contains configuration files, header files, and setup tools needed for the zapata telephony interface drivers. See %_datadir/doc/packages/dahdi/README for a list of supported hardware. %package -n libtonezone2_0 Summary: Tone zone database for the Tormenta ISA card License: LGPL-2.1 Group: Development/Libraries/Other %description -n libtonezone2_0 This package contains the shared libraries (.so) %package -n libtonezone-devel Summary: Development files for libtonezone License: LGPL-2.1 Group: Development/Libraries/C and C++ Requires: libtonezone2_0 = %version Provides: dahdi-tools-devel %description -n libtonezone-devel This package contains the header files and libraries necessary for developing applications which use zpatel. %prep %autosetup -p1 %build autoreconf -fi for i in %_datadir/automake*/install-sh; do cp "$i" . done %configure --disable-static --with-perllib="%perl_vendorlib" %make_build %install b="%buildroot" perl -pi -e "s/sitelib/vendorlib/g" xpp/Makefile %make_install make config DESTDIR="$b" make install-config DESTDIR="$b" rm -f "$b/%_libdir"/*.la # Install the init script and sysconfig file %if %{with init} install -D -m0755 "%{S:5}" "$b/%_initrddir/dahdi" ln -sf "%_sysconfdir/init.d/dahdi" "$b/%_sbindir/rcdahdi" install -D -m0644 "%{S:6}" "$b/%_fillupdir/sysconfig.dahdi" %endif touch "$b/%_sysconfdir/dahdi/modules" install -D -m0644 "system.conf.sample" "$b/%_sysconfdir/dahdi/system.conf" # remove deprecated files rm -Rf "$b/%_sysconfdir/hotplug" # The explanation in dahdi-tools/Makefile seems to contradict itself, # so just go with the fact that libtonezone1 is provided by zaptel/dahdi. rm -f "$b/%_libdir"/libtonezone.so.1* # No shared library has this SONAME, so delete this stray symlink. rm -f "$b/%_libdir/libtonezone.so.2" # Nothing in this file. If user wants options, he should define his own # file that is not tracked by rpm. rm -f "$b/%_sysconfdir/modprobe.d/dahdi.conf" mkdir -p "$b/%_prefix/lib" mv "$b/%_sysconfdir/udev" "$b/%_prefix/lib/" mkdir -p "$b/%_datadir/bash-completion/" mv "$b/etc/bash_completion.d" "$b/%_datadir/bash-completion/completions" # Drop outdated bundled version of sethdlc rm %buildroot/%_sbindir/sethdlc %preun %{stop_on_removal dahdi} %post %if %{with init} %{fillup_and_insserv dahdi} %else %{fillup_only dahdi} %endif %postun %if %{with init} %restart_on_update dahdi %insserv_cleanup %endif %post -n libtonezone2_0 -p /sbin/ldconfig %postun -n libtonezone2_0 -p /sbin/ldconfig %files %license LICENSE* %doc README %dir %_sysconfdir/dahdi %config %_sysconfdir/dahdi/*.sample %config %_sysconfdir/dahdi/init.conf %config %_sysconfdir/dahdi/genconf_parameters %config %_sysconfdir/dahdi/modules %config %_sysconfdir/dahdi/system.conf #config %%_sysconfdir/hotplug/usb/xpp_fxloader #config %%_sysconfdir/hotplug/usb/xpp_fxloader.usermap %dir %_sysconfdir/modprobe.d %config %_sysconfdir/modprobe.d/dahdi-blacklist.conf %if %{with init} %_initddir/dahdi %_fillupdir/sysconfig.dahdi %endif %perl_vendorlib/* %_sbindir/* %_mandir/man8/* %_datadir/dahdi/ %_datadir/bash-completion/completions/ %_prefix/lib/dracut/ %_prefix/lib/udev/ %files -n libtonezone2_0 %_libdir/libtonezone.so.2.0* %files -n libtonezone-devel %_includedir/dahdi/tonezone.h %_libdir/libtonezone.so %changelog * Fri Aug 27 2021 Martin Hauke - Add bcond for packaging of the old SysV init script. - Don't install the old init script on Tumbleweed systems. * Sun Jan 3 2021 Martin Hauke - Drop the bundled and outdated version of sethdlc and "Require:" the version from kernel.org that's maintained in a separate package instead. * Wed Dec 16 2020 Martin Hauke - Add patch: * dahdi-tools-fix-lto.patch * Sun Sep 6 2020 Jan Engelhardt - Trim old specfile constructs. * Thu Feb 6 2020 Hans-Peter Jansen - Update to new upstream release 3.1.0 * No changelog was provided * Fri Jul 26 2019 Hans-Peter Jansen - Apply dahdi-tools-fix-members.diff programming error, fails to compile with lto enabled otherwise - relocate bash-completion stub - minor clean ups - enable lto again * Thu Jul 25 2019 Hans-Peter Jansen - Disable lto in order to compile with Tumbleweed * Tue Jan 8 2019 Jan Engelhardt - Update to new upstream release 3.0.0 * No changelog was provided * Sat May 5 2018 hpj@urpla.net - use new _fillupdir macro * Mon Mar 21 2016 jamesp@vicidial.com - Update to new upstream release 2.11.1 * No changelog was found or provided - Create patch for XPP to generate man pages properly - Set PERLLIB to vendor perl for configure - Run install-config to generate default configs - Create empty /etc/dahdi/modules file - Change dahdi black file to dahdi-blacklist.conf - Install default system.conf for DAHDI * Thu Aug 13 2015 jengelh@inai.de - Update to new upstream release 2.10.2 * Tue Mar 17 2015 jengelh@inai.de - Update to new upstream release 2.10.1 * Mon Oct 13 2014 jengelh@inai.de - Update to new upstream release 2.10.0.1 * No changelog was provided * New option no-use-clear-halt * Sat Aug 23 2014 marcelloceschia@users.sourceforge.net - Update to new upstream release 2.10.0 to match DAHDI update * No changelog was provided * Thu Jun 19 2014 jamesp@vicidial.com - Update to new upstream release 2.9.1 to match DAHDI update * No changelog was provided * Thu Apr 10 2014 jamesp@vicidial.com - Update to new upstream release 2.9.0.1 * No changelog was provided * Tue Dec 24 2013 jengelh@inai.de - Update to new upstream release 2.8.0 * No changelog was provided * Thu Aug 15 2013 jengelh@inai.de - Update to new upstream release 2.7.0 * wcte13xp and the mISDN card modules hfcmulti, hfcpci and netjet have been added to the blacklist sample * Thu Feb 28 2013 jamesp@vicidial.com - Fixed a circular build dependency (dahdi-tools -> libpri-devel (libpri) -> libtonezone-devel (dahdi-tools)) by removing unnecessary libpri BuildRequire from dahdi-tools. * Mon Aug 27 2012 jamesp@vicidial.com - Add provides dahdi-tools-devel for older package compatibility * Mon Jun 25 2012 jengelh@inai.de - Update to new upstream release 2.6.1 * astribank: wait for udev to settle * update the product ID database with new USB devices * Mon Mar 12 2012 jengelh@medozas.de - Remove bogus patch (dahdi-tools-2.3.0-Makefile.patch) (bnc#750764) - Obsolete dahdi-tools-soname.diff and use original SONAME * Thu Dec 15 2011 jengelh@medozas.de - Update to new upstream release 2.6.0-rc1, changelog is at http://downloads.asterisk.org/pub/telephony/dahdi-tools/ChangeLog-2.6.0-rc1 * Mon Oct 10 2011 chris@computersalat.de - fix deps for SLE_10 * BuildReq dahdi-linux-devel * Mon Oct 3 2011 jengelh@medozas.de - Update to new upstream release 2.5.0.1, see http://downloads.asterisk.org/pub/telephony/dahdi-tools/ChangeLog-2.5.0.1 - Remove redundant sections; clear up BuildRequires - Add patch to fix wrong SO name - Give libtelezone its own devel package * Tue Mar 8 2011 chris@computersalat.de - update to 2.4.1 * /, xpp/perl_modules/Dahdi/Chans.pm, xpp/perl_modules/Dahdi/Config/Gen/System.pm: dahdi-perl: more left-over $span->xpd Replace the remaining $span->xpd with xpd_of_span(). Following up on r9648. Merged revisions 9731 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * xpp/perl_modules/Dahdi/Hardware/USB.pm, /: dahdi-perl: fix xpp driver in dahdi_hardware Don't require 'dahdi_hardware -v' to show the driver for a USB device. Only works when the usbfs is not used (when /proc/bus/usb is not mounted). Signed-off-by: Tzafrir Cohen Merged revisions 9699 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * /, xpp/perl_modules/Dahdi/Span.pm: dahdi-perl: left-over $span->xpd Replace one remaining $span->{XPD} with xpd_of_span(). Signed-off-by: Tzafrir Cohen Merged revisions 9648 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * /, xpp/perl_modules/Dahdi/Config/Gen/System.pm: dahdi_genconf: Don't generate configurations that use channel 16 on E1 CAS Attempting to use channel 16 on E1 CAS is disallowed since that channel is reserved for RBS signaling. Configurations should not be generated that attempt to use it. Closes DAHDI-763. Patch by dmartinez. Merged revisions 9485 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * /, xpp/xpp_fxloader: xpp_fxloader: Don't try to load FPGA firmware twice When called from udev to load the FPGA firmware, make sure that this is not the event generated for the first end-point of the existing two, as we need to talk with the second one. This is probably better done in the udev rules, but will be slightly more complicated to apply only to the FPGA loading and not to USB firmware loading. Merged revisions 9482 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * dahdi_scan.c, /: dahdi_scan: Show CAS framing on the framing line. Also, always append "/CRC4" on any span where that was specified as an option. Signed-off-by: Shaun Ruffell Acked-by: Kinsey Moore Merged revisions 9473 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * dahdi_scan.c, /: Fixed up the loss of crc4-multiframe alignment logic Loss of crc4-multiframe alignment on an E1 link is not a condition which brings the span down. The span will continue to run as long as it can maintain double frame alignment. Because of this, we cannot place the LMFA alarm in the usual spaninfo.alarms member, due to userspace programs using this as a catch-all for a span being up or down. We can detect the alarm by watching the frame error counter (fecount). If it continuously increments, the span is configured for crc4, and the span remains OK (alarms = 0), then we are in loss of crc4-multiframe state. In order to test this alarm, you'll need to synthesize a loss of crc4 alignment on the span. You can usually do this by configuring the local span to use crc4 and the remote end to not use crc4. I used the Fireberd 6000 in my lab to do this. dahdi-743 & dahdi-420 Acked-by: Shaun Ruffell Merged revisions 9458 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * xpp/perl_modules/Dahdi/Hardware/PCI.pm, /: Dahdi::Hardware: Support beroNet BN4S0e PCI Express card Add extra PCI IDs to support "beroNet BN4S0e PCI Express 4x S0 Karte". Origin: http://bugs.debian.org/600839 Merged revisions 9452 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * autoconfig.h.in, xpp/astribank_is_starting.c, /, configure, configure.ac: astribank_is_starting: use semop if no semtimedop astribank_is_starting should use a timeout for the semaphore, but if the GNU-specific semtimedop() is not available, we'll just fall back to using semop with no time out. Not as good, but better than nothing. (closes issue #16783) Reported by: abelbeck Merged revisions 9426 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * /, zonedata.c: tonezone: Add Macao,China to tone zone data Adding Macao tone zone data according to http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf (closes issue #17744) Reported by: alfredtang Patches: zonedata.patch uploaded by alfredtang (license 1094) Merged revisions 9313 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk - remove deprecated files from pkg o /etc/hotplug/usb/xpp_fxloader o /etc/hotplug/usb/xpp_fxloader.usermap - remove Author from description * Sat Nov 6 2010 chris@computersalat.de - fix init o fix status * Fri Nov 5 2010 toganm@opensuse.org - spelling correction in the dahdi.init description - add status option which shows if the modules are loaded or not * Thu Nov 4 2010 chris@computersalat.de - update to 2.4.0 o lot of changes please see ChangeLog file - rpmlint: shlib-fixed-dependency o remove explicit Requires from libtonezone2_0 * Wed Apr 21 2010 chris@computersalat.de - update to 2.3.0 * dahdi-tools version 2.3.0 released. * xpp/perl_modules/Dahdi/Hardware/USB.pm: Also detect USB devices connected on a hub. * xpp/perl_modules/Dahdi/Span.pm: Also detect type for Sangoma E1/T1 cards. * Makefile: dahdi_maint: install dahdi_maint on 'make install' * dahdi_maint.c: Add a space between words and correct an error message. * xpp/perl_modules/Dahdi/Hardware/PCI.pm: wcb4xxp - add Swyx 4xS0 SX2 QuadBri PCI IDs to dahdi-perl (issue #16493) Reported by: nic_bellamy * xpp/perl_modules/Dahdi/Hardware/PCI.pm: Some more wcb4xxp PCI IDs for Junghanns cards (issue #15446) (issue #16447) Reported by: lpistone Tested by: okrief - add Makefile patch o rename modprobe files dahdi.conf > dahdi dahdi.blacklist.conf > dahdi.blacklist * Sat Mar 27 2010 chris@computersalat.de - update to 2.2.1.1 * xpp/perl_modules/Dahdi/Hardware/PCI.pm: Added IDs for gen5 firmware * Fri Jan 22 2010 chris@computersalat.de - update to 2.2.1 * /, xpp/README.Astribank: Another round of updates to README.Astribank. zap->dahdi and others Merged revisions 7754 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * xpp/perl_modules/Dahdi/Hardware/USB.pm, /: dahdi-perl: only get 'serial' and 'devnum' attributes from Astribanks We can tell if a device is an Astribank by the vendorId and productId attribute. Get other attributed only after we give up on other devices. (closes issue #16552) Merged revisions 7558 via svnmerge from https://origsvn.digium.com/svn/dahdi/tools/trunk * /, xpp/xpp_fxloader: xpp_fxloader: adapt to newer kernels This commit prepares xpp_fxloader to get hotplug envirnment from newer kernel versions: * DEVICE will eventually be replaced with DEVNAME. Accept both (and look at DEVNAME first). * If we get DEVICE, we'll probably get an invalid path based at /proc/bus/usb . Fix it to use /dev/bus/usb . * While we're at it, allow using PRODUCT from the envirnment instead of from the command-line. This should allow fixing udev rules but will also work with existing rules in DAHDI-linux from trunk (for systems where they are valid). Merged revisions 7752 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * /, xpp/waitfor_xpds, xpp/twinstar_hook, xpp/xpp_fxloader: xpp: Comment-only changes: copyright, keywords Merged revisions 7463 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk * /, xpp/twinstar: Add perldoc for twinstar. This also avoids a bogus, empty twinstar.8 man page. Merged revisions 7219,7263 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk ........ r7219 | tzafrir | 2009-09-27 13:49:40 +0200 (Sun, 27 Sep 2009) | 5 lines xpp: install twinstar by default; Add a man page Add a man page to twinstar (as perl POD) and get it installed by default. ........ r7263 | tzafrir | 2009-09-29 22:45:50 +0200 (Tue, 29 Sep 2009) | 2 lines xpp: fix a typo in documentation ........ * README, /: Fix README for asciidoc 8.5.2 Tweak title a bit to avoid asciidoc consider it a header for a syntax block. Merged revisions 7792 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk - added ChangeLog, LICENSE*, README * Thu Jan 14 2010 chris@computersalat.de - include actual tarball version in package version - cleanup source o updated tarball to its upstream version * it is an rc release * Sat Jan 9 2010 chris@computersalat.de - added rpmlintrc file - fixed build-/deps * Mon Jan 4 2010 chris@computersalat.de - cleanup spec o added header o sorted TAGS o fixed deps o removed white spaces o lot of rpmlint stuff o moved changelog to changes file - cleanup source o removed -init tarball o added init/sysconfig as extra Source o added .changes file - libs to libs sub pkg * Mon Dec 21 2009 vittorio@vitsoft.bz - dahdi-tools 2.2.1 * Wed Jul 1 2009 vittorio@vitsoft.bz - dahdi-tools 2.2.0 * Wed Dec 10 2008 vittorio@vitsoft.bz - dahdi-tools 2.1.0 * Sat Oct 4 2008 vittorio@vitsoft.bz - dahdi-tools 2.0.0 * Mon Sep 8 2008 vittorio@vitsoft.bz - dahdi-tools 2.0.0 rc2