]> git.pld-linux.org Git - packages/dahdi-linux.git/blobdiff - dahdi-linux.spec
Release 2 (by relup.sh)
[packages/dahdi-linux.git] / dahdi-linux.spec
index 54f852de035f8ef2a571fc2931ad994bbfe666d6..1ed516a09b9189bb169914c1fc5bd302bb3a5fff 100644 (file)
@@ -1,31 +1,18 @@
 #
 # TODO:
 # - IMPORTANT rename: http://www.asterisk.org/zaptel-to-dahdi
-# - Fix --without xpp:
-#   + check_modules
-#   unpackaged module: drivers/dahdi/xpp/xpd_bri
-#   unpackaged module: drivers/dahdi/xpp/xpd_fxo
-#   unpackaged module: drivers/dahdi/xpp/xpd_fxs
-#   unpackaged module: drivers/dahdi/xpp/xpd_pri
-#   unpackaged module: drivers/dahdi/xpp/xpp
-#   unpackaged module: drivers/dahdi/xpp/xpp_usb
 #
 # Conditional build:
-%bcond_without dist_kernel     # without distribution kernel
-%bcond_without  kernel         # don't build kernel modules
-%bcond_with    oslec           # with Open Source Line Echo Canceller
-%bcond_without xpp             # without Astribank
-%bcond_without userspace       # don't build userspace packages
+%bcond_without kernel          # kernel modules
+%bcond_with    oslec           # Open Source Line Echo Canceller
+%bcond_without xpp             # Xorcom Astribank support
+%bcond_without userspace       # userspace packages
 %bcond_with    verbose
 
-%ifarch alpha
+%ifarch alpha %{ix86}
 %undefine      with_xpp
 %endif
 
-%if %{without kernel}
-%undefine      with_dist_kernel
-%endif
-
 # The goal here is to have main, userspace, package built once with
 # simple release number, and only rebuild kernel packages with kernel
 # version as part of release number, without the need to bump release
 exit 1
 %endif
 
-%if "%{_alt_kernel}" != "%{nil}"
-%if 0%{?build_kernels:1}
-%{error:alt_kernel and build_kernels are mutually exclusive}
-exit 1
-%endif
-%undefine      with_userspace
-%global                _build_kernels          %{alt_kernel}
-%else
-%global                _build_kernels          %{?build_kernels:,%{?build_kernels}}
-%endif
-
-%if %{without userspace}
 # nothing to be placed to debuginfo package
 %define                _enable_debug_packages  0
-%endif
-
-%define                kbrs    %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo "BuildRequires:kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2" ; done)
-%define                kpkg    %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%kernel_pkg ; done)
-%define                bkpkg   %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%build_kernel_pkg ; done)
 
 %define                rel     2
 %define                pname   dahdi-linux
@@ -61,12 +31,12 @@ exit 1
 Summary:       DAHDI telephony device support
 Summary(pl.UTF-8):     Obsługa urządzeń telefonicznych DAHDI
 Name:          %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
-Version:       2.9.0
+Version:       3.3.0
 Release:       %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
 License:       GPL v2
 Group:         Base/Kernel
 Source0:       http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-%{version}.tar.gz
-# Source0-md5: 8050688193b2a41d6d5dbc6755b1e76d
+# Source0-md5: 650e2f9ccae7efb850ce1914c768af83
 Source3:       %{FIRMWARE_URL}/dahdi-fw-oct6114-064-1.05.01.tar.gz
 # Source3-md5: 88db9b7a07d8392736171b1b3e6bcc66
 Source4:       %{FIRMWARE_URL}/dahdi-fw-oct6114-128-1.05.01.tar.gz
@@ -77,11 +47,12 @@ Source6:    %{FIRMWARE_URL}/dahdi-fw-tc400m-MR6.12.tar.gz
 # Source6-md5: 2ea860bb8a9d8ede2858b9557b74ee3c
 Source7:       %{FIRMWARE_URL}/dahdi-fw-hx8-2.06.tar.gz
 # Source7-md5: a7f3886942bb3e9fed349a41b3390c9f
