-%package -n kernel-%{mod_name}
-Summary: Linux driver for %{name}
-Summary(pl): Sterownik dla Linuksa do %{name}
-Release: %{_rel}@%{_kernel_ver_str}
-Group: Base/Kernel
-Requires(post,postun): /sbin/depmod
-%if %{with dist_kernel}
-%requires_releq_kernel_up
-Requires(postun): %releq_kernel_up
-%endif
-
-%description -n kernel-%{mod_name}
-This is driver for %{name} for Linux.
-
-This package contains Linux module.
-
-%description -n kernel-%{mod_name} -l pl
-Sterownik dla Linuksa do %{name}.
-
-Ten pakiet zawiera modu³ j±dra Linuksa.
-
-%package -n kernel-smp-%{mod_name}
-Summary: Linux SMP driver for %{name}
-Summary(pl): Sterownik dla Linuksa SMP do %{name}
-Release: %{_rel}@%{_kernel_ver_str}
-Group: Base/Kernel
-Requires(post,postun): /sbin/depmod
-%if %{with dist_kernel}
-%requires_releq_kernel_smp
-Requires(postun): %releq_kernel_smp
-%endif
-
-%description -n kernel-smp-%{mod_name}
-This is driver for %{name} for Linux.
-
-This package contains Linux SMP module.
-
-%description -n kernel-smp-%{mod_name} -l pl
-Sterownik dla Linuksa do %{name}.
-
-Ten pakiet zawiera modu³ j±dra Linuksa SMP.
+%package hotplug
+Summary: Linux GPIB support for legacy USB hotplug
+Summary(pl.UTF-8): Obsługa Linux GPIB dla starego systemu hotplug USB
+Group: Applications/System
+Requires: %{name} = %{version}-%{release}
+Requires: hotplug
+
+%description hotplug
+Linux GPIB support for legacy USB hotplug.
+
+%description hotplug -l pl.UTF-8
+Obsługa Linux GPIB dla starego systemu hotplug USB.
+
+%package libs
+Summary: Shared GPIB library
+Summary(pl.UTF-8): Biblioteka współdzielona GPIB
+Group: Libraries
+
+%description libs
+Shared GPIB library.
+
+%description libs -l pl.UTF-8
+Biblioteka współdzielona GPIB.
+
+%package devel
+Summary: Header file for GPIB library
+Summary(pl.UTF-8): Plik nagłówkowy biblioteki GPIB
+Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
+
+%description devel
+Header file for GPIB library.
+
+%description devel -l pl.UTF-8
+Plik nagłówkowy biblioteki GPIB.
+
+%package static
+Summary: Static GPIB library
+Summary(pl.UTF-8): Biblioteka statyczna GPIB
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static GPIB library.
+
+%description static -l pl.UTF-8
+Biblioteka statyczna GPIB.
+
+%package -n perl-gpib
+Summary: Perl bindings for GPIB library
+Summary(pl.UTF-8): Wiązania Perla do biblioteki GPIB
+Group: Development/Languages/Perl
+Requires: %{name}-libs = %{version}-%{release}
+
+%description -n perl-gpib
+Perl bindings for GPIB library.
+
+%description -n perl-gpib -l pl.UTF-8
+Wiązania Perla do biblioteki GPIB.
+
+%package -n python-gpib
+Summary: Python bindings for GPIB library
+Summary(pl.UTF-8): Wiązania Pythona do biblioteki GPIB
+Group: Libraries/Python
+Requires: %{name}-libs = %{version}-%{release}
+Requires: python-libs
+
+%description -n python-gpib
+Python bindings for GPIB library.
+
+%description -n python-gpib -l pl.UTF-8
+Wiązania Pythona do biblioteki GPIB.
+
+%package -n tcl-gpib
+Summary: Tcl bindings for GPIB library
+Summary(pl.UTF-8): Wiązania Tcl-a do biblioteki GPIB
+Group: Libraries
+Requires: %{name}-libs = %{version}-%{release}
+Requires: tcl
+
+%description -n tcl-gpib
+Tcl bindings for GPIB library.
+
+%description -n tcl-gpib -l pl.UTF-8
+Wiązania Tcl-a do biblioteki GPIB.
+
+%package doc
+Summary: Linux-GPIB tools and library documentation
+Summary(pl.UTF-8): Dokumentacja narzędzi i biblioteki Linux-GPIB
+License: GFDL v1.2+ or GPL v2+
+Group: Documentation
+
+%description doc
+Linux-GPIB tools and library documentation.
+
+%description doc -l pl.UTF-8
+Dokumentacja narzędzi i biblioteki Linux-GPIB.
+
+%define kernel_pkg()\
+%package -n kernel%{_alt_kernel}-gpib\
+Summary: Linux GPIB drivers\
+Summary(pl.UTF-8): Sterowniki GPIB dla Linuksa\
+Release: %{rel}@%{_kernel_ver_str}\
+Group: Base/Kernel\
+Requires(post,postun): /sbin/depmod\
+%requires_releq_kernel\
+Requires(postun): %releq_kernel\
+\
+%description -n kernel%{_alt_kernel}-gpib\
+This package contains Linux drivers for GPIB (IEEE 488) hardware.\
+\
+%description -n kernel%{_alt_kernel}-gpib -l pl.UTF-8\
+Ten pakiet zawiera sterowniki dla Linuksa do urządzeń GPIB (IEEE 488).\
+\
+%if %{with kernel}\
+%files -n kernel%{_alt_kernel}-gpib\
+%defattr(644,root,root,755)\
+/lib/modules/%{_kernel_ver}/kernel/gpib\
+%endif\
+\
+%post -n kernel%{_alt_kernel}-gpib\
+%depmod %{_kernel_ver}\
+\
+%postun -n kernel%{_alt_kernel}-gpib\
+%depmod %{_kernel_ver}\
+%{nil}
+
+%define build_kernel_pkg()\
+TOPDIR=$(pwd)\
+%build_kernel_modules -C drivers/gpib -m gpib -- EARLYCPPFLAGS="-I$TOPDIR -I$TOPDIR/drivers/gpib/include -I$TOPDIR/include"\
+cd drivers/gpib\
+%install_kernel_modules -D installed -m agilent_82350b/agilent_82350b,agilent_82357a/agilent_82357a,cb7210/cb7210,cec/cec_gpib,hp_82335/hp82335,hp_82341/hp_82341,ines/ines_gpib,lpvo_usb_gpib/lpvo_usb_gpib,nec7210/nec7210,ni_usb/ni_usb_gpib,pc2/pc2_gpib,sys/gpib_common,tms9914/tms9914,tnt4882/tnt4882 -d kernel/gpib\
+%{nil}
+
+%define install_kernel_pkg()\
+%{nil}
+
+%{?with_kernel:%{expand:%create_kernel_packages}}