%define build_cuda 0 %if "%distro_section" == "nonfree" %define build_cuda 1 %endif Name: opencv Version: 2.4.3 Release: %mkrel 5 Group: Sciences/Computer science License: GPLv2+ Summary: Open Source Computer Vision library URL: http://opencv.willowgarage.com/wiki/ Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2 Patch0: OpenCV-2.4.2-link-v4l2.patch BuildRequires: cmake BuildRequires: pkgconfig(gstreamer-app-0.10) BuildRequires: pkgconfig(gstreamer-base-0.10) BuildRequires: pkgconfig(gstreamer-video-0.10) BuildRequires: pkgconfig(gthread-2.0) BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libdc1394-2) BuildRequires: pkgconfig(libswscale) BuildRequires: pkgconfig(libucil) BuildRequires: pkgconfig(libunicap) BuildRequires: libjasper-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libv4l-devel BuildRequires: python-devel BuildRequires: OpenEXR-devel BuildRequires: tiff-devel BuildRequires: zlib-devel BuildRequires: lapack-devel BuildRequires: eigen2 BuildRequires: python-numpy-devel %if %build_cuda BuildRequires: nvidia-cuda-toolkit-devel %endif %description OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision. #-------------------------------------------------------------------------------- %define libopencv_core_soname 2 %define libopencv_core %mklibname opencv_core %{libopencv_core_soname} %package -n %{libopencv_core} Summary: OpenCV core library Group: System/Libraries %description -n %{libopencv_core} OpenCV core library (basic structures, arithmetics and linear algebra, DFT, XML and YAML I/O, etc.). %files -n %{libopencv_core} %defattr(-,root,root,-) %_libdir/libopencv_core.so.%{libopencv_core_soname}* #-------------------------------------------------------------------------------- %define libopencv_imgproc_soname 2 %define libopencv_imgproc %mklibname opencv_imgproc %{libopencv_imgproc_soname} %package -n %{libopencv_imgproc} Summary: OpenCV image processing library Group: System/Libraries Requires: %{libopencv_core} = %{version}-%{release} %description -n %{libopencv_imgproc} OpenCV image processing library (filter, Gaussian blur, erode, dilate, resize, remap, etc.). %files -n %{libopencv_imgproc} %defattr(-,root,root,-) %_libdir/libopencv_imgproc.so.%{libopencv_imgproc_soname}* #-------------------------------------------------------------------------------- %define libopencv_highgui_soname 2 %define libopencv_highgui %mklibname opencv_highgui %{libopencv_highgui_soname} %package -n %{libopencv_highgui} Summary: OpenCV GUI and image/video I/O library Group: System/Libraries Requires: %{libopencv_core} = %{version}-%{release} Requires: %{libopencv_imgproc} = %{version}-%{release} %description -n %{libopencv_highgui} OpenCV GUI and image/video I/O library. %files -n %{libopencv_highgui} %defattr(-,root,root,-) %_libdir/libopencv_highgui.so.%{libopencv_highgui_soname}* #-------------------------------------------------------------------------------- %define libopencv_ml_soname 2 %define libopencv_ml %mklibname opencv_ml %{libopencv_ml_soname} %package -n %{libopencv_ml} Summary: OpenCV machine learning model library Group: System/Libraries Requires: %{libopencv_core} = %{version}-%{release} %description -n %{libopencv_ml} OpenCV statistical machine learning models (SVM, decision trees, boosting, etc.). %files -n %{libopencv_ml} %defattr(-,root,root,-) %_libdir/libopencv_ml.so.%{libopencv_ml_soname}* #-------------------------------------------------------------------------------- %define libopencv_ts_soname 2 %define libopencv_ts %mklibname opencv_ts %{libopencv_ts_soname} %package -n %{libopencv_ts} Summary: OpenCV Base test library Group: System/Libraries Requires: %{libopencv_core} = %{version}-%{release} %description -n %{libopencv_ts} OpenCV Base test library. %files -n %{libopencv_ts} %defattr(-,root,root,-) %_libdir/libopencv_ts.so.%{libopencv_ts_soname}* #-------------------------------------------------------------------------------- %define libopencv_flann_soname 2 %define libopencv_flann %mklibname opencv_flann %{libopencv_flann_soname} %package -n %{libopencv_flann} Summary: OpenCV FLANN library Group: System/Libraries %description -n %{libopencv_flann} OpenCV wrappers for the Fast Library for Approximate Neurest Neighbors (FLANN). %files -n %{libopencv_flann} %defattr(-,root,root,-) %_libdir/libopencv_flann.so.%{libopencv_flann_soname}* #-------------------------------------------------------------------------------- %define libopencv_calib3d_soname 2 %define libopencv_calib3d %mklibname opencv_calib3d %{libopencv_calib3d_soname} %package -n %{libopencv_calib3d} Summary: OpenCV camera calibration library Group: System/Libraries Requires: %{libopencv_core} = %{version}-%{release} Requires: %{libopencv_imgproc} = %{version}-%{release} %description -n %{libopencv_calib3d} OpenCV library for camera calibration, stereo correspondence, and elements of 3D data processing. %files -n %{libopencv_calib3d} %defattr(-,root,root,-) %_libdir/libopencv_calib3d.so.%{libopencv_calib3d_soname}* #-------------------------------------------------------------------------------- %define libopencv_features2d_soname 2 %define libopencv_features2d %mklibname opencv_features2d %{libopencv_features2d_soname} %package -n %{libopencv_features2d} Summary: OpenCV 2D feature detectors Group: System/Libraries Requires: %{libopencv_core} = %{version}-%{release} Requires: %{libopencv_imgproc} = %{version}-%{release} Requires: %{libopencv_calib3d} = %{version}-%{release} Requires: %{libopencv_highgui} = %{version}-%{release} Requires: %{libopencv_flann} = %{version}-%{release} %description -n %{libopencv_features2d} OpenCV 2D feature detectors and descriptors (SURF, FAST, etc.). %files -n %{libopencv_features2d} %defattr(-,root,root,-) %_libdir/libopencv_features2d.so.%{libopencv_features2d_soname}* #-------------------------------------------------------------------------------- %define libopencv_video_soname 2 %define libopencv_video %mklibname opencv_video %{libopencv_video_soname} %package -n %{libopencv_video} Summary: OpenCV motion analysis and object tracking library Group: System/Libraries Requires: %{libopencv_core} = %{version}-%{release} Requires: %{libopencv_imgproc} = %{version}-%{release} %description -n %{libopencv_video} OpenCV motion analysis and object tracking library (optical flow, motion templates, background subtraction, etc.). %files -n %{libopencv_video} %defattr(-,root,root,-) %_libdir/libopencv_video.so.%{libopencv_video_soname}* #-------------------------------------------------------------------------------- %define libopencv_objdetect_soname 2 %define libopencv_objdetect %mklibname opencv_objdetect %{libopencv_objdetect_soname} %package -n %{libopencv_objdetect} Summary: OpenCV motion analysis and object tracking library Group: System/Libraries Requires: %{libopencv_core} = %{version}-%{release} Requires: %{libopencv_imgproc} = %{version}-%{release} Requires: %{libopencv_highgui} = %{version}-%{release} %description -n %{libopencv_objdetect} OpenCV object detection library (Haar and LBP face detectors, HOG people detector, etc.). %files -n %{libopencv_objdetect} %defattr(-,root,root,-) %_libdir/libopencv_objdetect.so.%{libopencv_objdetect_soname}* #-------------------------------------------------------------------------------- %define libopencv_contrib_soname 2 %define libopencv_contrib %mklibname opencv_contrib %{libopencv_contrib_soname} %package -n %{libopencv_contrib} Summary: OpenCV contributed code library Group: System/Libraries Requires: %{libopencv_core} = %{version}-%{release} Requires: %{libopencv_imgproc} = %{version}-%{release} Requires: %{libopencv_calib3d} = %{version}-%{release} Requires: %{libopencv_highgui} = %{version}-%{release} %description -n %{libopencv_contrib} OpenCV contributed code library. %files -n %{libopencv_contrib} %defattr(-,root,root,-) %_libdir/libopencv_contrib.so.%{libopencv_contrib_soname}* #-------------------------------------------------------------------------------- %define libopencv_legacy_soname 2 %define libopencv_legacy %mklibname opencv_legacy %{libopencv_legacy_soname} %package -n %{libopencv_legacy} Summary: OpenCV legacy library Group: System/Libraries Requires: %{libopencv_core} = %{version}-%{release} Requires: %{libopencv_imgproc} = %{version}-%{release} Requires: %{libopencv_calib3d} = %{version}-%{release} Requires: %{libopencv_highgui} = %{version}-%{release} Requires: %{libopencv_video} = %{version}-%{release} %description -n %{libopencv_legacy} OpenCV library containing obsolete legacy code. %files -n %{libopencv_legacy} %defattr(-,root,root,-) %_libdir/libopencv_legacy.so.%{libopencv_legacy_soname}* #-------------------------------------------------------------------------------- %define libopencv_nonfree_soname 2 %define libopencv_nonfree %mklibname opencv_nonfree %{libopencv_nonfree_soname} %package -n %{libopencv_nonfree} Summary: OpenCV motion analysis and object tracking library Group: System/Libraries %description -n %{libopencv_nonfree} OpenCV motion analysis and object tracking library (optical flow, motion templates, background subtraction, etc.). %files -n %{libopencv_nonfree} %defattr(-,root,root,-) %_libdir/libopencv_nonfree.so.%{libopencv_nonfree_soname}* #-------------------------------------------------------------------------------- %define libopencv_photo_soname 2 %define libopencv_photo %mklibname opencv_photo %{libopencv_photo_soname} %package -n %{libopencv_photo} Summary: OpenCV motion analysis and object tracking library Group: System/Libraries %description -n %{libopencv_photo} OpenCV motion analysis and object tracking library (optical flow, motion templates, background subtraction, etc.). %files -n %{libopencv_photo} %defattr(-,root,root,-) %_libdir/libopencv_photo.so.%{libopencv_photo_soname}* #-------------------------------------------------------------------------------- %define libopencv_gpu_soname 2 %define libopencv_gpu %mklibname opencv_gpu %{libopencv_gpu_soname} %package -n %{libopencv_gpu} Summary: OpenCV GPU module Group: System/Libraries %description -n %{libopencv_gpu} The OpenCV GPU module is a set of classes and functions to utilize GPU computational capabilities. It is implemented using NVIDIA* CUDA* Runtime API and supports only NVIDIA GPUs. The OpenCV GPU module includes utility functions, low-level vision primitives, and high-level algorithms. The utility functions and low-level primitives provide a powerful infrastructure for developing fast vision algorithms taking advantage of GPU whereas the high-level functionality includes some state-of-the-art algorithms (such as stereo correspondence, face and people detectors, and others) ready to be used by the application developers. %files -n %{libopencv_gpu} %defattr(-,root,root,-) %_libdir/libopencv_gpu.so.%{libopencv_gpu_soname}* #-------------------------------------------------------------------------------- %define libopencv_stitching_soname 2 %define libopencv_stitching %mklibname opencv_stitching %{libopencv_stitching_soname} %package -n %{libopencv_stitching} Summary: OpenCV Stitching Pipeline Group: System/Libraries %description -n %{libopencv_stitching} This figure illustrates the stitching module pipeline implemented in the :ocv:class:`Stitcher` class. Using that class it's possible to configure/remove some steps, i.e. adjust the stitching pipeline according to the particular needs. All building blocks from the pipeline are available in the ``detail`` namespace, one can combine and use them separately. %files -n %{libopencv_stitching} %defattr(-,root,root,-) %_libdir/libopencv_stitching.so.%{libopencv_stitching_soname}* #-------------------------------------------------------------------------------- %define libopencv_videostab_soname 2 %define libopencv_videostab %mklibname opencv_videostab %{libopencv_videostab_soname} %package -n %{libopencv_videostab} Summary: OpenCV Video stabilization Group: System/Libraries %description -n %{libopencv_videostab} OpenCV Video stabilization module. %files -n %{libopencv_videostab} %defattr(-,root,root,-) %_libdir/libopencv_videostab.so.%{libopencv_videostab_soname}* #-------------------------------------------------------------------------------- %package devel Summary: OpenCV development files Group: Development/C Provides: libopencv-devel = %{version}-%{release} Requires: %{libopencv_core} = %{version}-%{release} Requires: %{libopencv_imgproc} = %{version}-%{release} Requires: %{libopencv_highgui} = %{version}-%{release} Requires: %{libopencv_ml} = %{version}-%{release} Requires: %{libopencv_features2d} = %{version}-%{release} Requires: %{libopencv_video} = %{version}-%{release} Requires: %{libopencv_objdetect} = %{version}-%{release} Requires: %{libopencv_calib3d} = %{version}-%{release} Requires: %{libopencv_flann} = %{version}-%{release} Requires: %{libopencv_contrib} = %{version}-%{release} Requires: %{libopencv_legacy} = %{version}-%{release} Requires: %{libopencv_ts} = %{version}-%{release} Requires: %{libopencv_nonfree} = %{version}-%{release} Requires: %{libopencv_photo} = %{version}-%{release} Requires: %{libopencv_gpu} = %{version}-%{release} Requires: %{libopencv_stitching} = %{version}-%{release} Requires: %{libopencv_videostab} = %{version}-%{release} %description devel OpenCV development files. %files devel %defattr(-,root,root,-) %_libdir/*.so %_includedir/* %_libdir/pkgconfig/* %_datadir/OpenCV/*.cmake #-------------------------------------------------------------------------------- %package -n python-opencv Summary: OpenCV Python bindings Group: Development/Python %py_requires -d %description -n python-opencv OpenCV python bindings. %files -n python-opencv %defattr(-,root,root,-) #python_sitearch/* %_libdir/python*/*/* #-------------------------------------------------------------------------------- %package doc Summary: OpenCV docs Group: Documentation BuildArch: noarch %description doc OpenCV docs. %files doc %defattr(-,root,root,-) %_datadir/OpenCV/doc #-------------------------------------------------------------------------------- %package samples Summary: OpenCV sample code Group: Documentation %description samples OpenCV sample code. %files samples %defattr(-,root,root,-) %{_bindir}/opencv_createsamples %{_bindir}/opencv_haartraining %{_bindir}/opencv_performance %{_bindir}/opencv_traincascade %dir %_datadir/OpenCV %_datadir/OpenCV/samples %_datadir/OpenCV/haarcascades %_datadir/OpenCV/lbpcascades %dir %_datadir/opencv %_datadir/opencv/samples #-------------------------------------------------------------------------------- %prep %setup -q -n OpenCV-%{version} %patch0 -p0 %build export PYTHONDONTWRITEBYTECODE= %cmake \ -DBUILD_EXAMPLES=BOOL:ON \ %ifnarch x86_64 ia64 -DENABLE_SSE=0 \ -DENABLE_SSE2=0 \ %endif -DINSTALL_C_EXAMPLES=BOOL:ON \ -DINSTALL_PYTHON_EXAMPLES=BOOL:ON \ -DINSTALL_OCTAVE_EXAMPLES=BOOL:ON \ -DPYTHON_PACKAGES_PATH=%{python_sitearch} %make %install export PYTHONDONTWRITEBYTECODE= %makeinstall_std -C build %changelog * Sun Jan 13 2013 umeabot <umeabot> 2.4.3-5.mga3 + Revision: 361955 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Jan 08 2013 fwang <fwang> 2.4.3-4.mga3 + Revision: 341736 - fix build with automake 1.13 * Sun Dec 02 2012 fwang <fwang> 2.4.3-3.mga3 + Revision: 325007 - rebuild for new openexr * Wed Nov 14 2012 fwang <fwang> 2.4.3-2.mga3 + Revision: 317584 - try building with latest ffmpeg * Mon Nov 12 2012 fwang <fwang> 2.4.3-1.mga3 + Revision: 317110 - update file list - new version 2.4.2 * Sun Oct 14 2012 ennael <ennael> 2.4.2-2.mga3 + Revision: 305463 - Documentation group + fwang <fwang> - enable nonfree build * Thu Jul 19 2012 fwang <fwang> 2.4.2-1.mga3 + Revision: 272425 - update file list - update file list - rediff build patch - new version 2.4.2 * Tue May 29 2012 fwang <fwang> 2.4.0-3.mga3 + Revision: 249032 - fix syntax - drop gpu lib from cmake config file * Tue May 29 2012 fwang <fwang> 2.4.0-2.mga3 + Revision: 249013 - disable ffmpeg build, as it causes circular deps * Tue May 29 2012 fwang <fwang> 2.4.0-1.mga3 + Revision: 248999 - new version 2.4 * Fri Dec 23 2011 fwang <fwang> 2.3.1-3.mga2 + Revision: 186409 - rebuild for new libtiff * Wed Sep 14 2011 fwang <fwang> 2.3.1-2.mga2 + Revision: 143121 - drop non-exists gpu lib * Sun Sep 11 2011 fwang <fwang> 2.3.1-1.mga2 + Revision: 142402 - update filelist - update file list - new version 2.3.1 - rebuild for new libpng * Fri Sep 02 2011 tv <tv> 2.3.0-4.mga2 + Revision: 137804 - make the huge doc subpackage be noarch + fwang <fwang> - more lib64 fixes - remove extra libs from opencvconfig - more lib64 fix - fix build with ffmpeg 0.8 - new version 2.3.0 * Sat Jun 25 2011 fwang <fwang> 2.2.0-3.mga2 + Revision: 113372 - fix build without libv4l1 - fix build with ffmpeg 0.8 - rebuild for new ffmpeg * Fri Feb 18 2011 mikala <mikala> 2.2.0-2.mga1 + Revision: 53455 - Remove BuildRoot - imported package opencv