]> git.pld-linux.org Git - packages/fcpci.git/blob - fcpci.spec
- tabs in preamble
[packages/fcpci.git] / fcpci.spec
1 #
2 # SMP will proably *never* work.
3 #
4 # Conditional build:
5 %bcond_without  dist_kernel     # allow non-distribution kernel
6 %bcond_without  kernel          # don't build kernel modules
7 %bcond_with     smp             # build SMP module
8 %bcond_without  userspace       # don't build userspace programs
9 %bcond_with     verbose         # verbose build (V=1)
10 #
11 %if !%{with kernel}
12 %undefine       with_dist_kernel
13 %endif
14 %define         sub_ver 07
15 %define         _rel    0.1
16 Summary:        CAPI 2.0 driver of the AVM FRITZ! controller (ISDN TA)
17 Summary(pl.UTF-8):      Sterownik CAPI 2.0 do kontrolera AVM FRITZ! (ISDN TA)
18 Name:           kernel-isdn-fcpci
19 Version:        3.11
20 Release:        %{_rel}
21 Epoch:          0
22 License:        Proprietary, use is permited. Copyright (C) 2002, AVM GmbH. All rights reserved.
23 Group:          Base/Kernel
24 Source0:        ftp://ftp.avm.de/cardware/fritzcrd.pci/linux/suse.93/fcpci-suse93-%{version}-%{sub_ver}.tar.gz
25 # Source0-md5:  3ee301b5d0e8df9e4b915af58b725556
26 # to be done:
27 #Source1:       http://www.quiss.org/caiviar/Two-Fritzcards-HOWTO
28 # Source1-md5:  -
29 URL:            http://www.avm.de/de/Produkte/FRITZCard/
30 %if %{with kernel}
31 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 3:2.6.7}
32 BuildRequires:  rpmbuild(macros) >= 1.217
33 %endif
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 This is the package "CAPI4Linux" for AVM FRITZ! controlers. In package
38 you will find following components:
39 - CAPI 2.0 driver of the controller
40 - CAPI 2.0 plug-in for the Generic PPP-Stack "pppd" This package could
41   attend two controlers simultaneously.
42
43 %description -l pl.UTF-8
44 Ten pakiet zawiera CAPI4Linux dla kontrolerów AVM FRITRZ!. W pakiecie
45 znajdują się:
46 - Sterownik CAPI 2.0
47 - Wtyczka CAPI 2.0 dla pppd Ten pakiet może obsługiwać dwa kontrolery
48   jednocześnie.
49
50 %package -n kernel-up-isdn-fcpci
51 Summary:        Linux driver for fcpci
52 Summary(pl.UTF-8):      Sterownik dla Linuksa do fcpci
53 Release:        %{_rel}@%{_kernel_ver_str}
54 Group:          Base/Kernel
55 Requires(post,postun):  /sbin/depmod
56 %if %{with dist_kernel}
57 %requires_releq_kernel_up
58 Requires(postun):       %releq_kernel_up
59 %endif
60
61 %description -n kernel-up-isdn-fcpci
62 This is driver for fcpci for Linux.
63
64 This package contains Linux module.
65
66 %description -n kernel-up-isdn-fcpci -l pl.UTF-8
67 Sterownik dla Linuksa do fcpci.
68
69 Ten pakiet zawiera moduł jądra Linuksa.
70
71 %package -n kernel-smp-isdn-fcpci
72 Summary:        Linux SMP driver for fcpci
73 Summary(pl.UTF-8):      Sterownik dla Linuksa SMP do fcpci
74 Release:        %{_rel}@%{_kernel_ver_str}
75 Group:          Base/Kernel
76 Requires(post,postun):  /sbin/depmod
77 %if %{with dist_kernel}
78 %requires_releq_kernel_smp
79 Requires(postun):       %releq_kernel_smp
80 %endif
81
82 %description -n kernel-smp-isdn-fcpci
83 This is driver for fcpci for Linux.
84
85 This package contains Linux SMP module.
86
87 %description -n kernel-smp-isdn-fcpci -l pl.UTF-8
88 Sterownik dla Linuksa do fcpci.
89
90 Ten pakiet zawiera moduł jądra Linuksa SMP.
91
92 %prep
93 %setup -q -n fritz
94
95 %build
96 %if %{with userspace}
97
98 %endif
99
100 %if %{with kernel}
101 # kernel module(s)
102 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
103         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
104                 exit 1
105         fi
106         rm -rf include
107         install -d include/{linux,config}
108         ln -sf %{_kernelsrcdir}/config-$cfg .config
109         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
110 %ifarch ppc
111         if [ -d "%{_kernelsrcdir}/include/asm-powerpc" ]; then
112                 install -d include/asm
113                 cp -a %{_kernelsrcdir}/include/asm-%{_target_base_arch}/* include/asm
114                 cp -a %{_kernelsrcdir}/include/asm-powerpc/* include/asm
115         else
116                 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
117         fi
118 %else
119         ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
120 %endif
121         ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
122         touch include/config/MARKER
123         %{__make} -C %{_kernelsrcdir} clean \
124                 RCS_FIND_IGNORE="-name '*.ko' -o" \
125                 M=$PWD O=$PWD \
126                 %{?with_verbose:V=1}
127         %{__make} -C %{_kernelsrcdir} modules \
128                 CC="%{__cc}" CPP="%{__cpp}" \
129                 M=$PWD O=$PWD \
130                 %{?with_verbose:V=1}
131
132         mv fcpci1{,-$cfg}.ko
133         mv fcpci2{,-$cfg}.ko
134 done
135 %endif
136
137 %install
138 rm -rf $RPM_BUILD_ROOT
139
140 %if %{with userspace}
141
142 %endif
143
144 %if %{with kernel}
145 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/isdn/hardware
146
147 install fcpci1-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
148         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/isdn/hardware/fcpci1.ko
149
150 install fcpci2-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
151         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/isdn/hardware/fcpci2.ko
152
153 %if %{with smp} && %{with dist_kernel}
154 install fcpci-smp.ko \
155         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/isdn/hardware/fcpci.ko
156 %endif
157 %endif
158
159 %clean
160 rm -rf $RPM_BUILD_ROOT
161
162 %post   -n kernel-up-isdn-fcpci
163 %depmod %{_kernel_ver}
164
165 %postun -n kernel-up-isdn-fcpci
166 %depmod %{_kernel_ver}
167
168 %post   -n kernel-smp-isdn-fcpci
169 %depmod %{_kernel_ver}smp
170
171 %postun -n kernel-smp-isdn-fcpci
172 %depmod %{_kernel_ver}smp
173
174 %if %{with userspace}
175 %endif
176
177
178 %if %{with kernel}
179 %files -n kernel-isdn-fcpci
180 %defattr(644,root,root,755)
181 /lib/modules/%{_kernel_ver}/isdn/hardware/*.ko*
182 %doc CAPI20_Errormessages.txt license.txt *.html
183
184 %if %{with smp} && %{with dist_kernel}
185 %files -n kernel-smp-isdn-fcpci
186 %defattr(644,root,root,755)
187 /lib/modules/%{_kernel_ver}smp/isdn/hardware/*.ko*
188 %endif
189 %endif
This page took 0.103735 seconds and 3 git commands to generate.