]> git.pld-linux.org Git - packages/linux-gpib.git/blobdiff - linux-gpib.spec
- rel 1
[packages/linux-gpib.git] / linux-gpib.spec
index 3f6bd2fd2a89a98698527d99ff93ec999027f581..65cde524c7fa6635d2fdccd8101227cb06da08e7 100644 (file)
@@ -33,26 +33,23 @@ exit 1
 %include       /usr/lib/rpm/macros.perl
 %define                php_name        php%{?php_suffix}
 
-%define                _rc     rc3
-%define                rel     0.%{_rc}.1
+%define                rel     1
 %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.0.4
+Version:       4.2.0
 Release:       %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
 License:       GPL v2+
 Group:         Applications/System
-Source0:       http://downloads.sourceforge.net/linux-gpib/%{pname}-%{version}%{_rc}.tar.gz
-# Source0-md5: e12b4eeae623015c74f8ed01107e8f92
-Patch0:                %{pname}-include_file.patch
-Patch1:                %{pname}-destdir.patch
+Source0:       http://downloads.sourceforge.net/linux-gpib/%{pname}-%{version}.tar.gz
+# Source0-md5: 0241dcc2d16f6d12a7aa2c3a623a55ff
 Patch2:                %{pname}-python.patch
 Patch3:                %{pname}-perl.patch
 Patch4:                %{pname}-firmwaredir.patch
 Patch5:                %{pname}-guile2.patch
 Patch6:                %{pname}-php7.patch
