Author: glen                         Date: Thu Sep 25 20:59:24 2008 GMT
Module: SPECS                         Tag: LINUX_2_6_16
---- Log message:
- merged 1.4.8 from LINUX_2_6_22 branch; rel 7

---- Files affected:
SPECS:
   zaptel.spec (1.75.2.39 -> 1.75.2.39.2.1) 

---- Diffs:

================================================================
Index: SPECS/zaptel.spec
diff -u SPECS/zaptel.spec:1.75.2.39 SPECS/zaptel.spec:1.75.2.39.2.1
--- SPECS/zaptel.spec:1.75.2.39 Fri Apr  4 18:09:17 2008
+++ SPECS/zaptel.spec   Thu Sep 25 22:59:18 2008
@@ -1,7 +1,9 @@
 # $Revision$, $Date$
-# TODO
-# - sparc, ppc fail
-# - zaptel-1.2.15/ztdummy.c:103:2: warning: #warning This module will not be 
usable since the kernel HZ setting is not 1000 ticks per second.
+# TODO:
+# Installed (but unpackaged) file(s) found:
+#   /etc/hotplug/usb/xpp_fxloader
+#   /etc/hotplug/usb/xpp_fxloader.usermap
+#   /etc/udev/rules.d/xpp.rules
 #
 # Conditional build:
 %bcond_without dist_kernel     # without distribution kernel
@@ -9,10 +11,16 @@
 %bcond_without up              # don't build UP module
 %bcond_without smp             # don't build SMP module
 %bcond_without userspace       # don't build userspace tools
+%bcond_with    oslec           # with Open Source Line Echo Canceller
+%bcond_with    bristuff        # with bristuff support
+%bcond_without xpp             # without Astribank
 
 %ifarch sparc
 %undefine      with_smp
 %endif
+%ifarch alpha
+%undefine      with_xpp
+%endif
 
 %if %{without kernel}
 %undefine      with_dist_kernel
@@ -20,42 +28,58 @@
 %if "%{_alt_kernel}" != "%{nil}"
 %undefine      with_userspace
 %endif
+%if %{without userspace}
+# nothing to be placed to debuginfo package
+%define                _enable_debug_packages  0
+%endif
 
+%define                rel     7
 %define                pname   zaptel
+%define                FIRMWARE_URL 
http://downloads.digium.com/pub/telephony/firmware/releases
 Summary:       Zaptel telephony device support
 Summary(pl.UTF-8):     Obsługa urządzeń telefonicznych Zaptel
 Name:          %{pname}%{_alt_kernel}
-Version:       1.2.21
-Release:       11
+Version:       1.4.8
+Release:       %{rel}
 License:       GPL
 Group:         Base/Kernel
-Source0:       
http://downloads.digium.com/pub/zaptel/%{pname}-%{version}.tar.gz
-# Source0-md5: 262186d4749adbbabc5b96a0d1c3c70e
+Source0:       
http://ftp.digium.com/pub/zaptel/releases/%{pname}-%{version}.tar.gz
+# Source0-md5: f57e1ba86a3dd4ef141ca3831e11c076
 Source1:       %{pname}.init
 Source2:       %{pname}.sysconfig
+Source3:       %{FIRMWARE_URL}/zaptel-fw-oct6114-064-1.05.01.tar.gz
+# Source3-md5: 18e6e6879070a8d61068e1c87b8c2b22
+Source4:       %{FIRMWARE_URL}/zaptel-fw-oct6114-128-1.05.01.tar.gz
+# Source4-md5: c46a13f468b53828dc5c78f0eadbefd4
+Source5:       %{FIRMWARE_URL}/zaptel-fw-vpmadt032-1.07.tar.gz
+# Source5-md5: 7916c630a68fcfd38ead6caf9b55e5a1
+Source6:       %{FIRMWARE_URL}/zaptel-fw-tc400m-MR6.12.tar.gz
+# Source6-md5: c57f41fae88f129e14fcaf41e4df90dc
 Patch0:                %{pname}-make.patch
