Dominique Leuenberger 2018-01-16 08:32:34 +00:00 committed by Git OBS Bridge
parent d0704134e2
commit c9f18c22c1
2 changed files with 26 additions and 18 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Jan 8 09:35:37 UTC 2018 - tchvatal@suse.com
- Add conditionals for python2 and python3 to allow us enabling
only desired python variants when needed
- Do not depend on sphinx as py2 and py3 seem to collide there
-------------------------------------------------------------------
Sat Nov 25 14:29:14 UTC 2017 - stefan.bruens@rwth-aachen.de

View File

@ -1,7 +1,7 @@
#
# spec file for package opencv
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -22,6 +22,8 @@
%bcond_with tests
%bcond_without qt5
%bcond_without ffmpeg
%bcond_without python2
%bcond_without python3
Name: opencv
Version: 3.3.1
Release: 0
@ -48,12 +50,6 @@ BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
BuildRequires: openblas-devel
BuildRequires: pkgconfig
%if 0%{?suse_version} > 1325
BuildRequires: python2-numpy-devel
%else
BuildRequires: python-numpy-devel
%endif
BuildRequires: python3-numpy-devel
BuildRequires: tbb-devel
BuildRequires: unzip
BuildRequires: pkgconfig(IlmBase)
@ -66,11 +62,21 @@ BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libv4l2)
BuildRequires: pkgconfig(libv4lconvert)
BuildRequires: pkgconfig(python)
BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(zlib)
Provides: opencv-qt5
Obsoletes: opencv-qt5
%if %{with python2}
BuildRequires: pkgconfig(python)
%if 0%{?suse_version} > 1325
BuildRequires: python2-numpy-devel
%else
BuildRequires: python-numpy-devel
%endif
%endif
%if %{with python3}
BuildRequires: python3-numpy-devel
BuildRequires: pkgconfig(python3)
%endif
%if %{with qt5}
BuildRequires: pkgconfig(Qt5Concurrent) >= 5.2.0
BuildRequires: pkgconfig(Qt5Gui) >= 5.2.0
@ -89,9 +95,6 @@ BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libswscale)
%endif
%if 0%{?suse_version} != 1315 || 0%{?is_opensuse}
BuildRequires: python-sphinx
%endif
%description
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C
@ -232,33 +235,31 @@ chmod 644 %{buildroot}%{_docdir}/%{name}-doc/examples/python/*.py
%postun -n %{libname}%{soname} -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_bindir}/opencv_*
%{_datadir}/OpenCV
%exclude %{_datadir}/OpenCV/OpenCVConfig*.cmake
%files -n %{libname}%{soname}
%defattr(-,root,root,-)
%{_libdir}/lib*.so.*
%files devel
%defattr(-,root,root,-)
%{_includedir}/opencv/
%{_includedir}/opencv2/
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/opencv.pc
%{_datadir}/OpenCV/OpenCVConfig*.cmake
%if %{with python2}
%files -n python2-%{name}
%defattr(-,root,root,-)
%{python_sitearch}/cv2.so
%endif
%if %{with python3}
%files -n python3-%{name}
%defattr(-,root,root,-)
%{python3_sitearch}/cv2.%{py3_soflags}.so
%endif
%files doc
%defattr(-,root,root,-)
%{_docdir}/%{name}-doc/
%changelog