-Patch7:                kernel-4.11.patch
+Patch7:                kernel-5.0.patch
 URL:           http://linux-gpib.sourceforge.net/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -240,8 +237,16 @@ Ten pakiet zawiera sterowniki dla Linuksa do urządzeń GPIB (IEEE 488).\
 %{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"\
+%configure \\\
+       %{?with_drivers_isa:--enable-isa} \\\
+       %{?with_drivers_pcmcia:--enable-pcmcia} \\\
+       %{!?with_docs:--disable-documentation} \\\
+       %{!?with_guile:--disable-guile-binding} \\\
+       %{!?with_perl:--disable-perl-binding} \\\
+       %{!?with_python:--disable-python-binding} \\\
+       %{!?with_tcl:--disable-tcl-binding} \\\
+       --with-linux-srcdir=%{_kernelsrcdir}\
+%{__make}\
 cd drivers/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,lpvo_usb_gpib/lpvo_usb_gpib,ni_usb/ni_usb_gpib} -d kernel/gpib\
 cd ../..\
@@ -253,14 +258,21 @@ cd ../..\
 %{?with_kernel:%{expand:%create_kernel_packages}}
 
 %prep
-%setup -q -n %{pname}-%{version}%{_rc}
-%patch0 -p1
-%patch1 -p1
+%setup -q -n %{pname}-%{version}
+%if %{with userspace}
+tar xzf linux-gpib-user-%{version}.tar.gz
+cd linux-gpib-user-%{version}
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch6 -p1
+#%patch6 -p1
+cd ..
+%endif
+
+%if %{with kernel}
+tar xzf linux-gpib-kernel-%{version}.tar.gz
+cd linux-gpib-kernel-%{version}
 %patch7 -p1
 
 # disable modules build by default, just install userspace header
@@ -270,10 +282,13 @@ echo 'SUBDIRS = gpib/include' > drivers/Makefile.am
 for f in drivers/gpib/*/Makefile ; do
 echo 'override CC += $(EARLYCPPFLAGS)' >> $f
 done
+%endif
 
 %build
+%if %{with userspace}
+cd linux-gpib-user-%{version}
 %{__libtoolize}
-%{__aclocal} -I m4
+%{__aclocal}
 %{__autoconf}
 %{__autoheader}
 %{__automake}
@@ -289,14 +304,14 @@ CPPFLAGS="%{rpmcppflags} -I/usr/include/guile/2.0"
        %{!?with_php:--disable-php-binding} \
        %{!?with_python:--disable-python-binding} \
        %{?with_static_libs:--enable-static} \
-       %{!?with_tcl:--disable-tcl-binding} \
-       --with-linux-srcdir=%{_kernelsrcdir}
+       %{!?with_tcl:--disable-tcl-binding}
 
-%if %{with userspace}
 %{__make}
+cd ..
 %endif
 
 %if %{with kernel}
+cd linux-gpib-kernel-%{version}
 %{expand:%build_kernel_packages}
 %endif
 
@@ -305,11 +320,14 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_examplesdir}
 
 %if %{with kernel}
+cd linux-gpib-kernel-%{version}
 %{expand:%install_kernel_packages}
 cp -a drivers/gpib/installed/* $RPM_BUILD_ROOT
+cd ..
 %endif
 
 %if %{with userspace}
+cd linux-gpib-user-%{version}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT \
        HOTPLUG_USB_CONF_DIR=/lib/udev \
@@ -373,8 +391,7 @@ cp -pr language/tcl/examples $RPM_BUILD_ROOT%{_examplesdir}/tcl-gpib-%{version}
 
 %if %{with docs}
 # packaged as %doc
-%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/linux-gpib/html
-%endif
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/linux-gpib-user/html
 %endif
 
 %clean
@@ -400,6 +417,7 @@ fi
 %if %{with userspace}
 %files
 %defattr(644,root,root,755)
+%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) %{_sbindir}/gpib_config
@@ -420,7 +438,7 @@ fi
 
 %files libs
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README README.HAMEG README.hp82335 TODO
+%doc linux-gpib-user-%{version}/{AUTHORS,ChangeLog,README,README.HAMEG,README.hp82335,TODO}
 %attr(755,root,root) %{_libdir}/libgpib.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libgpib.so.0
 
@@ -439,14 +457,14 @@ fi
 %if %{with guile}
 %files -n guile-gpib
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libgpib-guile-%{version}%{_rc}.so
+%attr(755,root,root) %{_libdir}/libgpib-guile-%{version}.so
 %attr(755,root,root) %{_libdir}/libgpib-guile.so
 %endif
 
 %if %{with perl}
 %files -n perl-gpib
 %defattr(644,root,root,755)
-%doc language/perl/{Changes,README}
+%doc linux-gpib-user-%{version}/language/perl/{Changes,README}
 %{perl_vendorarch}/LinuxGpib.pm
 %dir %{perl_vendorarch}/auto/LinuxGpib
 %attr(755,root,root) %{perl_vendorarch}/auto/LinuxGpib/LinuxGpib.so
@@ -459,14 +477,14 @@ fi
 %files -n %{php_name}-gpib
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/gpib.ini
-%attr(755,root,root) %{php_extensiondir}/gpib_php-%{version}%{_rc}.so
+%attr(755,root,root) %{php_extensiondir}/gpib_php-%{version}.so
 %attr(755,root,root) %{php_extensiondir}/gpib_php.so
 %endif
 
 %if %{with python}
 %files -n python-gpib
 %defattr(644,root,root,755)
-%doc language/python/README
+%doc linux-gpib-user-%{version}/language/python/README
 %attr(755,root,root) %{py_sitedir}/gpib.so
 %{py_sitedir}/Gpib.py[co]
 %{py_sitedir}/gpib-1.0-py*.egg-info
@@ -475,8 +493,8 @@ fi
 %if %{with tcl}
 %files -n tcl-gpib
 %defattr(644,root,root,755)
-%doc language/tcl/README
-%attr(755,root,root) %{_libdir}/libgpib_tcl-%{version}%{_rc}.so
+%doc linux-gpib-user-%{version}/language/tcl/README
+%attr(755,root,root) %{_libdir}/libgpib_tcl-%{version}.so
 %attr(755,root,root) %{_libdir}/libgpib_tcl.so
 %{_examplesdir}/tcl-gpib-%{version}
 %endif
@@ -484,6 +502,6 @@ fi
 %if %{with docs}
 %files doc
 %defattr(644,root,root,755)
-%doc doc/doc_html/*
+%doc linux-gpib-user-%{version}/doc/doc_html/*
 %endif
 %endif
This page took 0.52619 seconds and 4 git commands to generate.