update to 3.4.1 [release 3.4.1-1mamba;Mon Jul 30 2018]

This commit is contained in:
Silvan Calarco 2024-01-06 08:10:49 +01:00
parent 88fb8c8ebd
commit 2727624153

View File

@ -1,8 +1,8 @@
%define pkgver %(echo %version | sed "s|[a-z]||")
%define javaver %(echo %version | cut -d. -f1-3 | tr -d .)
Name: opencv
Version: 2.4.11
Release: 3mamba
Version: 3.4.1
Release: 1mamba
Summary: Collection of algorithms for computer vision
Group: Development/Libraries
Vendor: openmamba
@ -21,20 +21,18 @@ BuildRequires: glibc-devel
BuildRequires: libatk-devel
BuildRequires: libavcodec-ffmpeg-devel
BuildRequires: libavformat-ffmpeg-devel
BuildRequires: libavresample-ffmpeg-devel
BuildRequires: libavutil-ffmpeg-devel
BuildRequires: libbzip2-devel
BuildRequires: libcairo-devel
BuildRequires: libdc1394-devel
BuildRequires: libfontconfig-devel
BuildRequires: libfreetype-devel
BuildRequires: libexif-devel
BuildRequires: libgcc
BuildRequires: libgdk-pixbuf-devel
BuildRequires: libglib-devel
BuildRequires: libgphoto2-devel
BuildRequires: libgst-plugins-base-devel
BuildRequires: libgst-plugins-base010-devel
BuildRequires: libgstreamer-devel
BuildRequires: libgstreamer010-devel
BuildRequires: libgtk2-devel
BuildRequires: libgtk-devel
BuildRequires: libilmbase-devel
BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
@ -42,14 +40,12 @@ BuildRequires: libopenexr-devel
BuildRequires: libpango-devel
BuildRequires: libpng-devel
BuildRequires: libpython-devel
BuildRequires: libpython27-devel
BuildRequires: libstdc++6-devel
BuildRequires: libswscale-ffmpeg-devel
BuildRequires: libtiff-devel
BuildRequires: libunicap-devel
BuildRequires: libv4l-devel
BuildRequires: libwebp-devel
BuildRequires: libxine-devel
BuildRequires: libxml2-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: python-Imaging
@ -79,24 +75,6 @@ Requires: java-opencv = %{?epoch:%epoch:}%{version}-%{release}
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}
Requires: java-opencv = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib%{name}-kde4-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
@ -109,7 +87,7 @@ This package contains Python bindings for the OpenCV library.
Summary: Python bindings for apps which use OpenCV
Group: Development/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: python-Imaging
Requires: python-Pillow
Requires: python-numpy
Provides: opencv-python
Obsoletes: opencv-python
@ -117,42 +95,28 @@ 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
%define _use_internal_dependency_generator 0
# Cohexistance provides/requires for KDE4 legacy package
%define __find_provides %{_builddir}/opencv-%{version}/find_provides.sh
cat > %{_builddir}/opencv-%{version}/find_provides.sh <<_EOF
#! /bin/sh
grep -v %{buildroot}%{_kde4_libdir} | \
%{_prefix}/lib/rpm/find-provides %{buildroot} %{_target_cpu}
_EOF
chmod +x %{_builddir}/opencv-%{version}/find_provides.sh
%define __find_requires %{_builddir}/opencv-%{version}/find_requires.sh
cat > %{_builddir}/opencv-%{version}/find_requires.sh <<_EOF
#! /bin/sh
%{_prefix}/lib/rpm/find-requires %{buildroot} %{_target_cpu} 2>/dev/null |
while read line; do
[ "\${line:0:10}" == "libopencv_" ] || echo "\$line"
done
_EOF
chmod +x %{_builddir}/opencv-%{version}/find_requires.sh
# WARNING: don't reinstall with -D -T or cmake files will be incorrect
#% ifarch arm
#% patch1 -p2
#% endif
%build
#:<< _EOF
#-- Interfaces:
@ -161,7 +125,7 @@ chmod +x %{_builddir}/opencv-%{version}/find_requires.sh
# -- Build Documentation 0
#
# append flag -D__STDC_CONSTANT_MACROS to fix build with ffmpeg >= 0.6
PYTHON_PATH=`echo %python27_sitelib | sed "s|%{_prefix}/||"`
#PYTHON_PATH=`echo %python36_sitelib | sed "s|%{_prefix}/||"`
%cmake -d build \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_GSTREAMER=1 \
@ -173,31 +137,14 @@ PYTHON_PATH=`echo %python27_sitelib | sed "s|%{_prefix}/||"`
-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
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
-DPYTHON3_EXECUTABLE:PATH=%{__python36} \
-DPYTHON3_PACKAGES_PATH:PATH=%{python36_sitelib} \
-DLIB_SUFFIX=
%make_jobs
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build_kde4
%makeinstall -C build
## Fix permissions
@ -206,9 +153,6 @@ cd ..
# Remove unpackaged files
rm -fr %{buildroot}%{_datadir}/opencv/doc
rm -rf %{buildroot}%{_kde4_sharedir}/OpenCV/java
rm -rf %{buildroot}%{_kde4_bindir}
rm -rf %{buildroot}/opt/kde/lib/python*
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -221,14 +165,6 @@ rm -rf %{buildroot}/opt/kde/lib/python*
/sbin/ldconfig
:
%post -n lib%{name}-kde4
/sbin/ldconfig
:
%postun -n lib%{name}-kde4
/sbin/ldconfig
:
%files
%defattr(-,root,root)
%{_bindir}/opencv_*
@ -241,6 +177,11 @@ rm -rf %{buildroot}/opt/kde/lib/python*
%{_datadir}/OpenCV/haarcascades/*
%dir %{_datadir}/OpenCV/lbpcascades
%{_datadir}/OpenCV/lbpcascades/*
#% 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)
@ -249,10 +190,12 @@ rm -rf %{buildroot}/opt/kde/lib/python*
%dir %{_includedir}/opencv2
%{_includedir}/opencv2/*
%{_libdir}/libopencv_*.so
%{_libdir}/libopencv_ts.a
#%{_libdir}/libopencv_ts.a
%dir %{_datadir}/OpenCV
%dir %{_datadir}/OpenCV/doc
%{_datadir}/OpenCV/doc/*
#%dir %{_datadir}/OpenCV/doc
#%{_datadir}/OpenCV/doc/*
%{_datadir}/OpenCV/valgrind.supp
%{_datadir}/OpenCV/valgrind_3rdparty.supp
%{_datadir}/OpenCV/*.cmake
%{_libdir}/pkgconfig/opencv.pc
@ -265,50 +208,20 @@ rm -rf %{buildroot}/opt/kde/lib/python*
%ifnarch arm
%files -n python-cv
%defattr(-,root,root)
%{python_sitelib}/cv.py
%{python_sitelib}/cv2.so
#%files -n python-cv-py3
#%defattr(-,root,root)
##%{python3_sitearch}/cv2.so
%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/doc
%{_kde4_sharedir}/OpenCV/doc/*
%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
%changelog
* 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