]> git.pld-linux.org Git - packages/eagle-usb.git/blobdiff - eagle-usb.spec
- patch for kernel 2.6.16
[packages/eagle-usb.git] / eagle-usb.spec
index db274c25c7225d6a43c59966a52a5ce413e06929..9a2d7e3e07285d105138c8f677df56bc397fc696 100644 (file)
@@ -7,36 +7,45 @@
 %bcond_without kernel          # don't build kernel modules
 %bcond_without smp             # don't build SMP module
 %bcond_without userspace       # don't build userspace tools
+%bcond_without cmvs
 %bcond_with    verbose         # verbose build (V=1)
 #
+%ifarch sparc
+# no USB in sparc(32) kernel; just build userspace to use with sparc64 kernel
+%undefine      with_kernel
+%endif
+%define                _rel    1
 Summary:       Linux driver for the Eagle 8051 Analog (sagem f@st 800/840/908/...) modems
 Summary(pl):   Sterownik dla Linuksa do modemów Eagle 8051 Analog (sagem f@st 800/840/908/...)
 Name:          eagle-usb
-Version:       2.2.0
-%define                _rel    0.1
+Version:       2.3.3
 Release:       %{_rel}
 License:       GPL v2
 Group:         Base/Kernel
-Source0:       http://download.gna.org/eagleusb/eagle-usb-2.2.0/%{name}-%{version}.tar.bz2
-# Source0-md5: ad3d985b324b97de736f1efb723deb5d
+Source0:       http://download.gna.org/eagleusb/eagle-usb-2.3.0/%{name}-%{version}.tar.bz2
+# Source0-md5: 6c961a5022274aff870e49e2f0f922fc
 Patch1:                %{name}-eu_types.patch
 Patch2:                %{name}-vpivci-info.patch
 Patch3:                %{name}-opt.patch
 Patch4:                %{name}-signal.patch
 Patch5:                %{name}-usb_kill_urb.patch
+Patch6:                %{name}-kernel_sources_checking_hack.patch
+# Workaround for obsolete kernel API. To be removed...
+Patch7:                %{name}-spin_lock_unlocked.patch
+Patch8:                %{name}-kill_owner.patch
 URL:           http://gna.org/projects/eagleusb/
 BuildRequires: autoconf
 BuildRequires: automake
 %if %{with kernel}
-%{?with_dist_kernel:BuildRequires:     kernel-module-build >= 2.6.7}
+%{?with_dist_kernel:BuildRequires:     kernel-module-build >= 3:2.6.7}
 BuildRequires: rpmbuild(macros) >= 1.153
 %endif
-BuildRequires: net-tools
 BuildRequires: SysVinit
-Requires:      ppp >= 2.4.1
+BuildRequires: net-tools
 Requires:      kernel-usb-eagle = %{version}-%{_rel}@%{_kernel_ver_str}
-Conflicts:     eagle-usb24
+Requires:      ppp >= 2.4.1
 Obsoletes:     eagle-utils
+Conflicts:     eagle-usb24
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -89,6 +98,9 @@ Sterownik dla Linuksa SMP do modem
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
 
 %ifnarch %{ix86}
 # invalid not only for ppc
@@ -102,19 +114,21 @@ for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}
        if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
                exit 1
        fi
-       rm -rf include
-       install -d include/{config,linux}
-       ln -sf %{_kernelsrcdir}/config-$cfg .config
-       ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
-       ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
-       touch include/config/MARKER
-       %{__make} -C %{_kernelsrcdir} clean \
+       install -d o/include/linux
+       ln -sf %{_kernelsrcdir}/config-$cfg o/.config
+       ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
+       ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
+       %{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
+
+%{__make} -C %{_kernelsrcdir} clean \
                RCS_FIND_IGNORE="-name '*.ko' -o" \
-               M=$PWD O=$PWD \
-               %{?with_verbose:V=1}
-       %{__make} -C %{_kernelsrcdir} modules \
-               M=$PWD O=$PWD \
+               M=$PWD O=$PWD/o \
                %{?with_verbose:V=1}
+%{__make} -C %{_kernelsrcdir} modules \
+               RCS_FIND_IGNORE="-name '*.ko' -o" \
+               M=$PWD O=$PWD/o \
+       %{?with_verbose:V=1} \
+       USE_CMVS=%{?with_cmvs:1}%{!?with_cmvs:0}
        mv eagle-usb{,-$cfg}.ko
 done
 cd -
@@ -124,13 +138,17 @@ cd -
 %{__aclocal} -I .
 %{__autoconf}
 %configure \
-       --with-dsp-dir=%{_datadir}/misc \
-       --with-kernel-src=%{_kernelsrcdir}
+       %{!?with_cmvs:--disable-cmvs} \
+       --with-dsp-dir=%{_datadir}/misc
+
 %{__make} -C driver/firmware \
+       CC="%{__cc}" \
        OPT="%{rpmcflags}"
 %{__make} -C driver/user \
+       CC="%{__cc}" \
        OPT="%{rpmcflags}"
 %{__make} -C pppoa \
+       CC="%{__cc}" \
        OPT="%{rpmcflags}"
 %endif
 
This page took 0.058594 seconds and 4 git commands to generate.