-Patch1:                %{pname}-sparc.patch
-Patch2:                %{pname}-as_needed-fix.patch
-Patch3:                %{pname}-sangoma.patch
+Patch1:                %{pname}-sangoma.patch
+Patch2:                %{pname}-oslec.patch
+Patch3:                %{pname}-bristuff.patch
+Patch4:                %{pname}-llh.patch
 URL:           http://www.asterisk.org/
-%if %{with kernel}
-%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build}
-BuildRequires: rpmbuild(macros) >= 1.330
+%if %{with kernel} && %{with dist_kernel}
+BuildRequires: kernel%{_alt_kernel}-module-build
+BuildRequires: module-init-tools
 %endif
-%if %{with userspace}
 BuildRequires: newt-devel
-%endif
+BuildRequires: perl-base
+BuildRequires: perl-tools-pod
+BuildRequires: rpmbuild(macros) >= 1.452
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define        modules_1       
pciradio,tor2,torisa,wcfxo,wct1xxp,wct4xxp/wct4xxp,
-%define        modules_2       
wctdm,wcte11xp,wcusb,zaptel,ztd-eth,ztd-loc,ztdummy,ztdynamic
-
-# modules added in 1.2.15 (see r1.75.2.2)
-%ifnarch ppc alpha sparc
-%define        modules_1_2_15  
wctc4xxp/wctc4xxp,wcte12xp,xpp/{xpd_fxo,xpd_fxs,xpp,xpp_usb},zttranscode
+%define        modules_1       
zaptel,ztd-eth,ztd-loc,pciradio,tor2,torisa,wcfxo,wct1xxp,wctdm,wcte11xp,wcusb,ztdummy,ztdynamic
+%define        modules_2       
wct4xxp/wct4xxp,wcte12xp/wcte12xp%{?with_xpp:,xpp/{xpd_fxo,xpd_fxs,xpd_pri,xpp,xpp_usb}}
+%ifnarch alpha
+%define        modules_nalpha  
wctc4xxp/wctc4xxp,wctdm24xxp/wctdm24xxp,zttranscode
 %endif
-
-%define        modules         
%{modules_1},%{modules_2}%{?modules_1_2_15:,%{modules_1_2_15}}
+%if %{with bristuff}
+%define        modules_bristuff 
cwain/cwain,qozap/qozap,vzaphfc/vzaphfc,zaphfc/zaphfc,ztgsm/ztgsm,opvxa1200,wcopenpci
+%endif
+%define        modules         
%{modules_1},%{modules_2}%{?modules_nalpha:,%{modules_nalpha}}%{?modules_bristuff:,%{modules_bristuff}}
 
 %description
 Zaptel telephony device driver.
@@ -67,9 +91,8 @@
 Summary:       Zaptel development headers
 Summary(pl.UTF-8):     Pliki nagłówkowe Zaptel
 Group:         Development/Libraries
-Requires:      %{pname} = %{version}-%{release}
-# files in /usr/include/linux
-Requires:      linux-libc-headers
+Requires:      %{pname} = %{version}-%{rel}
+%{?with_bristuff:Provides:     zaptel-devel(bristuff)}
 
 %description devel
 Zaptel development headers.
@@ -77,6 +100,19 @@
 %description devel -l pl.UTF-8
 Pliki nagłówkowe Zaptel.
 
+%package static
+Summary:       Zaptel static library
+Summary(pl.UTF-8):     Biblioteka statyczna Zaptel
+Group:         Development/Libraries
+Requires:      %{pname}-devel = %{version}-%{rel}
+%{?with_bristuff:Provides:     zaptel-static(bristuff)}
+
+%description static
+Zaptel static library.
+
+%description static -l pl.UTF-8
+Biblioteka statyczna Zaptel.
+
 %package utils
 Summary:       Zaptel utility programs
 Summary(pl.UTF-8):     Programy narzędziowe Zaptel
