3 %bcond_without dist_kernel # allow non-distribution kernel
4 %bcond_without kernel # don't build kernel modules
5 %bcond_without userspace # don't build userspace module
6 %bcond_with verbose # verbose build (V=1)
14 Summary: GPIB Linux Support
15 Summary(pl.UTF-8): Sterowniki GPIB dla Linuksa
20 Group: Applications/System
21 Source0: http://dl.sourceforge.net/linux-gpib/%{name}-%{version}.tar.gz
22 # Source0-md5: 06636539e335ad126f7893db50368142
23 Patch0: %{name}-include_file.patch
24 URL: http://linux-gpib.sourceforge.net/
26 %{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.7}
27 BuildRequires: rpmbuild(macros) >= 1.153
29 BuildRequires: kernel-headers >= 2.6.8
31 Requires(pre,post): kernel >= 2.6.8
32 Requires: kernel-up >= 2.6.8
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 The Linux GPIB package provides support for GPIB (IEEE 488) hardware.
38 %description -l pl.UTF-8
39 Pakiet Linux GPIB służy do obsługi sprzętu GPIB (IEEE 488).
43 %package -n kernel-%{mod_name}
44 Summary: Linux driver for %{name}
45 Summary(pl.UTF-8): Sterownik dla Linuksa do %{name}
46 Release: %{_rel}@%{_kernel_ver_str}
48 Requires(post,postun): /sbin/depmod
49 %if %{with dist_kernel}
50 %requires_releq_kernel_up
51 Requires(postun): %releq_kernel_up
54 %description -n kernel-%{mod_name}
55 This is driver for %{name} for Linux.
57 This package contains Linux module.
59 %description -n kernel-%{mod_name} -l pl.UTF-8
60 Sterownik dla Linuksa do %{name}.
62 Ten pakiet zawiera moduł jądra Linuksa.
71 TOPDIR="`pwd`/drivers/gpib"
72 %build_kernel_modules -C drivers/gpib -m gpib_common,cec_gpib,ines_gpib,pc2_gpib \
73 CFLAGS="%{rpmcflags} -I$TOPDIR/include -I$TOPDIR/o/include/asm/mach-default"
83 --disable-guile-binding \
84 --disable-perl-binding \
85 --disable-php-binding \
86 --disable-python-binding \
87 --disable-tcl-binding \
88 --disable-documentation
93 #for i in tms9914 agilent_82350b agilent_82357a cb7210 hp82335 hp_82341 nec7210 tnt4882 cec ines pc2 sys ; do
96 rm -rf $RPM_BUILD_ROOT
99 %install_kernel_modules -d misc -m gpib_common,cec_gpib,ines_gpib,pc2_gpib
100 #for i in agilent_82350b agilent_82357a cb7210 hp82335 hp_82341 nec7210 tms9914 tnt4882 cec ines pc2 sys; do
103 %if %{with userspace}
105 DESTDIR=$RPM_BUILD_ROOT \
106 HOTPLUG_USB_CONF_DIR=$RPM_BUILD_ROOT$HOTPLUG_USB_CONF_DIR \
107 USB_FIRMWARE_DIR=$RPM_BUILD_ROOT$USB_FIRMWARE_DIR
111 rm -rf $RPM_BUILD_ROOT
113 %post -n kernel%{_alt_kernel}-%{mod_name}
114 %depmod %{_kernel_ver}
116 %postun -n kernel%{_alt_kernel}-%{mod_name}
117 %depmod %{_kernel_ver}
120 %files -n kernel%{_alt_kernel}-%{mod_name}
121 %defattr(644,root,root,755)
122 /lib/modules/%{_kernel_ver}/misc/*.ko*