Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:aevseev
opencv
opencv.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File opencv.spec of Package opencv
%define realname opencv %define srcext tar.bz2 %bcond_without qt %define so_ver 4_0 %if ! 0%{?py_ver:1} %define py_ver %(python -c "import sys; v=sys.version_info[:2]; print('%%d.%%d'%%v)" 2>/dev/null || echo PYTHON-NOT-FOUND) %endif %if ! 0%{?py3_ver:1} && 0%{?suse_version} %define py3_ver %(python3 -c "import sys; v=sys.version_info[:2]; print('%%d.%%d'%%v)" 2>/dev/null || echo PYTHON-NOT-FOUND) %endif # Common info Name: %{realname} Version: 0 Release: %{?extraver:0.}1%{?dist} License: BSD-3-Clause Group: Productivity/Graphics/Other URL: https://opencv.org/ Summary: Open Source Computer Vision Library # Build-time parameters # For version see: cmake/OpenCVMinDepVersions.cmake BuildRequires: cmake >= 3.5.1 BuildRequires: gcc-c++ BuildRequires: zlib-devel >= 1.2.3 # cmake/OpenCVFindLibsGrfmt.cmake BuildRequires: libjpeg-devel BuildRequires: libtiff-devel BuildRequires: libwebp-devel BuildRequires: libjasper-devel BuildRequires: libpng-devel BuildRequires: openexr-devel # cmake/OpenCVFindLibsGUI.cmake %if %{with qt} BuildRequires: pkgconfig(Qt5Core) pkgconfig(Qt5Gui) pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Test) pkgconfig(Qt5Concurrent) pkgconfig(Qt5OpenGL) %else BuildRequires: pkgconfig(gtk+-3.0) pkgconfig(gthread-2.0) %endif BuildRequires: Mesa-devel # cmake/OpenCVFindLibsVideo.cmake BuildRequires: pkgconfig(gstreamer-base-1.0) pkgconfig(gstreamer-video-1.0) BuildRequires: pkgconfig(gstreamer-app-1.0) pkgconfig(gstreamer-riff-1.0) BuildRequires: pkgconfig(gstreamer-pbutils-1.0) BuildRequires: libavcodec-devel libavformat-devel libavutil-devel BuildRequires: libswscale-devel libavresample-devel BuildRequires: pkgconfig(libgphoto2) BuildRequires: libva-devel # cmake/OpenCVFindProtobuf.cmake BuildRequires: protobuf-devel # cmake/OpenCVDetectOpenCL.cmake BuildRequires: ocl-icd-devel # cmake/OpenCVDetectVulkan.cmake BuildRequires: vulkan-devel # Python bindings (RHEL/CentOS doesn't have numpy in standard repositories) %if 0%{?suse_version} BuildRequires: python-devel python-numpy-devel BuildRequires: python3-devel python3-numpy-devel %endif BuildRoot: %{_tmppath}/%{name}-root Source: %{realname}-%{version}.%{srcext} %description OpenCV (Open Source Computer Vision Library) is an open-source BSD-licensed library that includes several hundreds of computer vision algorithms. %package -n libopencv%{so_ver} Group: System/Libraries Summary: Open Source Computer Vision Library shared libraries Provides: libopencv_calib3d%{so_ver} Provides: libopencv_core%{so_ver} Provides: libopencv_dnn%{so_ver} Provides: libopencv_features2d%{so_ver} Provides: libopencv_flann%{so_ver} Provides: libopencv_highgui%{so_ver} Provides: libopencv_imgcodecs%{so_ver} Provides: libopencv_imgproc%{so_ver} Provides: libopencv_ml%{so_ver} Provides: libopencv_objdetect%{so_ver} Provides: libopencv_photo%{so_ver} Provides: libopencv_stitching%{so_ver} Provides: libopencv_video%{so_ver} Provides: libopencv_videoio%{so_ver} %if 0%{?rhel} || 0%{?fedora} Provides: opencv-core = %{version}-%{release} Obsoletes: opencv-core < %{version}-%{release} %endif %description -n libopencv%{so_ver} OpenCV (Open Source Computer Vision Library) is an open-source BSD-licensed library that includes several hundreds of computer vision algorithms. This package contains shared libraries. %package devel Group: Development/Languages/C and C++ Summary: Development stuff for Open Source Computer Vision Library Requires: libopencv%{so_ver} = %{version}-%{release} %description devel OpenCV (Open Source Computer Vision Library) is an open-source BSD-licensed library that includes several hundreds of computer vision algorithms. This package contains stuff needed to build software using OpenCV. %package python Group: Development/Languages/Python Summary: Python bindings for Open Source Computer Vision Library Requires: libopencv%{so_ver} = %{version}-%{release} Requires: python(abi) = %{py_ver} Provides: python-opencv = %{version}-%{release} Obsoletes: python-opencv < %{version}-%{release} %if 0%{?suse_version} Requires: python-numpy Requires: python3-numpy Requires: python(abi) = %{py3_ver} Provides: python3-opencv = %{version}-%{release} Obsoletes: python3-opencv < %{version}-%{release} %endif %description python OpenCV (Open Source Computer Vision Library) is an open-source BSD-licensed library that includes several hundreds of computer vision algorithms. This package contains Python bindings for Open Source Computer Vision Library. %package doc Group: Documentation/HTML Summary: Documentation for Open Source Computer Vision Library %description doc OpenCV (Open Source Computer Vision Library) is an open-source BSD-licensed library that includes several hundreds of computer vision algorithms. This package contains HTML documentation # Preparation step (unpackung and patching if necessary) %prep %setup -q -n %{realname}-%{version}%{?extraver} %build _CFLAGS='%{optflags} %{?gcc_lto}' _LDFLAGS='-Wl,--as-needed -Wl,--strip-all %{?gcc_lto}' mkdir build cd build cmake .. \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS_RELEASE="$_CFLAGS" \ -DCMAKE_C_FLAGS_RELEASE="$_CFLAGS" \ -DCMAKE_EXE_LINKER_FLAGS_RELEASE="$_LDFLAGS" \ -DCMAKE_MODULE_LINKER_FLAGS_RELEASE="$_LDFLAGS" \ -DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$_LDFLAGS -shared" \ -DCMAKE_SKIP_RPATH=YES \ -DCMAKE_VERBOSE_MAKEFILE=YES \ \ -DBUILD_ITT=NO \ -DBUILD_PERF_TESTS=NO \ -DBUILD_PROTOBUF=NO \ -DBUILD_TESTS=NO \ -DOPENCV_ENABLE_NONFREE=YES \ -DPROTOBUF_UPDATE_FILES=YES \ -DWITH_GPHOTO2=YES \ -DWITH_OPENGL=YES \ -DWITH_OPENMP=YES \ %if %{with qt} -DWITH_QT=YES \ %endif -DWITH_VA=YES \ -DWITH_VULKAN=YES \ \ -DOPENCV_GENERATE_PKGCONFIG=YES \ -DOPENCV_PYTHON_INSTALL_PATH=%{_libdir}/opencv %{__make} %{?_smp_mflags} # Install built stuff %install %{__make} -C build install DESTDIR=%{buildroot} # Cleanup %clean [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} # Files list %files %defattr(-,root,root) %doc LICENSE README.md %{_bindir}/* %{_datadir}/opencv4/ %exclude %{_datadir}/licenses %files -n libopencv%{so_ver} %defattr(-,root,root) %doc LICENSE README.md %{_libdir}/*.so.* %files devel %defattr(-,root,root) %doc LICENSE README.md %{_includedir}/* %{_libdir}/cmake/* %{_libdir}/pkgconfig/opencv4.pc %{_libdir}/*.so %files python %defattr(-,root,root) %doc LICENSE README.md %{_libdir}/opencv/ %post -n libopencv%{so_ver} -p /sbin/ldconfig %postun -n libopencv%{so_ver} -p /sbin/ldconfig %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor