%bcond_without xpp %bcond_without udev %bcond_without firmware %bcond_without hdlc %kmdl zaptel Summary: Digium FXS/FXO drivers Name: zaptel Version: 1.4.12.1 Release: 56%{?dist} Epoch: 1 License: GPL Group: Applications/Internet URL: http://www.asterisk.org/ Source0: http://downloads.asterisk.org/pub/telephony/zaptel/releases/zaptel-%{version}.tar.gz Source1: http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-oct6114-064-1.05.01.tar.gz Source2: http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-oct6114-128-1.05.01.tar.gz Source3: http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-tc400m-MR5.6.tar.gz Source5: http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-tc400m-MR6.12.tar.gz Source4: http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-vpmadt032-1.07.tar.gz # svn diff http://svn.digium.com/svn/zaptel/{tags/1.4.12.1,branches/1.4} Patch0: zaptel-1.4-svn4677.patch Patch1: zaptel-1.4.12.1-MOD_DIR.patch Patch2: zaptel-1.4.9-diet.patch Patch6: zaptel-1.4.11-rhel5.2-kernel.patch Patch7: zaptel-1.4.11-menuselect.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: newt-devel, /bin/ps BuildRequires: ncurses-devel BuildRequires: libusb-devel, groff %{?with_udev:BuildRequires: %{_bindir}/udevinfo} Requires: newt Provides: zaptel-devices = %{evr} Obsoletes: zaptel-devices < %{evr} #kmdl_parentdependencies %description Asterisk is a complete PBX in software. It runs on Linux and provides all of the features you would expect from a PBX and more. If you want to interface with POTS and are using Digium hardware, the Zaptel drivers support these cards. %if %{kmdl_userland} %lib_package tonezone 1 %endif %package -n %kmdl_name %kmdl_dependencies Summary: Digium kernel drivers Group: System Environment/Kernel # For the device management Requires: %{name} = %{evr} %description -n %kmdl_name Asterisk is a complete PBX in software. It runs on Linux and provides all of the features you would expect from a PBX and more. If you want to interface with POTS and are using Digium hardware, the Zaptel drivers support these cards. %kmdl_desc %prep %setup -q %patch0 -p1 -b .svnfixes %patch1 -p1 -b .MOD_DIR for s in %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5}; do cp -a $s firmware/ tar -C firmware -zpxf $s done %patch2 -p0 -b .diet -R %patch7 -p0 -b .menuselect %if %{with hdlc} %else perl -pi -e's,fxstest sethdlc-new ztcfg,fxstest ztcfg,' Makefile %endif perl -pi -e's,mknod,:,' Makefile grep -rl '#include ' . | xargs perl -pi -e's,#include ,/* #include */,' if test ! -f %{kmdl_kernelsrcdir}/include/linux/firmware.h; then perl -pi -e's,wct4xxp,,g' Makefile fi %build %kmdl_config %configure %if %{kmdl_userland} # KVERS needed for firmware decision make menuselect.makeopts programs KSRC=%{kmdl_kernelsrcdir} KVERS=%{_kernel} %else # Makefile for kernel 2.4 needs DOWNLOAD=echo make modules KSRC=%{kmdl_kernelsrcdir} KVERS=%{_kernel} DOWNLOAD=echo %endif %install rm -rf %{buildroot} %if %{kmdl_userland} mkdir -p %{buildroot}%{_mandir}/man8 mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d mkdir -p %{buildroot}%{_sysconfigdir} mkdir -p %{buildroot}%{_sysconfigdir}/network-scripts mkdir -p %{buildroot}%{_initdir} %if %{with firmware} %if %{with udev} mkdir -p %{buildroot}/lib/firmware %else mkdir -p %{buildroot}/usr/lib/hotplug/firmware %endif %endif make install-programs devices install-firmware DOWNLOAD=echo INSTALL="install -p" \ DESTDIR=%{buildroot} ASTTOPDIR=.. HOTPLUG_FIRMWARE=yes \ KSRC=%{kmdl_kernelsrcdir} KVERS=%{_kernel} \ LIB_DIR=%{_libdir} \ %{?with_udev:DYNFS=yes UDEVRULES=yes} \ %{!?with_udev:DYNFS=} %if %{with udev} rm -f %{buildroot}/lib/firmware/.??* rm -fr %{buildroot}/usr/lib/hotplug/firmware %else rm -f %{buildroot}/usr/lib/hotplug/firmware/.??* rm -fr %{buildroot}/lib/firmware %endif make config DESTDIR=%{buildroot} CHKCONFIG=: install -D -m 644 zaptel.sysconfig %{buildroot}%{_sysconfigdir}/zaptel install -D -m 755 ifup-hdlc %{buildroot}%{_sysconfigdir}/network-scripts/ifup-hdlc install -D -m 644 zaptel.conf.sample %{buildroot}%{_sysconfdir}/zaptel.conf rm -f %{buildroot}%{_sysconfdir}/default/zaptel %if %{with udev} for file in %{buildroot}/etc/udev/rules.d/*.rules; do name=`basename $file` mv $file %{buildroot}/etc/udev/rules.d/60-$name done cat >> %{buildroot}/etc/udev/rules.d/60-zaptel.rules < zaptel.devices <> zaptel.devices done %endif %else mkdir -p %{buildroot}%{kmdl_moduledir}/drivers/%{name} make install-modules DESTDIR=%{buildroot} \ KSRC=%{kmdl_kernelsrcdir} KVERS=%{_kernel} if [ -d %{buildroot}%{kmdl_moduledir}/../misc ]; then mv %{buildroot}%{kmdl_moduledir}/../misc/* %{buildroot}%{kmdl_moduledir}/drivers/%{name} fi if [ -d %{buildroot}%{kmdl_moduledir}/../extra ]; then mv %{buildroot}%{kmdl_moduledir}/../extra/* %{buildroot}%{kmdl_moduledir}/drivers/%{name} fi %endif %post # Register the zaptel service /sbin/chkconfig --add zaptel %preun if [ $1 = 0 ]; then /sbin/service zaptel stop > /dev/null 2>&1 /sbin/chkconfig --del zaptel fi %post -n %kmdl_name %kmdl_install %postun -n %kmdl_name %kmdl_remove %clean rm -rf %{buildroot} %if %{kmdl_userland} %files %{!?with_udev:-f zaptel.devices} %defattr(-,root,root,-) %doc LICENSE README* %config(noreplace) %{_sysconfigdir}/zaptel %config(noreplace) %{_sysconfdir}/zaptel.conf %{_sysconfigdir}/network-scripts/ifup-hdlc %{_initrddir}/zaptel #/sbin/sethdlc /sbin/ztcfg /sbin/zttool /sbin/fxotune /sbin/fxstest /sbin/ztmonitor /sbin/ztscan /sbin/ztspeed /sbin/zttest %{_mandir}/man8/ztcfg.8* %{_mandir}/man8/zttool.8* %{_mandir}/man8/fxotune.8* %{_mandir}/man8/fxstest.8* %{_mandir}/man8/ztmonitor.8* %{_mandir}/man8/ztscan.8* %{_mandir}/man8/ztspeed.8* %{_mandir}/man8/zttest.8* %{?with_udev:/etc/udev/rules.d/*} %if %{with firmware} %if %{with udev} /lib/firmware/* %else /usr/lib/hotplug/firmware/* %endif %endif %if %{with xpp} %{_sbindir}/astribank_allow %{_sbindir}/astribank_hexload %{_sbindir}/astribank_tool #%{_sbindir}/adj_clock %{_sbindir}/fpga_load %{_sbindir}/genzaptelconf %{_sbindir}/lszaptel %{_sbindir}/xpp_blink %{_sbindir}/xpp_sync %{_sbindir}/zapconf %{_sbindir}/zaptel_hardware %{_sbindir}/zt_registration %{_mandir}/man8/astribank_allow.8* %{_mandir}/man8/astribank_hexload.8* %{_mandir}/man8/astribank_tool.8* #%{_mandir}/man8/adj_clock.8* %{_mandir}/man8/fpga_load.8* %{_mandir}/man8/genzaptelconf.8* %{_mandir}/man8/lszaptel.8* %{_mandir}/man8/xpp_blink.8* %{_mandir}/man8/xpp_sync.8* %{_mandir}/man8/zapconf.8* %{_mandir}/man8/zaptel_hardware.8* %{_mandir}/man8/zt_registration.8* /etc/hotplug %{_datadir}/zaptel %{perl_sitelib}/Zaptel.pm %{perl_sitelib}/Zaptel %endif %else %files -n %kmdl_name %defattr(-,root,root,-) %{kmdl_moduledir} %endif %changelog * Sat Oct 11 2008 Axel Thimm - 1:1.4.12.1-55 - Update to 1.4.12.1. * Sat Sep 20 2008 Axel Thimm - 1:1.4.11-54 - Fix build for kernel 2.6.26+ (Anthony Messina ). * Wed Jul 30 2008 Tim Verhoeven - 1:1.4.11-53 - Added fxstest to rpm. * Tue Jul 8 2008 Tim Verhoeven - 1:1.4.11-52 - Added patch to fix compile issue on RHEL/CentOS 5.2 kernels. * Sun Jun 1 2008 Axel Thimm - 1:1.4.11-51 - Update to 1.4.11. * Tue Apr 22 2008 Axel Thimm - 1:1.4.10-49 - Update to 1.4.10. * Sat Mar 15 2008 Axel Thimm - 1:1.4.9.2-48 - Update to 1.4.9.2. * Tue Feb 19 2008 Axel Thimm - 1:1.4.9-47 - Update to 1.4.9. * Tue Jan 15 2008 Axel Thimm - 1:1.4.8-46 - Update to 1.4.8. * Fri Dec 28 2007 Axel Thimm - 1:1.4.7.1-44 - Add libusb-devel dependency (fixes #1269). * Sat Dec 22 2007 Axel Thimm - 1:1.4.7.1-43 - Update to 1.4.7.1. * Fri Nov 30 2007 Axel Thimm - 1:1.4.7-42 - Update to 1.4.7. * Mon Oct 29 2007 Axel Thimm - 1:1.4.6-41 - Update to 1.4.6. * Tue Oct 9 2007 Axel Thimm - 1:1.4.5.1-40 - Update to 1.4.5.1. * Tue Aug 21 2007 Axel Thimm - 1:1.4.5-39 - Fix open call in fxotune.c. * Sat Aug 18 2007 Axel Thimm - 1:1.4.5-38 - Update to 1.4.5. * Tue Jul 24 2007 Axel Thimm - 1:1.4.4-37 - Fix missing config dir. * Sat Jul 21 2007 Axel Thimm - 1:1.4.4-36 - Update to 1.4.4. * Wed Jun 13 2007 Axel Thimm - 1:1.4.3-35 - Update to 1.4.3. * Wed Apr 25 2007 Axel Thimm - 1:1.4.2.1-31 - Update to 1.4.2.1. * Fri Mar 23 2007 Axel Thimm - 1:1.4.1-30 - Update to 1.4.1. * Wed Feb 14 2007 Axel Thimm - 1:1.4.0-29 - Fix ownership for broken udev. * Mon Feb 12 2007 Axel Thimm - 1:1.4.0-28 - Move udev rules to after default rules. * Sun Dec 24 2006 Axel Thimm - 1:1.4.0-27 - Update to 1.4.0. * Sat Dec 16 2006 Axel Thimm - 1:1.4.0 - Update to 1.4.0-beta3. * Wed Dec 6 2006 Alexander Bergolth - 1:1.4.0-1_beta2 - First try with 1.4.0-1_beta2 * Thu Oct 26 2006 Axel Thimm - 1:1.2.10-22 - Fix udev rules (bug #1035), thanks to Mark Wormgoor. * Wed Oct 25 2006 Axel Thimm - 1:1.2.10-21 - Rebuild w/o Fedora Extras to avoid beta bits. - Bump epoch to superseed beta bits. * Thu Oct 19 2006 Axel Thimm - 1.2.10-19 - Update to 1.2.10. * Sat Sep 9 2006 Axel Thimm - 1.2.9-18 - Update to 1.2.9. * Fri Aug 25 2006 Axel Thimm - 1.2.8-17 - Update to 1.2.7. * Sat Jul 15 2006 Axel Thimm - 1.2.7-16 - Update to 1.2.7. * Wed May 31 2006 Axel Thimm - Update to 1.2.6. * Mon Mar 27 2006 Axel Thimm - Update to 1.2.5. * Thu Feb 16 2006 Axel Thimm - Update to 1.2.4. * Fri Feb 3 2006 Axel Thimm - Update to 1.2.3. * Thu Jan 19 2006 Axel Thimm - Update to 1.2.2. * Mon Dec 12 2005 Axel Thimm - Update to 1.2.1. * Tue Oct 11 2005 Axel Thimm - Update to 1.0.9.2. * Thu Oct 06 2005 Mark Wormgoor - Fix paths in zaptel.init. - Fix compilation against 2.6.13 kernel. * Fri Jul 15 2005 Axel Thimm - Update to 1.0.9. * Mon Jun 27 2005 Axel Thimm - Update to 1.0.8. * Mon Mar 07 2005 Mark Wormgoor - Initial version