]>
Commit | Line | Data |
---|---|---|
83390711 | 1 | # |
0d9b0419 | 2 | # TODO: |
88c83b1a | 3 | # - utils/scripts, eagleconfig |
0d9b0419 | 4 | # |
83390711 | 5 | # Conditional build: |
e616b1cc JB |
6 | %bcond_without dist_kernel # without distribution kernel |
7 | %bcond_without kernel # don't build kernel modules | |
0d9b0419 | 8 | %bcond_without smp # don't build SMP module |
f71b5755 | 9 | %bcond_without up # don't build UP module |
e616b1cc | 10 | %bcond_without userspace # don't build userspace tools |
3ac1e005 | 11 | %bcond_without cmvs |
0d9b0419 | 12 | %bcond_with verbose # verbose build (V=1) |
d1a0f22c | 13 | %bcond_with grsec_kernel # build for kernel-grsecurity |
14 | # | |
15 | %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel} | |
16 | %define alt_kernel grsecurity | |
17 | %endif | |
83390711 | 18 | # |
c1e4b795 | 19 | %ifarch sparc |
8ef2e350 | 20 | # no USB in sparc(32) kernel; just build userspace to use with sparc64 kernel |
c1e4b795 JB |
21 | %undefine with_kernel |
22 | %endif | |
1640c3d0 | 23 | %define _rel 4 |
0d9b0419 | 24 | Summary: Linux driver for the Eagle 8051 Analog (sagem f@st 800/840/908/...) modems |
a396bde7 | 25 | Summary(pl.UTF-8): Sterownik dla Linuksa do modemów Eagle 8051 Analog (sagem f@st 800/840/908/...) |
66f35a9f | 26 | Name: eagle-usb |
1a657325 | 27 | Version: 2.3.3 |
83390711 | 28 | Release: %{_rel} |
0d9b0419 | 29 | License: GPL v2 |
83390711 | 30 | Group: Base/Kernel |
c10a1b49 | 31 | Source0: http://download.gna.org/eagleusb/eagle-usb-2.3.0/%{name}-%{version}.tar.bz2 |
1a657325 | 32 | # Source0-md5: 6c961a5022274aff870e49e2f0f922fc |
227642d7 | 33 | Patch1: %{name}-eu_types.patch |
5d115eac AM |
34 | Patch2: %{name}-vpivci-info.patch |
35 | Patch3: %{name}-opt.patch | |
e142fedd | 36 | Patch4: %{name}-signal.patch |
a911bb03 | 37 | Patch5: %{name}-usb_kill_urb.patch |
2a3d78a5 | 38 | Patch6: %{name}-kernel_sources_checking_hack.patch |
dc6d637b PG |
39 | # Workaround for obsolete kernel API. To be removed... |
40 | Patch7: %{name}-spin_lock_unlocked.patch | |
e669e885 | 41 | Patch8: %{name}-kill_owner.patch |
d01dce52 | 42 | Patch9: %{name}-module_param.patch |
942468d6 | 43 | URL: http://gna.org/projects/eagleusb/ |
0b47864c | 44 | BuildRequires: autoconf |
7d51f16a | 45 | BuildRequires: automake |
e616b1cc | 46 | %if %{with kernel} |
44428a95 | 47 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7} |
479274b3 | 48 | BuildRequires: rpmbuild(macros) >= 1.330 |
e616b1cc | 49 | %endif |
dd0970d2 | 50 | BuildRequires: SysVinit |
97367176 | 51 | BuildRequires: net-tools |
97367176 | 52 | Requires: ppp >= 2.4.1 |
66f35a9f | 53 | Obsoletes: eagle-utils |
97367176 | 54 | Conflicts: eagle-usb24 |
83390711 | 55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
56 | ||
57 | %description | |
227642d7 PS |
58 | Linux driver for the Eagle 8051 Analog (sagem f@st 800/840/908/...) |
59 | modems. | |
83390711 | 60 | |
40419231 JR |
61 | %description -l pl.UTF-8 |
62 | Sterownik dla Linuksa do modemów Eagle 8051 Analog (sagem f@st | |
227642d7 | 63 | 800/840/908/...). |
83390711 | 64 | |
44428a95 | 65 | %package -n kernel%{_alt_kernel}-usb-eagle |
0d9b0419 | 66 | Summary: Linux driver for the Eagle 8051 Analog (sagem f@st 800/840/908/...) modems |
a396bde7 | 67 | Summary(pl.UTF-8): Sterownik dla Linuksa do modemów Eagle 8051 Analog (sagem f@st 800/840/908/...) |
83390711 | 68 | Release: %{_rel}@%{_kernel_ver_str} |
69 | Group: Base/Kernel | |
e616b1cc | 70 | %{?with_dist_kernel:%requires_releq_kernel_up} |
83390711 | 71 | Requires(post,postun): /sbin/depmod |
44428a95 | 72 | Provides: kernel-usb(eagle) = %{version}-%{_rel} |
73 | %if "%{_alt_kernel}" == "%{_nil}" | |
0d9b0419 | 74 | Obsoletes: kernel-usb-fast800 |
44428a95 | 75 | %endif |
83390711 | 76 | |
44428a95 | 77 | %description -n kernel%{_alt_kernel}-usb-eagle |
227642d7 PS |
78 | Linux driver for the Eagle 8051 Analog (sagem f@st 800/840/908/...) |
79 | modems. | |
83390711 | 80 | |
40419231 JR |
81 | %description -n kernel%{_alt_kernel}-usb-eagle -l pl.UTF-8 |
82 | Sterownik dla Linuksa do modemów Eagle 8051 Analog (sagem f@st | |
227642d7 | 83 | 800/840/908/...). |
83390711 | 84 | |
44428a95 | 85 | %package -n kernel%{_alt_kernel}-smp-usb-eagle |
0d9b0419 | 86 | Summary: Linux SMP driver for the Eagle 8051 Analog (sagem f@st 800/840/908/...) modems |
a396bde7 | 87 | Summary(pl.UTF-8): Sterownik dla Linuksa SMP do modemów Eagle 8051 Analog (sagem f@st 800/840/908/...) |
83390711 | 88 | Release: %{_rel}@%{_kernel_ver_str} |
89 | Group: Base/Kernel | |
e616b1cc | 90 | %{?with_dist_kernel:%requires_releq_kernel_smp} |
83390711 | 91 | Requires(post,postun): /sbin/depmod |
44428a95 | 92 | Provides: kernel-usb(eagle) = %{version}-%{_rel} |
93 | %if "%{_alt_kernel}" == "%{_nil}" | |
0d9b0419 | 94 | Obsoletes: kernel-smp-usb-fast800 |
44428a95 | 95 | %endif |
83390711 | 96 | |
44428a95 | 97 | %description -n kernel%{_alt_kernel}-smp-usb-eagle |
227642d7 PS |
98 | Linux SMP driver for the Eagle 8051 Analog (sagem f@st |
99 | 800/840/908/...) modems. | |
83390711 | 100 | |
40419231 JR |
101 | %description -n kernel%{_alt_kernel}-smp-usb-eagle -l pl.UTF-8 |
102 | Sterownik dla Linuksa SMP do modemów Eagle 8051 Analog (sagem f@st | |
227642d7 | 103 | 800/840/908/...). |
83390711 | 104 | |
105 | %prep | |
0d9b0419 | 106 | %setup -q |
227642d7 PS |
107 | %patch1 -p1 |
108 | %patch2 -p1 | |
47546efc | 109 | %patch3 -p1 |
e142fedd | 110 | %patch4 -p1 |
a911bb03 | 111 | %patch5 -p1 |
2a3d78a5 | 112 | %patch6 -p1 |
dc6d637b | 113 | %patch7 -p1 |
e669e885 | 114 | %patch8 -p1 |
d01dce52 | 115 | %patch9 -p1 |
83390711 | 116 | |
b7fb1812 JB |
117 | %ifnarch %{ix86} |
118 | # invalid not only for ppc | |
0d9b0419 | 119 | sed -i 's/-mpreferred-stack-boundary=2//' driver/Makefile |
b7fb1812 JB |
120 | %endif |
121 | ||
83390711 | 122 | %build |
e616b1cc | 123 | %if %{with kernel} |
f576010f | 124 | %build_kernel_modules -C driver -m eagle-usb \ |
125 | USE_CMVS=%{?with_cmvs:1}%{!?with_cmvs:0} | |
e616b1cc | 126 | %endif |
83390711 | 127 | |
e616b1cc | 128 | %if %{with userspace} |
227642d7 PS |
129 | %{__aclocal} -I . |
130 | %{__autoconf} | |
5d115eac | 131 | %configure \ |
a81e78ee | 132 | %{!?with_cmvs:--disable-cmvs} \ |
58ebbab3 | 133 | --with-dsp-dir=%{_datadir}/misc |
134 | ||
227642d7 | 135 | %{__make} -C driver/firmware \ |
58ebbab3 | 136 | CC="%{__cc}" \ |
5d115eac | 137 | OPT="%{rpmcflags}" |
227642d7 | 138 | %{__make} -C driver/user \ |
58ebbab3 | 139 | CC="%{__cc}" \ |
5d115eac | 140 | OPT="%{rpmcflags}" |
227642d7 | 141 | %{__make} -C pppoa \ |
58ebbab3 | 142 | CC="%{__cc}" \ |
5d115eac | 143 | OPT="%{rpmcflags}" |
e616b1cc | 144 | %endif |
83390711 | 145 | |
146 | %install | |
147 | rm -rf $RPM_BUILD_ROOT | |
83390711 | 148 | |
e616b1cc | 149 | %if %{with kernel} |
f576010f | 150 | %install_kernel_modules -m driver/eagle-usb -d kernel/drivers/usb/net |
e616b1cc JB |
151 | %endif |
152 | ||
153 | %if %{with userspace} | |
0d9b0419 | 154 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{analog,hotplug,ppp} \ |
e616b1cc | 155 | $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/hotplug/eagle} |
83390711 | 156 | %{__make} -C driver/firmware install \ |
cb4cc989 | 157 | EU_DSP_DIR=$RPM_BUILD_ROOT%{_datadir}/misc |
227642d7 | 158 | %{__make} -C driver/user install \ |
15edc26c | 159 | EU_DIR=$RPM_BUILD_ROOT%{_sysconfdir}/eagle-usb \ |
227642d7 PS |
160 | EU_SCRIPT_DIR=$RPM_BUILD_ROOT%{_sysconfdir}/eagle-usb \ |
161 | SBINDIR=$RPM_BUILD_ROOT%{_sbindir} | |
47546efc | 162 | mv $RPM_BUILD_ROOT%{_sysconfdir}/eagle-usb/eagle-usb.conf{.template,} |
227642d7 PS |
163 | %{__make} -C pppoa install \ |
164 | SBINDIR=$RPM_BUILD_ROOT%{_sbindir} | |
e616b1cc | 165 | %endif |
83390711 | 166 | |
167 | %clean | |
168 | rm -rf $RPM_BUILD_ROOT | |
169 | ||
44428a95 | 170 | %post -n kernel%{_alt_kernel}-usb-eagle |
88c83b1a PS |
171 | %depmod %{_kernel_ver} |
172 | ||
44428a95 | 173 | %postun -n kernel%{_alt_kernel}-usb-eagle |
88c83b1a PS |
174 | %depmod %{_kernel_ver} |
175 | ||
44428a95 | 176 | %post -n kernel%{_alt_kernel}-smp-usb-eagle |
d22158cb | 177 | %depmod %{_kernel_ver}smp |
88c83b1a | 178 | |
44428a95 | 179 | %postun -n kernel%{_alt_kernel}-smp-usb-eagle |
d22158cb | 180 | %depmod %{_kernel_ver}smp |
88c83b1a | 181 | |
e616b1cc | 182 | %if %{with userspace} |
83390711 | 183 | %files |
184 | %defattr(644,root,root,755) | |
942468d6 | 185 | %doc README |
47546efc | 186 | %dir %{_sysconfdir}/eagle-usb |
254105ab SP |
187 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/eagle-usb/eagle-usb.conf |
188 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/eagle-usb/*.txt | |
83390711 | 189 | %attr(755,root,root) %{_sbindir}/* |
190 | %{_datadir}/misc/*.bin | |
e616b1cc | 191 | %endif |
83390711 | 192 | |
e616b1cc | 193 | %if %{with kernel} |
44428a95 | 194 | %files -n kernel%{_alt_kernel}-usb-eagle |
83390711 | 195 | %defattr(644,root,root,755) |
227642d7 | 196 | /lib/modules/%{_kernel_ver}/kernel/drivers/usb/net/*.ko* |
83390711 | 197 | |
942468d6 | 198 | %if %{with smp} && %{with dist_kernel} |
44428a95 | 199 | %files -n kernel%{_alt_kernel}-smp-usb-eagle |
83390711 | 200 | %defattr(644,root,root,755) |
227642d7 | 201 | /lib/modules/%{_kernel_ver}smp/kernel/drivers/usb/net/*.ko* |
942468d6 | 202 | %endif |
e616b1cc | 203 | %endif |