+Patch0:                kernel-strcpy.patch
+Patch3:                no-xpp.patch
 URL:           http://www.asterisk.org/
-BuildRequires: rpmbuild(macros) >= 1.678
-%{?with_dist_kernel:%{expand:%kbrs}}
+%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
 BuildRequires: perl-base
-BuildRequires: rpmbuild(macros) >= 1.379
+BuildRequires: rpmbuild(macros) >= 1.701
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # Rules:
@@ -90,10 +61,11 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 # - keep X and X_in in sync
 # - X is used for actual building (entries separated with space), X_in for pld macros (entries separated with comma)
 
-%define        modules_1       dahdi.o dahdi_dynamic.o dahdi_dynamic_eth.o dahdi_dynamic_ethmf.o dahdi_dynamic_loc.o dahdi_echocan_jpah.o dahdi_echocan_kb1.o dahdi_echocan_mg2.o dahdi_echocan_sec.o dahdi_echocan_sec2.o pciradio.o tor2.o wcfxo.o wct1xxp.o wctdm.o wcte11xp.o
-%define        modules_1_in    dahdi,dahdi_dynamic,dahdi_dynamic_eth,dahdi_dynamic_ethmf,dahdi_dynamic_loc,dahdi_echocan_jpah,dahdi_echocan_kb1,dahdi_echocan_mg2,dahdi_echocan_sec,dahdi_echocan_sec2,pciradio,tor2,wcfxo,wct1xxp,wctdm,wcte11xp
-%define        modules_2       voicebus/ wct4xxp/ wcte12xp/ %{?with_xpp:xpp/}
-%define        modules_2_in    voicebus/dahdi_voicebus,wct4xxp/wct4xxp,wcte12xp/wcte12xp,%{?with_xpp:xpp/xpd_bri,xpp/xpd_echo,xpp/xpd_fxo,xpp/xpd_fxs,xpp/xpd_pri,xpp/xpp,xpp/xpp_usb}
+%define        modules_1       dahdi.o dahdi_dynamic.o dahdi_dynamic_eth.o dahdi_dynamic_ethmf.o dahdi_dynamic_loc.o dahdi_echocan_jpah.o dahdi_echocan_kb1.o dahdi_echocan_mg2.o dahdi_echocan_sec.o dahdi_echocan_sec2.o wcaxx.o wcte13xp.o wcte43x.o
+%define        modules_1_in    dahdi,dahdi_dynamic,dahdi_dynamic_eth,dahdi_dynamic_ethmf,dahdi_dynamic_loc,dahdi_echocan_jpah,dahdi_echocan_kb1,dahdi_echocan_mg2,dahdi_echocan_sec,dahdi_echocan_sec2,wcaxx,wcte13xp,wcte43x
+%define        modules_2       voicebus/ oct612x/ wct4xxp/ %{?with_xpp:xpp/}
+%define        modules_2_in    voicebus/dahdi_voicebus,oct612x/oct612x,wct4xxp/wct4xxp,%{?with_xpp:xpp/xpd_bri,xpp/xpd_echo,xpp/xpd_fxo,xpp/xpd_fxs,xpp/xpd_pri,xpp/xpp,xpp/xpp_usb}
+
 %ifnarch alpha
 %define        modules_nalpha  wctc4xxp/ wctdm24xxp/ dahdi_transcode.o wcb4xxp/
 %define        modules_nalpha_in       wctc4xxp/wctc4xxp,wctdm24xxp/wctdm24xxp,dahdi_transcode,wcb4xxp/wcb4xxp
@@ -125,11 +97,9 @@ Summary(pl.UTF-8):  Sterownik DAHDI dla jądra Linuksa\
 Release:       %{rel}@%{_kernel_ver_str}\
 Group:         Base/Kernel\
 Requires(post,postun): /sbin/depmod\
