286 lines
8.9 KiB
RPMSpec
286 lines
8.9 KiB
RPMSpec
%define pkgver %(echo %version | sed "s|[a-z]||")
|
|
%define javaver %(echo %version | cut -d. -f1-3 | tr -d .)
|
|
Name: opencv
|
|
Version: 3.4.2
|
|
Release: 1mamba
|
|
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/
|
|
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
|
|
Patch0: %{name}-2.1.0-libpng14.patch
|
|
Patch1: %{name}-2.3.1-arm-build.patch
|
|
Patch2: opencv-2.4.9-buildfix-x86-asm-constraint.patch
|
|
Patch3: opencv-2.4.10-i586-inconsistent-constraint-asm.patch
|
|
License: BSD
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libatk-devel
|
|
BuildRequires: libavcodec-ffmpeg-devel
|
|
BuildRequires: libavformat-ffmpeg-devel
|
|
BuildRequires: libavresample-ffmpeg-devel
|
|
BuildRequires: libavutil-ffmpeg-devel
|
|
BuildRequires: libcairo-devel
|
|
BuildRequires: libdc1394-devel
|
|
BuildRequires: libexif-devel
|
|
BuildRequires: libgcc
|
|
BuildRequires: libgdk-pixbuf-devel
|
|
BuildRequires: libglib-devel
|
|
BuildRequires: libgphoto2-devel
|
|
BuildRequires: libgst-plugins-base-devel
|
|
BuildRequires: libgstreamer-devel
|
|
BuildRequires: libgtk-devel
|
|
BuildRequires: libilmbase-devel
|
|
BuildRequires: libjasper-devel
|
|
BuildRequires: libjpeg-devel
|
|
BuildRequires: libopenexr-devel
|
|
BuildRequires: libpango-devel
|
|
BuildRequires: libpng-devel
|
|
BuildRequires: libpython-devel
|
|
BuildRequires: libstdc++6-devel
|
|
BuildRequires: libswscale-ffmpeg-devel
|
|
BuildRequires: libtiff-devel
|
|
BuildRequires: libunicap-devel
|
|
BuildRequires: libwebp-devel
|
|
BuildRequires: libxine-devel
|
|
BuildRequires: libz-devel
|
|
## AUTOBUILDREQ-END
|
|
BuildRequires: python-Imaging
|
|
BuildRequires: python-numpy
|
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
%description
|
|
OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision.
|
|
|
|
%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
|
|
Summary: Devel package for %{name}
|
|
Group: Development/Libraries
|
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
Requires: java-opencv = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
%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 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.
|
|
|
|
%package -n python-cv
|
|
Summary: Python bindings for apps which use OpenCV
|
|
Group: Development/Libraries
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
Requires: python-Pillow
|
|
Requires: python-numpy
|
|
Provides: opencv-python
|
|
Obsoletes: opencv-python
|
|
|
|
%description -n python-cv
|
|
This package contains Python bindings for the OpenCV library.
|
|
|
|
%package -n python-cv-py3
|
|
Summary: Python bindings for apps which use OpenCV
|
|
Group: Development/Libraries
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
Requires: python-Pillow-py3
|
|
Requires: python-numpy-py3
|
|
Provides: opencv-python
|
|
Obsoletes: opencv-python
|
|
|
|
%description -n python-cv
|
|
This package contains Python bindings for the OpenCV library.
|
|
|
|
%prep
|
|
%setup -q
|
|
#-D -T
|
|
#:<< _EOF
|
|
|
|
%ifarch %{ix86}
|
|
%patch2 -p1
|
|
%endif
|
|
#%patch3 -p1
|
|
|
|
%build
|
|
#:<< _EOF
|
|
#-- 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 %python36_sitelib | sed "s|%{_prefix}/||"`
|
|
%cmake -d build \
|
|
-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" \
|
|
-DPYTHON3_EXECUTABLE:PATH=%{__python36} \
|
|
-DPYTHON3_PACKAGES_PATH:PATH=%{python36_sitelib} \
|
|
-DLIB_SUFFIX=
|
|
|
|
%make_jobs
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
%makeinstall -C build
|
|
|
|
## 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
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%post -n lib%{name}
|
|
/sbin/ldconfig
|
|
:
|
|
|
|
%postun -n lib%{name}
|
|
/sbin/ldconfig
|
|
:
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%{_bindir}/opencv_*
|
|
|
|
%files -n libopencv
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libopencv_*.so.*
|
|
%dir %{_datadir}/OpenCV
|
|
%dir %{_datadir}/OpenCV/haarcascades
|
|
%{_datadir}/OpenCV/haarcascades/*
|
|
%dir %{_datadir}/OpenCV/lbpcascades
|
|
%{_datadir}/OpenCV/lbpcascades/*
|
|
%dir %{_datadir}/OpenCV/licenses
|
|
%{_datadir}/OpenCV/licenses/*
|
|
#% ifarch x86_64
|
|
#%dir %{_datadir}/OpenCV/3rdparty
|
|
#%dir %{_datadir}/OpenCV/3rdparty/lib*
|
|
#%{_datadir}/OpenCV/3rdparty/lib*/libippicv.a
|
|
#% endif
|
|
|
|
%files -n libopencv-devel
|
|
%defattr(-,root,root)
|
|
%dir %{_includedir}/opencv
|
|
%{_includedir}/opencv/*
|
|
%dir %{_includedir}/opencv2
|
|
%{_includedir}/opencv2/*
|
|
%{_libdir}/libopencv_*.so
|
|
#%{_libdir}/libopencv_ts.a
|
|
%dir %{_datadir}/OpenCV
|
|
#%dir %{_datadir}/OpenCV/doc
|
|
#%{_datadir}/OpenCV/doc/*
|
|
%{_datadir}/OpenCV/valgrind.supp
|
|
%{_datadir}/OpenCV/valgrind_3rdparty.supp
|
|
%{_datadir}/OpenCV/*.cmake
|
|
%{_libdir}/pkgconfig/opencv.pc
|
|
|
|
%files -n java-opencv
|
|
%defattr(-,root,root)
|
|
%dir %{_datadir}/OpenCV/java
|
|
%{_datadir}/OpenCV/java/libopencv_java%{javaver}.so
|
|
%{_datadir}/OpenCV/java/opencv-%{javaver}.jar
|
|
|
|
%ifnarch arm
|
|
%files -n python-cv
|
|
%defattr(-,root,root)
|
|
%{python_sitelib}/cv2.so
|
|
|
|
#%files -n python-cv-py3
|
|
#%defattr(-,root,root)
|
|
##%{python3_sitearch}/cv2.so
|
|
%endif
|
|
|
|
%changelog
|
|
* Fri Aug 03 2018 Automatic Build System <autodist@mambasoft.it> 3.4.2-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Mon Jul 30 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.1-1mamba
|
|
- update to 3.4.1
|
|
|
|
* Thu Jan 21 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.0-1mamba
|
|
- update to 3.1.0
|
|
|
|
* Wed Dec 23 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.11-3mamba
|
|
- rebuilt with gcc 5.3.0
|
|
|
|
* Tue Sep 22 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.11-2mamba
|
|
- libopencv-devel: require java-opencv or provided cmake files fail
|
|
|
|
* Fri Aug 14 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.11-1mamba
|
|
- update to 2.4.11
|
|
|
|
* Fri May 29 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.10-2mamba
|
|
- build kde4 version with gstreamer 0.10 (should fix digikam)
|
|
|
|
* Sun Dec 28 2014 Automatic Build System <autodist@mambasoft.it> 2.4.10-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* 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
|
|
|
|
* 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
|
|
|
|
* 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
|