2024-01-06 08:10:48 +01:00
|
|
|
%define pkgver %(echo %version | sed "s|[a-z]||")
|
|
|
|
%define javaver %(echo %version | cut -d. -f1-3 | tr -d .)
|
|
|
|
Name: opencv
|
2024-01-06 08:10:49 +01:00
|
|
|
Version: 2.4.10
|
2024-01-06 08:10:49 +01:00
|
|
|
Release: 2mamba
|
2024-01-06 08:10:48 +01:00
|
|
|
Summary: Collection of algorithms for computer vision
|
|
|
|
Group: Development/Libraries
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Davide Madrisan <davide.madrisan@gmail.com>
|
|
|
|
URL: http://opencv.willowgarage.com/wiki/
|
2024-01-06 08:10:48 +01:00
|
|
|
Source: http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/%{version}/opencv-%{version}.zip
|
|
|
|
#Source: http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/%{version}/opencv-%{version}.tar.gz
|
2024-01-06 08:10:48 +01:00
|
|
|
Patch0: %{name}-2.1.0-libpng14.patch
|
|
|
|
Patch1: %{name}-2.3.1-arm-build.patch
|
2024-01-06 08:10:48 +01:00
|
|
|
Patch2: opencv-2.4.9-buildfix-x86-asm-constraint.patch
|
2024-01-06 08:10:49 +01:00
|
|
|
Patch3: opencv-2.4.10-i586-inconsistent-constraint-asm.patch
|
2024-01-06 08:10:48 +01:00
|
|
|
License: BSD
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: libatk-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libavcodec-ffmpeg-devel
|
|
|
|
BuildRequires: libavformat-ffmpeg-devel
|
|
|
|
BuildRequires: libavutil-ffmpeg-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libbzip2-devel
|
|
|
|
BuildRequires: libcairo-devel
|
|
|
|
BuildRequires: libdc1394-devel
|
|
|
|
BuildRequires: libfontconfig-devel
|
|
|
|
BuildRequires: libfreetype-devel
|
|
|
|
BuildRequires: libgcc
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libgdk-pixbuf-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libglib-devel
|
2024-01-06 08:10:49 +01:00
|
|
|
BuildRequires: libgst-plugins-base-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libgst-plugins-base010-devel
|
2024-01-06 08:10:49 +01:00
|
|
|
BuildRequires: libgstreamer-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libgstreamer010-devel
|
|
|
|
BuildRequires: libgtk2-devel
|
|
|
|
BuildRequires: libilmbase-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libjasper-devel
|
|
|
|
BuildRequires: libjpeg-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libopenexr-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libpango-devel
|
|
|
|
BuildRequires: libpng-devel
|
|
|
|
BuildRequires: libpython-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libpython27-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libstdc++6-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libswscale-ffmpeg-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libtiff-devel
|
|
|
|
BuildRequires: libunicap-devel
|
|
|
|
BuildRequires: libv4l-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libxine-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: libxml2-devel
|
|
|
|
BuildRequires: libz-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
## AUTOBUILDREQ-END
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRequires: python-Imaging
|
|
|
|
BuildRequires: python-numpy
|
2024-01-06 08:10:49 +01:00
|
|
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
2024-01-06 08:10:48 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
|
|
%description
|
|
|
|
OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision.
|
|
|
|
|
2024-01-06 08:10:49 +01:00
|
|
|
%package -n lib%{name}
|
|
|
|
Summary: Collection of algorithms for computer vision
|
|
|
|
Group: System/Libraries
|
|
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
|
|
|
|
%description -n lib%{name}
|
|
|
|
OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision.
|
|
|
|
This package contains the OpenCV static libraries.
|
|
|
|
|
|
|
|
%package -n lib%{name}-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
Summary: Devel package for %{name}
|
|
|
|
Group: Development/Libraries
|
2024-01-06 08:10:49 +01:00
|
|
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
2024-01-06 08:10:48 +01:00
|
|
|
|
2024-01-06 08:10:49 +01:00
|
|
|
%description -n lib%{name}-devel
|
|
|
|
OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision.
|
|
|
|
This package contains static libraries and header files need for development.
|
|
|
|
|
|
|
|
%package -n lib%{name}-kde4
|
|
|
|
Summary: OpenCV libraries build with gstreamer 0.10 for KDE 4
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n lib%{name}-kde4
|
|
|
|
OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision.
|
|
|
|
This package contains the OpenCV libraries built with gstreamer 0.10 for KDE 4
|
|
|
|
|
|
|
|
%package -n lib%{name}-kde4-devel
|
|
|
|
Summary: Devel package for %{name}
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: lib%{name}-kde4 = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
|
|
|
|
%description -n lib%{name}-kde4-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision.
|
|
|
|
This package contains static libraries and header files need for development.
|
|
|
|
|
|
|
|
%package -n java-opencv
|
|
|
|
Summary: Java bindings for apps which use OpenCV
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
|
|
|
|
%description -n java-opencv
|
|
|
|
This package contains Python bindings for the OpenCV library.
|
|
|
|
|
2024-01-06 08:10:48 +01:00
|
|
|
%package -n python-cv
|
2024-01-06 08:10:48 +01:00
|
|
|
Summary: Python bindings for apps which use OpenCV
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
Requires: python-Imaging
|
|
|
|
Requires: python-numpy
|
2024-01-06 08:10:48 +01:00
|
|
|
Provides: opencv-python
|
|
|
|
Obsoletes: opencv-python
|
2024-01-06 08:10:48 +01:00
|
|
|
|
2024-01-06 08:10:48 +01:00
|
|
|
%description -n python-cv
|
2024-01-06 08:10:48 +01:00
|
|
|
This package contains Python bindings for the OpenCV library.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2024-01-06 08:10:49 +01:00
|
|
|
#-D -T
|
|
|
|
#:<< _EOF
|
2024-01-06 08:10:48 +01:00
|
|
|
%ifarch %{ix86}
|
|
|
|
%patch2 -p1
|
|
|
|
%endif
|
2024-01-06 08:10:49 +01:00
|
|
|
%patch3 -p1
|
2024-01-06 08:10:48 +01:00
|
|
|
|
|
|
|
# WARNING: don't reinstall with -D -T or cmake files will be incorrect
|
2024-01-06 08:10:48 +01:00
|
|
|
#% ifarch arm
|
|
|
|
#% patch1 -p2
|
|
|
|
#% endif
|
|
|
|
|
|
|
|
%build
|
2024-01-06 08:10:49 +01:00
|
|
|
#:<< _EOF
|
2024-01-06 08:10:48 +01:00
|
|
|
#-- Interfaces:
|
|
|
|
# -- Use IPP: NO (Intel Performance Primitive)
|
|
|
|
# -- Use TBB: NO (Threading Building Blocks library)
|
|
|
|
# -- Build Documentation 0
|
|
|
|
#
|
|
|
|
# append flag -D__STDC_CONSTANT_MACROS to fix build with ffmpeg >= 0.6
|
|
|
|
PYTHON_PATH=`echo %python27_sitelib | sed "s|%{_prefix}/||"`
|
2024-01-06 08:10:49 +01:00
|
|
|
%cmake -d build \
|
2024-01-06 08:10:48 +01:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DWITH_GSTREAMER=1 \
|
|
|
|
-DWITH_XINE=1 \
|
|
|
|
-DWITH_UNICAP=1 \
|
|
|
|
-DWITH_1394=1 \
|
|
|
|
-DWITH_FFMPEG=1 \
|
|
|
|
-DWITH_QUICKTIME=0 \
|
|
|
|
-DBUILD_SWIG_PYTHON_SUPPORT=1 \
|
|
|
|
-DINSTALL_C_EXAMPLES=0 \
|
|
|
|
-DCMAKE_CXX_FLAGS:STRING="$RPM_OPT_FLAGS -D__STDC_CONSTANT_MACROS" \
|
|
|
|
-DPYTHON_PACKAGES_PATH:PATH=$PYTHON_PATH
|
|
|
|
|
|
|
|
%make_jobs
|
|
|
|
|
2024-01-06 08:10:49 +01:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Gstreamer 0.10 version for KDE4 (digikam)
|
|
|
|
%cmake_kde4 -d build_kde4 \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DWITH_GSTREAMER=0 \
|
|
|
|
-DWITH_XINE=1 \
|
|
|
|
-DWITH_UNICAP=1 \
|
|
|
|
-DWITH_1394=1 \
|
|
|
|
-DWITH_FFMPEG=1 \
|
|
|
|
-DWITH_QUICKTIME=0 \
|
|
|
|
-DBUILD_SWIG_PYTHON_SUPPORT=1 \
|
|
|
|
-DINSTALL_C_EXAMPLES=0 \
|
|
|
|
-DCMAKE_CXX_FLAGS:STRING="$RPM_OPT_FLAGS -D__STDC_CONSTANT_MACROS" \
|
|
|
|
-DPYTHON_PACKAGES_PATH:PATH=$PYTHON_PATH
|
|
|
|
|
|
|
|
%make_jobs
|
|
|
|
|
2024-01-06 08:10:48 +01:00
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
2024-01-06 08:10:49 +01:00
|
|
|
%makeinstall -C build_kde4
|
|
|
|
%makeinstall -C build
|
2024-01-06 08:10:48 +01:00
|
|
|
|
|
|
|
## Fix permissions
|
|
|
|
#chmod 0755 %{buildroot}%{python_sitearch}/cv2.so
|
|
|
|
#chmod 0755 %{buildroot}%{python_sitearch}/cv.py
|
|
|
|
|
|
|
|
# Remove unpackaged files
|
|
|
|
rm -fr %{buildroot}%{_datadir}/opencv/doc
|
2024-01-06 08:10:49 +01:00
|
|
|
rm -rf %{buildroot}%{_kde4_sharedir}/OpenCV/java
|
|
|
|
rm -rf %{buildroot}%{_kde4_bindir}
|
|
|
|
rm -rf %{buildroot}/opt/kde/lib/python*
|
2024-01-06 08:10:48 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
2024-01-06 08:10:49 +01:00
|
|
|
%post -n lib%{name}
|
|
|
|
/sbin/ldconfig
|
|
|
|
:
|
|
|
|
|
|
|
|
%postun -n lib%{name}
|
|
|
|
/sbin/ldconfig
|
|
|
|
:
|
|
|
|
|
|
|
|
%post -n lib%{name}-kde4
|
|
|
|
/sbin/ldconfig
|
|
|
|
:
|
|
|
|
|
|
|
|
%postun -n lib%{name}-kde4
|
|
|
|
/sbin/ldconfig
|
|
|
|
:
|
2024-01-06 08:10:48 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/opencv_*
|
2024-01-06 08:10:49 +01:00
|
|
|
|
|
|
|
%files -n libopencv
|
2024-01-06 08:10:48 +01:00
|
|
|
%{_libdir}/libopencv_*.so.*
|
2024-01-06 08:10:48 +01:00
|
|
|
%dir %{_datadir}/OpenCV
|
2024-01-06 08:10:48 +01:00
|
|
|
%dir %{_datadir}/OpenCV/haarcascades
|
|
|
|
%{_datadir}/OpenCV/haarcascades/*
|
|
|
|
%dir %{_datadir}/OpenCV/lbpcascades
|
|
|
|
%{_datadir}/OpenCV/lbpcascades/*
|
|
|
|
|
2024-01-06 08:10:49 +01:00
|
|
|
%files -n libopencv-devel
|
2024-01-06 08:10:48 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_includedir}/opencv
|
|
|
|
%{_includedir}/opencv/*
|
|
|
|
%dir %{_includedir}/opencv2
|
|
|
|
%{_includedir}/opencv2/*
|
|
|
|
%{_libdir}/libopencv_*.so
|
2024-01-06 08:10:48 +01:00
|
|
|
%{_libdir}/libopencv_ts.a
|
|
|
|
%{_datadir}/OpenCV/OpenCVModules-release.cmake
|
|
|
|
%{_datadir}/OpenCV/OpenCVModules.cmake
|
2024-01-06 08:10:48 +01:00
|
|
|
%{_datadir}/OpenCV/OpenCVConfig.cmake
|
|
|
|
%{_datadir}/OpenCV/OpenCVConfig-version.cmake
|
2024-01-06 08:10:49 +01:00
|
|
|
%{_libdir}/pkgconfig/opencv.pc
|
2024-01-06 08:10:48 +01:00
|
|
|
|
|
|
|
%files -n java-opencv
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_datadir}/OpenCV/java
|
|
|
|
%{_datadir}/OpenCV/java/libopencv_java%{javaver}.so
|
|
|
|
%{_datadir}/OpenCV/java/opencv-%{javaver}.jar
|
|
|
|
|
2024-01-06 08:10:49 +01:00
|
|
|
%ifnarch arm
|
2024-01-06 08:10:48 +01:00
|
|
|
%files -n python-cv
|
2024-01-06 08:10:48 +01:00
|
|
|
%defattr(-,root,root)
|
2024-01-06 08:10:48 +01:00
|
|
|
%{python_sitelib}/cv.py
|
|
|
|
%{python_sitelib}/cv2.so
|
2024-01-06 08:10:49 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -n libopencv-kde4
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_kde4_libdir}/libopencv_calib3d.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_contrib.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_core.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_features2d.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_flann.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_gpu.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_highgui.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_imgproc.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_legacy.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_ml.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_nonfree.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_objdetect.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_ocl.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_photo.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_stitching.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_superres.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_video.so.*
|
|
|
|
%{_kde4_libdir}/libopencv_videostab.so.*
|
|
|
|
%dir %{_kde4_sharedir}/OpenCV/
|
|
|
|
%dir %{_kde4_sharedir}/OpenCV/haarcascades
|
|
|
|
%{_kde4_sharedir}/OpenCV/haarcascades/*
|
|
|
|
%dir %{_kde4_sharedir}/OpenCV/lbpcascades
|
|
|
|
%{_kde4_sharedir}/OpenCV/lbpcascades/*
|
|
|
|
|
|
|
|
%files -n libopencv-kde4-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_kde4_includedir}/opencv
|
|
|
|
%{_kde4_includedir}/opencv/*
|
|
|
|
%dir %{_kde4_includedir}/opencv2
|
|
|
|
%{_kde4_includedir}/opencv2/*
|
|
|
|
%{_kde4_libdir}/libopencv_*.so
|
|
|
|
%{_kde4_libdir}/libopencv_ts.a
|
|
|
|
%{_kde4_sharedir}/OpenCV/*.cmake
|
|
|
|
%{_kde4_libdir}/pkgconfig/opencv.pc
|
2024-01-06 08:10:48 +01:00
|
|
|
|
|
|
|
%changelog
|
2024-01-06 08:10:49 +01:00
|
|
|
* Fri May 29 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.10-2mamba
|
|
|
|
- build kde4 version with gstreamer 0.10 (should fix digikam)
|
|
|
|
|
2024-01-06 08:10:49 +01:00
|
|
|
* Sun Dec 28 2014 Automatic Build System <autodist@mambasoft.it> 2.4.10-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-06 08:10:48 +01:00
|
|
|
* Thu Sep 04 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.9-2mamba
|
|
|
|
- rebuilt to fix wrong cmake files on i586 which don't like to digikam
|
|
|
|
|
2024-01-06 08:10:48 +01:00
|
|
|
* Tue Jul 15 2014 Automatic Build System <autodist@mambasoft.it> 2.4.9-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Wed Jan 15 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.8-1mamba
|
|
|
|
- update to 2.4.8
|
|
|
|
|
|
|
|
* Wed Nov 13 2013 Automatic Build System <autodist@mambasoft.it> 2.4.7-1mamba
|
|
|
|
- automatic version update by autodist
|
2024-01-06 08:10:48 +01:00
|
|
|
|
|
|
|
* Mon Aug 26 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.6.1-3mamba
|
|
|
|
- rebuilt after upgrading libatlas-3.8.4-2mamba which fixes python-numpy
|
|
|
|
|
|
|
|
* Wed Aug 21 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.6.1-2mamba
|
|
|
|
- rebuilt with libopenexr-2.0.1-3mamba nad python-numpy 1.8
|
|
|
|
|
|
|
|
* Sun Jul 14 2013 Automatic Build System <autodist@mambasoft.it> 2.4.6.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Mon Jul 08 2013 Automatic Build System <autodist@mambasoft.it> 2.4.6-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Thu Apr 25 2013 Automatic Build System <autodist@mambasoft.it> 2.4.5-1mamba
|
|
|
|
- update to 2.4.5
|
|
|
|
|
|
|
|
* Sat Dec 01 2012 Automatic Build System <autodist@mambasoft.it> 2.4.3-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Thu Aug 09 2012 Automatic Build System <autodist@mambasoft.it> 2.4.2-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Fri Dec 09 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.1a-1mamba
|
|
|
|
- update to 2.3.1a
|
|
|
|
|
|
|
|
* Mon Oct 11 2010 Davide Madrisan <davide.madrisan@gmail.com> 2.1.0-1mamba
|
|
|
|
- update to 2.1.0
|
|
|
|
|
|
|
|
* Mon Dec 07 2009 Davide Madrisan <davide.madrisan@gmail.com> 2.0.0-1mamba
|
|
|
|
- package created by autospec
|