#
# Conditional build:
-# _without_dist_kernel without distribution kernel
+# _without_dist_kernel without distribution kernel
#
%define _orig_name fast800
Summary: Linux driver for the Eagle 8051 Analog (sagem f@st 800...) modems
Summary(pl): Sterownik dla Linuksa do modemów Eagle 8051 Analog (sagem f@st 800...)
-Name: eagle
+Name: eagle-utils
Version: 1.0.4
-%define _rel 4
+%define _rel 7
Release: %{_rel}
License: GPL
Group: Base/Kernel
-Source0: http://fast800.tuxfamily.org/pub/IMG/gz/%{name}-%{version}.tar.gz
+Source0: http://fast800.tuxfamily.org/pub/IMG/gz/eagle-%{version}.tar.gz
# Source0-md5: fc52cf1eff6ab9f20e9c2cb3e7e2f1e8
-Patch0: %{name}-Makefile.patch
-Patch1: %{name}-firmware.patch
-Patch2: %{name}-stopadsl.patch
+Patch0: eagle-Makefile.patch
+Patch1: eagle-firmware.patch
URL: http://fast800.tuxfamily.org/
%{!?_without_dist_kernel:BuildRequires: kernel-headers }
BuildRequires: %{kgcc_package}
BuildRequires: rpmbuild(macros) >= 1.118
Requires(post,postun): /sbin/depmod
-Requires(post,postun): /sbin/update-usb.usermap
+#Requires(post,postun): /sbin/update-usb.usermap
Requires: ppp >= 2.4.1
-Requires: hotplug
+#Requires: hotplug
+%{!?_without_dist_kernel:Requires: kernel-usb-%{_orig_name} = %{version}-%{_rel}@%{_kernel_ver_str}}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Group: Base/Kernel
%{!?_without_dist_kernel:%requires_releq_kernel_up}
Requires(post,postun): /sbin/depmod
-Requires(post,postun): /sbin/update-usb.usermap
+#Requires(post,postun): /sbin/update-usb.usermap
%description -n kernel-usb-%{_orig_name}
Linux driver for the Eagle 8051 Analog (sagem f@st 800...) modems.
Release: %{_rel}@%{_kernel_ver_str}
Group: Base/Kernel
%{!?_without_dist_kernel:%requires_releq_kernel_smp}
+%{!?_without_dist_kernel:Provides: kernel-usb-%{_orig_name}}
Requires(post,postun): /sbin/depmod
-Requires(post,postun): /sbin/update-usb.usermap
+#Requires(post,postun): /sbin/update-usb.usermap
%description -n kernel-smp-usb-%{_orig_name}
Linux SMP driver for the Eagle 8051 Analog (sagem f@st 800...) modems.
800...).
%prep
-%setup -q
+%setup -q -n eagle-%{version}
%patch0 -p1
%patch1 -p1
-%patch2 -p1
%build
install -d kernel-{up,smp}
# UP
%{__make} clean
%{__make} -C driver \
- CC=%{kgcc} \
+ CC=%{__cc} \
+%ifarch %{ix86}
+ OPT="-I/usr/src/linux/include/asm-i386/mach-default" \
+%endif
KERNELSRC="%{_kernelsrcdir}"
install driver/adiusbadsl.o kernel-up
# SMP
CONFIG_SMP=y; export CONFIG_SMP
%{__make} -C driver clean
-%{__make} -e -C driver \
- CC=%{kgcc} \
- KERNELSRC="%{_kernelsrcdir}"
+%{__make} -C driver \
+ CC=%{__cc} \
+%ifarch %{ix86}
+ OPT="-I/usr/src/linux/include/asm-i386/mach-default -DSMP -D__SMP__" \
+%else
+ OPT="-D__SMP__ -DSMP" \
+%endif
+ KERNELSRC="%{_kernelsrcdir}"
install driver/adiusbadsl.o kernel-smp/
# Rest
install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/usb
install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/usb
install -d $RPM_BUILD_ROOT/etc/{analog,hotplug,ppp}
-install -d $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/hotplug/%{name}}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/hotplug/eagle}
install kernel-up/*.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/usb
install kernel-smp/*.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/usb
-install scripts/hotplug/usb.usermap $RPM_BUILD_ROOT%{_libdir}/hotplug/%{name}
+install scripts/hotplug/usb.usermap $RPM_BUILD_ROOT%{_libdir}/hotplug/eagle
%{__make} -C driver/firmware install \
CONFIGDIR=$RPM_BUILD_ROOT/etc/analog \
DESTDIR=$RPM_BUILD_ROOT
%{__make} -C driver/user install \
INSTALLDIR=%{_sbindir} \
- CONFIGDIR=/etc/analog \
+ CONFIGDIR=/etc/analog \
DESTDIR=$RPM_BUILD_ROOT
install pppoa/pppoa $RPM_BUILD_ROOT%{_sbindir}
echo 'n
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/analog/adiusbadsl.conf
%{_sysconfdir}/analog/CMV*
%attr(755,root,root) %{_sysconfdir}/hotplug/usb/*
-%{_libdir}/hotplug/%{name}
+%{_libdir}/hotplug/eagle
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/ppp/*.adsl
%attr(755,root,root) %{_sbindir}/*
%{_datadir}/misc/*.bin