X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=dahdi-linux.spec;h=8fdf1799202593840a30fd7f8197bd60833636d5;hb=75144113434e1e33e22adb3d80b893057e7b1357;hp=6ba56cf89440a7f6fbcf8c8520556466f0502e23;hpb=c278c563a3f551c62540822bc9451686d7159a20;p=packages%2Fdahdi-linux.git diff --git a/dahdi-linux.spec b/dahdi-linux.spec index 6ba56cf..8fdf179 100644 --- a/dahdi-linux.spec +++ b/dahdi-linux.spec @@ -1,13 +1,26 @@ # # 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_with oslec # with Open Source Line Echo Canceller %bcond_without xpp # without Astribank +%bcond_without userspace # don't build userspace packages %bcond_with verbose +%if "%{_alt_kernel}" != "%{nil}" +%undefine with_userspace +%endif + %ifarch sparc %undefine with_smp %endif @@ -15,7 +28,7 @@ %undefine with_xpp %endif -%define rel 1 +%define rel 12 %define pname dahdi-linux %define FIRMWARE_URL http://downloads.digium.com/pub/telephony/firmware/releases Summary: DAHDI telephony device support @@ -35,7 +48,7 @@ Source5: %{FIRMWARE_URL}/dahdi-fw-vpmadt032-1.07.tar.gz # Source5-md5: e1c7231d6225ac999cb18f4e858f66b6 Source6: %{FIRMWARE_URL}/dahdi-fw-tc400m-MR6.12.tar.gz # Source6-md5: 2ea860bb8a9d8ede2858b9557b74ee3c -Patch0: %{pname}-svn-fixes.patch +Patch0: %{name}-gentoo.patch URL: http://www.asterisk.org/ %if %{with kernel} && %{with dist_kernel} BuildRequires: kernel%{_alt_kernel}-module-build @@ -82,6 +95,20 @@ Group: Development/Libraries %description devel Header files for dahdi interface. +%package udev +Summary: udev rules for DAHDI kernel modules +Summary(pl.UTF-8): Reguły udev dla modułów jądra Linuksa dla DAHDI +Release: %{rel} +Group: Base/Kernel +Requires: dahdi-tools >= 2.2.0 +Requires: udev-core + +%description udev +udev rules for DAHDI kernel modules. + +%description udev -l pl.UTF-8 +Reguły udev dla modułów jądra Linuksa dla DAHDI. + %package -n kernel%{_alt_kernel}-%{pname} Summary: DAHDI Linux kernel driver Summary(pl.UTF-8): Sterownik DAHDI dla jądra Linuksa @@ -142,7 +169,14 @@ cd drivers/dahdi %install_kernel_modules -m %{modules_in} -d misc cd ../.. -install include/dahdi/*.h $RPM_BUILD_ROOT%{_includedir}/dahdi/ +%if %{with userspace} +install -d $RPM_BUILD_ROOT/etc/udev/rules.d + +%{make} \ + DESTDIR=$RPM_BUILD_ROOT \ + install-devices \ + install-include +%endif %clean rm -rf $RPM_BUILD_ROOT @@ -153,10 +187,17 @@ rm -rf $RPM_BUILD_ROOT %postun -n kernel%{_alt_kernel}-%{pname} %depmod %{_kernel_ver} +%if %{with userspace} %files devel %defattr(644,root,root,755) %{_includedir}/dahdi +%files udev +%defattr(644,root,root,755) +%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/dahdi.rules +%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/xpp.rules +%endif + %files -n kernel%{_alt_kernel}-%{pname} %defattr(644,root,root,755) /lib/modules/%{_kernel_ver}/misc/*.ko*