%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
%undefine with_xpp
%endif
-%define rel 2
+%define rel 12
%define pname dahdi-linux
%define FIRMWARE_URL http://downloads.digium.com/pub/telephony/firmware/releases
Summary: DAHDI telephony device support
# 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
%install_kernel_modules -m %{modules_in} -d misc
cd ../..
+%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
%postun -n kernel%{_alt_kernel}-%{pname}
%depmod %{_kernel_ver}
+%if %{with userspace}
%files devel
%defattr(644,root,root,755)
%{_includedir}/dahdi
%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)