]> git.pld-linux.org Git - packages/linux-gpib.git/blob - linux-gpib.spec
- updated again.
[packages/linux-gpib.git] / linux-gpib.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # allow non-distribution kernel
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_without  smp             # don't build SMP module
6 %bcond_without  userspace       # don't build userspace module
7 %bcond_with     verbose         # verbose build (V=1)
8 #
9 # main package.
10 #
11
12 %define         mod_name        gpib
13
14 Summary:        GPIB Linux Support
15 Summary(pl):    Sterowniki GPIB dkla Linuksa
16 Name:           linux-gpib
17 Version:        3.2.05
18 %define         _rel    0.1
19 Release:        %{_rel}
20 #Epoch:         
21 License:        GPL
22 Group:          Unknown
23 Vendor:         PLD
24 #Icon:          -
25 Source0:        http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
26 # Source0-md5:  65044161fe86a815c9c159fe301d85c4
27 #Source1:       -
28 # Source1-md5:  -
29 #Patch0:                %{name}-what.patch
30 URL:            http://linux-gpib.sourceforge.net/
31 %if %{with kernel}
32 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 2.6.7}
33 BuildRequires:  rpmbuild(macros) >= 1.153
34 %endif
35 BuildRequires:  kernel-headers >= 2.6.8
36 #PreReq:                -
37 Requires(pre,post):     kernel >= 2.6.8
38 #Requires(preun):       -
39 #Requires(postun):      -
40 Requires:       kernel-up >= 2.6.8
41 #Provides:      -
42 #Obsoletes:     -
43 #Conflicts:     -
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47
48 %description -l pl
49
50 # kernel subpackages.
51
52 %package -n kernel-%{mod_name}
53 Summary:        Linux driver for %{name}
54 Summary(pl):    Sterownik dla Linuksa do %{name}
55 Release:        %{_rel}@%{_kernel_ver_str}
56 Group:          Base/Kernel
57 Requires(post,postun):  /sbin/depmod
58 %if %{with dist_kernel}
59 %requires_releq_kernel_up
60 Requires(postun):       %releq_kernel_up
61 %endif
62
63 %description -n kernel-%{mod_name}
64 This is driver for %{name} for Linux.
65
66 This package contains Linux module.
67
68 %description -n kernel-%{mod_name} -l pl
69 Sterownik dla Linuksa do %{name}.
70
71 Ten pakiet zawiera modu³ j±dra Linuksa.
72
73 %package -n kernel-smp-%{mod_name}
74 Summary:        Linux SMP driver for %{name}
75 Summary(pl):    Sterownik dla Linuksa SMP do %{name}
76 Release:        %{_rel}@%{_kernel_ver_str}
77 Group:          Base/Kernel
78 Requires(post,postun):  /sbin/depmod
79 %if %{with dist_kernel}
80 %requires_releq_kernel_smp
81 Requires(postun):       %releq_kernel_smp
82 %endif
83
84 %description -n kernel-smp-%{mod_name}
85 This is driver for %{name} for Linux.
86
87 This package contains Linux SMP module.
88
89 %description -n kernel-smp-%{mod_name} -l pl
90 Sterownik dla Linuksa do %{name}.
91
92 Ten pakiet zawiera modu³ j±dra Linuksa SMP.
93
94
95 %prep
96
97 %setup -q
98
99 %build
100 %{__aclocal} -I m4
101 %{__libtoolize}
102 %{__autoconf}
103 %{__automake}
104
105 %configure \
106         --disable-guile-binding \
107         --disable-perl-binding \
108         --disable-php-binding \
109         --disable-python-binding \
110         --disable-tcl-binding \
111         --disable-documentation
112
113 ##%{__make}     
114 %if %{with userspace}
115
116
117 %endif
118
119 cd driver
120 for i in agilent_82350b agilent_82357a cb7210 cec hp82335 hp_82341 ines nec7210 pc2 sys tms9914 tnt4882; do
121 cd $i
122 %if %{with kernel}
123 # kernel module(s)
124 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
125         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
126                 exit 1
127         fi
128         rm -rf include
129         install -d include/{linux,config}
130         ln -sf %{_kernelsrcdir}/config-$cfg .config
131         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
132         ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
133         touch include/config/MARKER
134 #
135 #       patching/creating makefile(s) (optional)
136         cp -rdp ../include/* include
137         install -d include/gpib
138         cp -rdp include/gpib_user.h include/gpib
139         cp -rdp ../../config.h include
140 #
141         %{__make} -C %{_kernelsrcdir} clean \
142                 RCS_FIND_IGNORE="-name '*.ko' -o" \
143                 M=$PWD O=$PWD \
144                 %{?with_verbose:V=1}
145         %{__make} -C %{_kernelsrcdir} modules \
146                 CC="%{__cc}" CPP="%{__cpp}" \
147                 M=$PWD O=$PWD \
148                 %{?with_verbose:V=1}
149                 
150
151         mv $i{,-$cfg}.ko
152 done
153 %endif 
154 cd ..
155 done
156
157 %install
158 rm -rf $RPM_BUILD_ROOT
159
160 %if %{with userspace}
161
162
163 %endif
164
165 %if %{with kernel}
166 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/MODULE_DIR
167 install MODULE_NAME-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
168         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/MODULE_DIR/MODULE_NAME.ko
169 %if %{with smp} && %{with dist_kernel}
170 install MODULE_NAME-smp.ko \
171         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/MODULE_DIR/MODULE_NAME.ko
172 %endif
173 %endif
174
175 %clean
176 rm -rf $RPM_BUILD_ROOT
177
178 %post
179 %depmod %{_kernel_ver}
180
181 %postun
182 %depmod %{_kernel_ver}
183
184 #%post  -n kernel-smp-MODULE_DIR-%{name}
185 #%depmod %{_kernel_ver}smp
186
187 #%postun        -n kernel-smp-MODULE_DIR-%{name}
188 #%depmod %{_kernel_ver}smp
189
190 %if %{with kernel}
191 %files 
192 #%defattr(644,root,root,755)
193 /lib/modules/%{_kernel_ver}/MODULE_DIR/*.ko*
194
195 %endif
This page took 0.079591 seconds and 4 git commands to generate.