@@ -93,7 +129,7 @@
 Summary(pl.UTF-8):     Skrypty inicjalizujące Zaptel
 Group:         Applications/Communications
 Requires(post,preun):  /sbin/chkconfig
-Requires:      %{pname}-utils = %{version}-%{release}
+Requires:      %{pname}-utils = %{version}-%{rel}
 Requires:      rc-scripts
 
 %description init
@@ -105,9 +141,13 @@
 %package -n kernel%{_alt_kernel}-%{pname}
 Summary:       Zaptel Linux kernel driver
 Summary(pl.UTF-8):     Sterownik Zaptel dla jądra Linuksa
+Release:       [EMAIL PROTECTED]
 Group:         Base/Kernel
-%{?with_dist_kernel:Requires:  kernel%{_alt_kernel}(vermagic) = %{_kernel_ver}}
 Requires(post,postun): /sbin/depmod
+%{?with_dist_kernel:Requires:  kernel%{_alt_kernel}(vermagic) = %{_kernel_ver}}
+%if %{with dist_kernel}
+%{?with_oslec:Requires:        kernel%{_alt_kernel}-misc-oslec(vermagic) = 
%{_kernel_ver}}
+%endif
 
 %description -n kernel%{_alt_kernel}-%{pname}
 Zaptel telephony Linux kernel driver.
@@ -128,29 +168,71 @@
 %description -n kernel%{_alt_kernel}-smp-%{pname} -l pl.UTF-8
 Sterownik dla jądra Linuksa SMP do urządzeń telefonicznych Zaptel.
 
+%package -n perl-Zaptel
+Summary:       Perl interface to Zaptel
+Summary(pl.UTF-8):     Perlowy interfejs do Zaptela
+Group:         Development/Languages/Perl
+Requires:      %{pname} = %{version}-%{rel}
+
+%description -n perl-Zaptel
+Perl inferface to Zaptel.
+
+%description -n perl-Zaptel -l pl.UTF-8
+Perlowy interfejs do Zaptela.
+
 %prep
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
 %patch1 -p1
-#%patch2 -p1
-%patch3 -p1
+%{?with_oslec:%patch2 -p1}
+%{?with_bristuff:%patch3 -p1}
+%patch4 -p1
+
+%if %{with kernel}
+for a in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6}; do
+       ln -s $a firmware
+       tar -C firmware -xzf $a
+done
+
+cat > download-logger <<'EOF'
+#!/bin/sh
+# keep log of files make wanted to download in firmware/ dir
+echo "$@" >> download.log
+EOF
+chmod a+rx download-logger
+%endif
 
 %build
+%configure
 %{__make} prereq zttest \
        CC="%{__cc}" \
-       LDFLAGS="%{rpmldflags} -lm" \
+       LDFLAGS="%{rpmldflags}" \
        OPTFLAGS="%{rpmcflags}"
 
 %if %{with kernel}
-echo : {%{modules},}
-%build_kernel_modules SUBDIRS=$PWD -m %{modules}
+%build_kernel_modules SUBDIRS=$PWD DOWNLOAD=$PWD/download-logger ZAP="-I$PWD" 
KSRC=%{_kernelsrcdir} -m %{modules}
+
+check_modules() {
+       err=0
+       for a in {*/,}*.ko; do
+               [[ $a = *-dist.ko ]] && continue
+               [[ $a = *-up.ko ]] && continue
+               [[ $a = *-smp.ko ]] && continue
+               echo >&2 "unpackaged module: ${a%.ko}"
+               err=1
+       done
+
+       [ $err = 0 ] || exit 1
+}
+check_modules
 %endif
 
 %if %{with userspace}
