X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=linux-gpib.spec;h=b492823061da3a011a186cc5dca42611f172de7e;hb=HEAD;hp=4bd01746e66df06b91fbd6b572dd220151fa8a66;hpb=aa7cbfa0300cb403b9d79adaf6232cfaa72c5c07;p=packages%2Flinux-gpib.git diff --git a/linux-gpib.spec b/linux-gpib.spec index 4bd0174..b492823 100644 --- a/linux-gpib.spec +++ b/linux-gpib.spec @@ -2,18 +2,18 @@ # Conditional build: %bcond_without kernel # kernel modules %bcond_without drivers_isa # ISA kernel drivers [ix86 only] -%bcond_without drivers_pcmcia # PCMCIA support in kernel drivers %bcond_without drivers_usb # USB kernel drivers %bcond_without userspace # userspace packages %bcond_without verbose # verbose modules build (V=1) -%bcond_without docs # documentation build +%bcond_without doc # documentation build %bcond_with hotplug # legacy hotplug support %bcond_without static_libs # static library %bcond_without guile # guile binding %bcond_without perl # Perl binding %bcond_with php # PHP binding -%bcond_without python # Python binding +%bcond_without python # Python (any) binding +%bcond_without python2 # Python 2.x binding %bcond_without tcl # Tcl binding # The goal here is to have main, userspace, package built once with @@ -25,41 +25,50 @@ exit 1 %endif +%if %{without userspace} +# nothing to be placed to debuginfo package +%define _enable_debug_packages 0 +%endif + %ifnarch %{ix86} %undefine with_drivers_isa -%undefine with_drivers_pcmcia +%endif +%if %{without python} +%undefine with_python2 %endif %define php_name php%{?php_suffix} -%define rel 5 +%define rel 2 %define pname linux-gpib Summary: GPIB (IEEE 488) Linux support Summary(pl.UTF-8): Obsługa GPIB (IEEE 488) dla Linuksa Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel} -Version: 4.3.0 +Version: 4.3.6 Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}} License: GPL v2+ Group: Applications/System Source0: http://downloads.sourceforge.net/linux-gpib/%{pname}-%{version}.tar.gz -# Source0-md5: 3085422695baf210b866601db6108860 +# Source0-md5: ffefc4e5c03b891c57f406a4b82395b7 Patch2: %{pname}-python.patch Patch3: %{pname}-perl.patch Patch4: %{pname}-firmwaredir.patch Patch5: %{pname}-guile2.patch Patch6: %{pname}-php7.patch Patch8: kernel-5.2.patch +Patch9: kernel-5.10.patch +Patch10: pkgconfig-version.patch +Patch11: linux-gpib-guile3.patch +Patch12: isa-dma.patch URL: http://linux-gpib.sourceforge.net/ BuildRequires: autoconf >= 2.50 BuildRequires: automake BuildRequires: libtool -BuildRequires: rpmbuild(macros) >= 1.614 -%if %{with kernel} -BuildRequires: kernel-module-build >= 3:2.6.8 -%endif +BuildRequires: rpmbuild(macros) >= 1.745 +%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.32}} %if %{with userspace} BuildRequires: bison -%{?with_docs:BuildRequires: docbook-utils} +%{?with_doc:BuildRequires: docbook-utils} BuildRequires: flex %{?with_guile:BuildRequires: guile-devel >= 1.4} %{?with_perl:BuildRequires: perl-devel} @@ -169,17 +178,30 @@ PHP bindings for GPIB library. Wiązania PHP do biblioteki GPIB. %package -n python-gpib -Summary: Python bindings for GPIB library -Summary(pl.UTF-8): Wiązania Pythona do biblioteki GPIB +Summary: Python 2 bindings for GPIB library +Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki GPIB Group: Libraries/Python Requires: %{pname}-libs = %{version}-%{release} Requires: python-libs %description -n python-gpib -Python bindings for GPIB library. +Python 2 bindings for GPIB library. %description -n python-gpib -l pl.UTF-8 -Wiązania Pythona do biblioteki GPIB. +Wiązania Pythona 2 do biblioteki GPIB. + +%package -n python3-gpib +Summary: Python 3 bindings for GPIB library +Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki GPIB +Group: Libraries/Python +Requires: %{pname}-libs = %{version}-%{release} +Requires: python3-libs + +%description -n python3-gpib +Python 3 bindings for GPIB library. + +%description -n python3-gpib -l pl.UTF-8 +Wiązania Pythona 3 do biblioteki GPIB. %package -n tcl-gpib Summary: Tcl bindings for GPIB library @@ -236,12 +258,18 @@ Ten pakiet zawiera sterowniki dla Linuksa do urządzeń GPIB (IEEE 488).\ %{nil} %define build_kernel_pkg()\ +%{__make} VERBOSE=1 LINUX_SRCDIR=%{_kernelsrcdir} clean\ %{__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} @@ -261,15 +289,19 @@ cd linux-gpib-user-%{version} %patch4 -p1 %patch5 -p1 #%patch6 -p1 +%patch10 -p1 +%patch11 -p1 cd .. %endif %if %{with kernel} tar xzf linux-gpib-kernel-%{version}.tar.gz cd linux-gpib-kernel-%{version} +%patch9 -p1 %ifarch %{ix86} %patch8 -p1 %endif +%patch12 -p1 %endif %build @@ -281,13 +313,11 @@ cd linux-gpib-user-%{version} %{__autoheader} %{__automake} %if %{with guile} -CPPFLAGS="%{rpmcppflags} -I/usr/include/guile/2.2" +CPPFLAGS="%{rpmcppflags} -I/usr/include/guile/3.0" %endif %configure \ --with-udev-libdir=/lib/udev \ - %{?with_drivers_isa:--enable-isa} \ - %{?with_drivers_pcmcia:--enable-pcmcia} \ - %{!?with_docs:--disable-documentation} \ + %{!?with_doc:--disable-documentation} \ %{!?with_guile:--disable-guile-binding} \ %{!?with_perl:--disable-perl-binding} \ %{!?with_php:--disable-php-binding} \ @@ -296,6 +326,12 @@ CPPFLAGS="%{rpmcppflags} -I/usr/include/guile/2.2" %{!?with_tcl:--disable-tcl-binding} %{__make} + +%if %{with python2} +cd language/python +%py_build +cd ../.. +%endif cd .. %endif @@ -323,6 +359,12 @@ cd linux-gpib-user-%{version} UDEV_RULES_DIR=/lib/udev/rules.d \ USB_FIRMWARE_DIR=/lib/firmware +%if %{with python2} +cd language/python +%py_install +cd ../.. +%endif + %if %{with hotplug} # use udev paths as base and legacy hotplug as addon (not the opposite) install -d $RPM_BUILD_ROOT/etc/hotplug/usb @@ -376,7 +418,7 @@ cp -pr language/tcl/examples $RPM_BUILD_ROOT%{_examplesdir}/tcl-gpib-%{version} %endif %endif -%if %{with docs} +%if %{with doc} # packaged as %doc %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/linux-gpib-user/html %endif @@ -408,9 +450,11 @@ fi %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gpib.conf %attr(755,root,root) %{_bindir}/ibterm %attr(755,root,root) %{_bindir}/ibtest +%attr(755,root,root) %{_bindir}/findlisteners %attr(755,root,root) %{_sbindir}/gpib_config /lib/udev/rules.d/98-gpib-generic.rules /lib/udev/rules.d/99-agilent_82357a.rules +/lib/udev/rules.d/99-lpvo_usb_gpib.rules /lib/udev/rules.d/99-ni_usb_gpib.rules %attr(755,root,root) /lib/udev/gpib_udev_config %attr(755,root,root) /lib/udev/gpib_udev_fxloader @@ -470,7 +514,7 @@ fi %attr(755,root,root) %{php_extensiondir}/gpib_php.so %endif -%if %{with python} +%if %{with python2} %files -n python-gpib %defattr(644,root,root,755) %doc linux-gpib-user-%{version}/language/python/README @@ -479,6 +523,16 @@ fi %{py_sitedir}/gpib-1.0-py*.egg-info %endif +%if %{with python} +%files -n python3-gpib +%defattr(644,root,root,755) +%doc linux-gpib-user-%{version}/language/python/README +%attr(755,root,root) %{py3_sitedir}/gpib.cpython-*.so +%{py3_sitedir}/Gpib.py +%{py3_sitedir}/__pycache__/Gpib.cpython-*.py[co] +%{py3_sitedir}/gpib-1.0-py*.egg-info +%endif + %if %{with tcl} %files -n tcl-gpib %defattr(644,root,root,755) @@ -488,7 +542,7 @@ fi %{_examplesdir}/tcl-gpib-%{version} %endif -%if %{with docs} +%if %{with doc} %files doc %defattr(644,root,root,755) %doc linux-gpib-user-%{version}/doc/doc_html/*