#
-# TODO: - CUDA support (on bcond)
-# - consider name change to OpenCV
+# TODO:
+# - CUDA support (on bcond)
+# - OpenNI (http://openni.org/) + PrimeSensor module
+# - XIMEA? cmake file seems to be Win32-specific, but ximea.com has some Linux package
#
# Conditional build:
%bcond_without gstreamer # GStreamer support
Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
Name: opencv
Version: 2.3.1
-Release: 1
+Release: 3
Epoch: 1
%if %{with unicap} || %{with xine}
License: GPL (enforced by used libraries), BSD (opencv itself)
Patch2: %{name}-unicap-c++.patch
Patch3: %{name}-c.patch
Patch4: %{name}-gcc.patch
+Patch5: %{name}-multilib.patch
URL: http://opencv.willowgarage.com/
%{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
BuildRequires: OpenEXR-devel
BuildRequires: python-devel
BuildRequires: python-numpy-devel
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.600
+BuildRequires: rpmbuild(macros) >= 1.606
BuildRequires: sed >= 4.0
BuildRequires: swig-python
%{?with_tbb:BuildRequires: tbb-devel}
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
%build
install -d build
cd build
%cmake .. \
- -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
- -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
%ifarch pentium4 %{x8664}
-DENABLE_SSE=ON \
-DENABLE_SSE2=ON \
install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_postclean
+
%clean
rm -rf $RPM_BUILD_ROOT
%files -n python-opencv
%defattr(644,root,root,755)
%attr(755,root,root) %{py_sitedir}/cv2.so
-%{py_sitedir}/cv.py
+%{py_sitedir}/cv.py[co]