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)
23 Summary: GPIB Linux Support
24 Summary(pl.UTF-8): Sterowniki GPIB dla Linuksa
29 Group: Applications/System
30 Source0: http://dl.sourceforge.net/linux-gpib/%{name}-%{version}.tar.gz
31 # Source0-md5: cc90a7d6738953230bd24a18188ac2f5
32 Patch0: %{name}-include_file.patch
33 URL: http://linux-gpib.sourceforge.net/
35 %{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.7}
36 BuildRequires: rpmbuild(macros) >= 1.153
38 BuildRequires: kernel-headers >= 2.6.8
40 %{?with_guile:BuildRequires: guile-devel}
41 %{?with_perl:BuildRequires: perl-devel}
42 %{?with_php:BuildRequires: php-devel}
43 %{?with_python:BuildRequires: python-devel}
44 %{?with_tcl:BuildRequires: tcl-devel}
46 Requires(pre,post): kernel >= 2.6.8
47 Requires: kernel-up >= 2.6.8
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 The Linux GPIB package provides support for GPIB (IEEE 488) hardware.
53 %description -l pl.UTF-8
54 Pakiet Linux GPIB służy do obsługi sprzętu GPIB (IEEE 488).
58 %package -n kernel-%{mod_name}
59 Summary: Linux driver for %{name}
60 Summary(pl.UTF-8): Sterownik dla Linuksa do %{name}
61 Release: %{_rel}@%{_kernel_ver_str}
63 Requires(post,postun): /sbin/depmod
64 %if %{with dist_kernel}
65 %requires_releq_kernel_up
66 Requires(postun): %releq_kernel_up
69 %description -n kernel-%{mod_name}
70 This is driver for %{name} for Linux.
72 This package contains Linux module.
74 %description -n kernel-%{mod_name} -l pl.UTF-8
75 Sterownik dla Linuksa do %{name}.
77 Ten pakiet zawiera moduł jadra
86 ##TOPDIR="`pwd`/drivers/gpib"
87 ##%build_kernel_modules -C drivers/gpib -m gpib_common,cec_gpib,ines_gpib,pc2_gpib \
88 ## CFLAGS="%{rpmcflags} -I$TOPDIR/include -I$TOPDIR/o/include/asm/mach-default"
91 ##%if %{with userspace}
98 --disable-guile-binding \
99 --disable-perl-binding \
100 --disable-php-binding \
101 --disable-python-binding \
102 --disable-tcl-binding \
103 --disable-documentation
108 #for i in tms9914 agilent_82350b agilent_82357a cb7210 hp82335 hp_82341 nec7210 tnt4882 cec ines pc2 sys ; do
111 rm -rf $RPM_BUILD_ROOT
114 %install_kernel_modules -d misc -m gpib_common,cec_gpib,ines_gpib,pc2_gpib
115 #for i in agilent_82350b agilent_82357a cb7210 hp82335 hp_82341 nec7210 tms9914 tnt4882 cec ines pc2 sys; do
118 %if %{with userspace}
120 DESTDIR=$RPM_BUILD_ROOT \
121 HOTPLUG_USB_CONF_DIR=$RPM_BUILD_ROOT$HOTPLUG_USB_CONF_DIR \
122 USB_FIRMWARE_DIR=$RPM_BUILD_ROOT$USB_FIRMWARE_DIR
126 rm -rf $RPM_BUILD_ROOT
128 %post -n kernel%{_alt_kernel}-%{mod_name}
129 %depmod %{_kernel_ver}
131 %postun -n kernel%{_alt_kernel}-%{mod_name}
132 %depmod %{_kernel_ver}
135 %files -n kernel%{_alt_kernel}-%{mod_name}
136 %defattr(644,root,root,755)
137 /lib/modules/%{_kernel_ver}/misc/*.ko*