-%{__make} ztcfg torisatool makefw ztmonitor ztspeed libtonezone.so \
-       fxstest fxotune gendigits \
+%{__make} ztcfg torisatool makefw ztmonitor ztspeed %{?with_bristuff:ztpty} 
libtonezone.so \
+       fxstest fxotune \
        CC="%{__cc} %{rpmcflags}" \
-       LDFLAGS="%{rpmldflags} -lm"
+       LDFLAGS="%{rpmldflags}" \
+       KSRC=%{_kernelsrcdir}
 %endif
 
 %install
@@ -162,15 +244,20 @@
 
 %if %{with userspace}
 install -d 
$RPM_BUILD_ROOT{/sbin,%{_includedir}/linux,/etc/{rc.d/init.d,sysconfig},%{_sbindir},%{_mandir}/{man1,man8}}
-%{__make} -o all -o devices -o modules install \
+%{__make} -o all -o devices -j1 install \
        LIBDIR="%{_libdir}" \
+       LIB_DIR="%{_libdir}" \
+       INSTALL_PREFIX=$RPM_BUILD_ROOT \
        DESTDIR=$RPM_BUILD_ROOT \
-       KMAKE_INST= \
-       SBINDIR=%{_sbindir} \
-       MODCONF=$RPM_BUILD_ROOT/etc/modprobe.conf
-install makefw fxstest gendigits $RPM_BUILD_ROOT%{_sbindir}
+       MODCONF=$RPM_BUILD_ROOT/etc/modprobe.conf \
+       KSRC=%{_kernelsrcdir} \
+       PERLLIBDIR=%{perl_vendorlib}
+install zttest torisatool makefw ztmonitor ztspeed fxstest fxotune 
%{?with_bristuff:ztpty} $RPM_BUILD_ROOT%{_sbindir}
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/zaptel
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/zaptel
+touch $RPM_BUILD_ROOT/etc/zaptel.conf
+
+install zconfig.h ecdis.h fasthdlc.h biquad.h 
$RPM_BUILD_ROOT/usr/include/zaptel/
 %endif
 
 %clean
@@ -201,11 +288,13 @@
 %if %{with userspace}
 %files
 %defattr(644,root,root,755)
-%doc README ChangeLog
+%doc README
 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/zaptel.conf
-%attr(755,root,root) %{_sbindir}/ztcfg
-%attr(755,root,root) %{_sbindir}/zttool
+%attr(755,root,root) /sbin/*
 %attr(755,root,root) %{_libdir}/*.so.*
+%if %{with xpp}
+%{_datadir}/zaptel
+%endif
 %{_mandir}/man8/*
 
 %files init
@@ -216,19 +305,22 @@
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/*.so
-%{_includedir}/linux/*
-%{_includedir}/*.h
+%{_includedir}/zaptel
+
+%files static
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/*.a
 
 %files utils
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_sbindir}/fxotune
-%attr(755,root,root) %{_sbindir}/fxstest
-%attr(755,root,root) %{_sbindir}/gendigits
-%attr(755,root,root) %{_sbindir}/makefw
-%attr(755,root,root) %{_sbindir}/torisatool
-%attr(755,root,root) %{_sbindir}/ztmonitor
-%attr(755,root,root) %{_sbindir}/ztspeed
-%attr(755,root,root) %{_sbindir}/zttest
+%attr(755,root,root) %{_sbindir}/*
+
+%if %{with xpp}
+%files -n perl-Zaptel
+%defattr(644,root,root,755)
+%{perl_vendorlib}/Zaptel
+%{perl_vendorlib}/Zaptel.pm
+%endif
 %endif
 
 %if %{with kernel}
@@ -251,6 +343,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.75.2.39.2.1  2008/09/25 20:59:18  glen
+- merged 1.4.8 from LINUX_2_6_22 branch; rel 7
+
 Revision 1.75.2.39  2008/04/04 16:09:17  glen
 - convert to utf8
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/zaptel.spec?r1=1.75.2.39&r2=1.75.2.39.2.1&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to