]> git.pld-linux.org Git - packages/linux-gpib.git/blob - linux-gpib.spec
- some updates.
[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
120 %if %{with kernel}
121 # kernel module(s)
122 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
123         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
124                 exit 1
125         fi
126         rm -rf include
127         install -d include/{linux,config}
128         ln -sf %{_kernelsrcdir}/config-$cfg .config
129         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
130         ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
131         touch include/config/MARKER
132 #
133 #       patching/creating makefile(s) (optional)
134 #
135         %{__make} -C %{_kernelsrcdir} clean \
136                 RCS_FIND_IGNORE="-name '*.ko' -o" \
137                 M=$PWD O=$PWD \
138                 %{?with_verbose:V=1}
139         %{__make} -C %{_kernelsrcdir} modules \
140                 CC="%{__cc}" CPP="%{__cpp}" \
141                 M=$PWD O=$PWD \
142                 %{?with_verbose:V=1}
143
144 ##      mv MODULE_NAME{,-$cfg}.ko
145 done
146 %endif
147
148 %install
149 rm -rf $RPM_BUILD_ROOT
150
151 %if %{with userspace}
152
153
154 %endif
155
156 %if %{with kernel}
157 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/MODULE_DIR
158 install MODULE_NAME-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
159         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/MODULE_DIR/MODULE_NAME.ko
160 %if %{with smp} && %{with dist_kernel}
161 install MODULE_NAME-smp.ko \
162         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/MODULE_DIR/MODULE_NAME.ko
163 %endif
164 %endif
165
166 %clean
167 rm -rf $RPM_BUILD_ROOT
168
169 %post
170 %depmod %{_kernel_ver}
171
172 %postun
173 %depmod %{_kernel_ver}
174
175 #%post  -n kernel-smp-MODULE_DIR-%{name}
176 #%depmod %{_kernel_ver}smp
177
178 #%postun        -n kernel-smp-MODULE_DIR-%{name}
179 #%depmod %{_kernel_ver}smp
180
181 %if %{with kernel}
182 %files 
183 #%defattr(644,root,root,755)
184 /lib/modules/%{_kernel_ver}/MODULE_DIR/*.ko*
185
186 %endif
This page took 0.079663 seconds and 4 git commands to generate.