--- /dev/null
+------------------------------------------------------------------------
+r1927 | dpenkler | 2020-11-23 12:54:12 +0100 (Mon, 23 Nov 2020) | 1 line
+
+Exclude compilation of lpvo for KERNEL >= 5.10
+
+Index: linux-gpib-kernel/drivers/gpib/Makefile
+===================================================================
+--- linux-gpib-kernel/drivers/gpib/Makefile (revision 1926)
++++ linux-gpib-kernel/drivers/gpib/Makefile (revision 1927)
+@@ -2,6 +2,9 @@
+ LINUXINCLUDE := -I$(GPIB_TOP_DIR)/compat/include $(LINUXINCLUDE)
+ endif
+
++KERNEL_GE_5_10 = $(shell expr \( $(VERSION) '>' "5" \) \| \
++ \( \( $(VERSION) '=' "5" \) \& \( $(PATCHLEVEL) '>=' 10 \) \) )
++
+ subdir-ccflags-y := -I$(src)/include \
+ -DHAVE_DEV_OF_NODE=$(HAVE_DEV_OF_NODE) \
+ -DGPIB_CONFIG_PCMCIA=$(GPIB_CONFIG_PCMCIA) \
+@@ -17,7 +20,9 @@
+ obj-y += hp_82335/
+ obj-y += hp_82341/
+ obj-y += ines/
+-obj-$(CONFIG_USB) += lpvo_usb_gpib/
++ifeq (${KERNEL_GE_5_10},0)
++ obj-$(CONFIG_USB) += lpvo_usb_gpib/
++endif
+ obj-y += nec7210/
+ obj-$(CONFIG_USB) += ni_usb/
+ ifeq ($(CONFIG_GPIB_ISA),yes)
%define php_name php%{?php_suffix}
-%define rel 1
+%define rel 2
%define pname linux-gpib
Summary: GPIB (IEEE 488) Linux support
Summary(pl.UTF-8): Obsługa GPIB (IEEE 488) dla Linuksa
Patch5: %{pname}-guile2.patch
Patch6: %{pname}-php7.patch
Patch8: kernel-5.2.patch
+Patch9: kernel-5.10.patch
URL: http://linux-gpib.sourceforge.net/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
%define build_kernel_pkg()\
%{__make} VERBOSE=1 LINUX_SRCDIR=%{_kernelsrcdir}\
cd drivers/gpib\
+%if %{_kernel_version_code} < %{_kernel_version_magic 5 10 0}\
+%if %{with drivers_usb}\
+%install_kernel_modules -D installed -m lpvo_usb_gpib/lpvo_usb_gpib -d kernel/gpib\
+%endif\
+%endif\
%ifarch %{ix86}\
-%install_kernel_modules -D installed -m agilent_82350b/agilent_82350b,cb7210/cb7210,cec/cec_gpib,hp_82335/hp82335,ines/ines_gpib,nec7210/nec7210,sys/gpib_common,tms9914/tms9914,tnt4882/tnt4882%{?with_drivers_isa:,pc2/pc2_gpib}%{?with_drivers_usb:,agilent_82357a/agilent_82357a,lpvo_usb_gpib/lpvo_usb_gpib,ni_usb/ni_usb_gpib} -d kernel/gpib\
+%install_kernel_modules -D installed -m agilent_82350b/agilent_82350b,cb7210/cb7210,cec/cec_gpib,hp_82335/hp82335,ines/ines_gpib,nec7210/nec7210,sys/gpib_common,tms9914/tms9914,tnt4882/tnt4882%{?with_drivers_isa:,pc2/pc2_gpib}%{?with_drivers_usb:,agilent_82357a/agilent_82357a,ni_usb/ni_usb_gpib} -d kernel/gpib\
%else\
-%install_kernel_modules -D installed -m agilent_82350b/agilent_82350b,cb7210/cb7210,cec/cec_gpib,hp_82335/hp82335,hp_82341/hp_82341,ines/ines_gpib,nec7210/nec7210,sys/gpib_common,tms9914/tms9914,tnt4882/tnt4882%{?with_drivers_isa:,pc2/pc2_gpib}%{?with_drivers_usb:,agilent_82357a/agilent_82357a,lpvo_usb_gpib/lpvo_usb_gpib,ni_usb/ni_usb_gpib} -d kernel/gpib\
+%install_kernel_modules -D installed -m agilent_82350b/agilent_82350b,cb7210/cb7210,cec/cec_gpib,hp_82335/hp82335,hp_82341/hp_82341,ines/ines_gpib,nec7210/nec7210,sys/gpib_common,tms9914/tms9914,tnt4882/tnt4882%{?with_drivers_isa:,pc2/pc2_gpib}%{?with_drivers_usb:,agilent_82357a/agilent_82357a,ni_usb/ni_usb_gpib} -d kernel/gpib\
%endif\
cd ../..\
%{nil}
%ifarch %{ix86}
%patch8 -p1
%endif
+%patch9 -p1
%endif
%build