-%if %{with dist_kernel}\
 %requires_releq_kernel\
 Requires(postun):      %releq_kernel\
 %{?with_oslec:Requires:        kernel-misc-oslec = 20070608-0.1@%{_kernel_ver_str}}\
-%endif\
 \
 %description -n kernel%{_alt_kernel}-%{pname}\
 DAHDI telephony Linux kernel driver.\
@@ -141,17 +111,14 @@ Sterownik dla jądra Linuksa do urządzeń telefonicznych DAHDI.\
 %files -n kernel%{_alt_kernel}-%{pname}\
 %defattr(644,root,root,755)\
 /lib/modules/%{_kernel_ver}/misc/dahdi*.ko*\
-/lib/modules/%{_kernel_ver}/misc/pciradio.ko*\
-/lib/modules/%{_kernel_ver}/misc/tor2.ko*\
 /lib/modules/%{_kernel_ver}/misc/wcb4xxp.ko*\
-/lib/modules/%{_kernel_ver}/misc/wcfxo.ko*\
-/lib/modules/%{_kernel_ver}/misc/wct1xxp.ko*\
 /lib/modules/%{_kernel_ver}/misc/wct4xxp.ko*\
 /lib/modules/%{_kernel_ver}/misc/wctc4xxp.ko*\
-/lib/modules/%{_kernel_ver}/misc/wctdm.ko*\
 /lib/modules/%{_kernel_ver}/misc/wctdm24xxp.ko*\
-/lib/modules/%{_kernel_ver}/misc/wcte11xp.ko*\
-/lib/modules/%{_kernel_ver}/misc/wcte12xp.ko*\
+/lib/modules/%{_kernel_ver}/misc/wcte13xp.ko*\
+/lib/modules/%{_kernel_ver}/misc/oct612x.ko*\
+/lib/modules/%{_kernel_ver}/misc/wcaxx.ko*\
+/lib/modules/%{_kernel_ver}/misc/wcte43x.ko*\
 %if %{with xpp}\
 /lib/modules/%{_kernel_ver}/misc/xpd_*.ko*\
 /lib/modules/%{_kernel_ver}/misc/xpp.ko*\
@@ -168,17 +135,21 @@ Sterownik dla jądra Linuksa do urządzeń telefonicznych DAHDI.\
 
 %define build_kernel_pkg()\
 %if %{with kernel}\
-%build_kernel_modules SUBDIRS=$PWD/drivers/dahdi DAHDI_BUILD_ALL=m HOTPLUG_FIRMWARE=yes DAHDI_MODULES_EXTRA=" " -m %{modules_in} KSRC=$PWD/o -C drivers/dahdi DAHDI_INCLUDE=$PWD/../../include\
+%build_kernel_modules V=1 SUBDIRS=$PWD/drivers/dahdi DAHDI_BUILD_ALL=m HOTPLUG_FIRMWARE=yes DAHDI_MODULES_EXTRA=" " -m %{modules_in} KSRC=$PWD/o -C drivers/dahdi DAHDI_INCLUDE=$PWD/../../include\
 cd drivers/dahdi\
 %install_kernel_modules -D ../../installed -m %{modules_in} -d misc\
 cd ../..\
 %endif\
 %{nil}
 
-%{?with_kernel:%{expand:%kpkg}}
+%{?with_kernel:%{expand:%create_kernel_packages}}
 
 %prep
 %setup -q -n %{pname}-%{version}
+%patch0 -p1
+%if %{without xpp}
+%patch3 -p1
+%endif
 
 for a in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7}; do
        ln -s $a drivers/dahdi/firmware
@@ -195,7 +166,7 @@ chmod a+rx download-logger
 %build
 %{__make} include/dahdi/version.h
 
-%{?with_kernel:%{expand:%bkpkg}}
+%{?with_kernel:%{expand:%build_kernel_packages}}
 
 %install
 rm -rf $RPM_BUILD_ROOT
This page took 0.043368 seconds and 4 git commands to generate.