Spec clean up
This commit is contained in:
parent
6d8f3a71d0
commit
e156798c9f
@ -1,13 +0,0 @@
|
|||||||
diff -urNp old/modules/optflow/samples/motempl.py new/modules/optflow/samples/motempl.py
|
|
||||||
--- old/modules/optflow/samples/motempl.py 2016-12-23 12:09:43.000000000 +0100
|
|
||||||
+++ new/modules/optflow/samples/motempl.py 2017-02-27 09:04:30.218887521 +0100
|
|
||||||
@@ -37,7 +37,8 @@ if __name__ == '__main__':
|
|
||||||
sys.exit(1)
|
|
||||||
ret, frame = cam.read()
|
|
||||||
if ret == False:
|
|
||||||
- break
|
|
||||||
+ print("could not read from " + str(video_src) + " !\n")
|
|
||||||
+ sys.exit(1)
|
|
||||||
h, w = frame.shape[:2]
|
|
||||||
prev_frame = frame.copy()
|
|
||||||
motion_history = np.zeros((h, w), np.float32)
|
|
@ -4,13 +4,13 @@ wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.ta
|
|||||||
tar xf opencv-${VERSION}.tar.gz
|
tar xf opencv-${VERSION}.tar.gz
|
||||||
cd opencv-${VERSION}/
|
cd opencv-${VERSION}/
|
||||||
find ./ -iname "len*.*" -exec rm {} \;
|
find ./ -iname "len*.*" -exec rm {} \;
|
||||||
rm -r modules/xfeatures2d/
|
rm -rf modules/xfeatures2d/
|
||||||
cd ..; tar zcf opencv-clean-${VERSION}.tar.gz opencv-${VERSION}/
|
cd ..; tar zcf opencv-clean-${VERSION}.tar.gz opencv-${VERSION}/
|
||||||
rm -rf opencv-${VERSION}/
|
rm -rf opencv-${VERSION}/
|
||||||
|
|
||||||
wget -c https://github.com/opencv/opencv_contrib/archive/${VERSION}/opencv_contrib-${VERSION}.tar.gz
|
wget -c https://github.com/opencv/opencv_contrib/archive/${VERSION}/opencv_contrib-${VERSION}.tar.gz
|
||||||
tar xf opencv_contrib-${VERSION}.tar.gz
|
tar xf opencv_contrib-${VERSION}.tar.gz
|
||||||
cd opencv_contrib-${VERSION}/
|
cd opencv_contrib-${VERSION}/
|
||||||
rm -r modules/xfeatures2d/
|
rm -rf modules/xfeatures2d/
|
||||||
cd ..; tar zcf opencv_contrib-clean-${VERSION}.tar.gz opencv_contrib-${VERSION}/
|
cd ..; tar zcf opencv_contrib-clean-${VERSION}.tar.gz opencv_contrib-${VERSION}/
|
||||||
rm -rf opencv_contrib-${VERSION}/
|
rm -rf opencv_contrib-${VERSION}/
|
||||||
|
42
opencv.spec
42
opencv.spec
@ -48,9 +48,8 @@
|
|||||||
|
|
||||||
Name: opencv
|
Name: opencv
|
||||||
Version: 3.3.1
|
Version: 3.3.1
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
Summary: Collection of algorithms for computer vision
|
Summary: Collection of algorithms for computer vision
|
||||||
Group: Development/Libraries
|
|
||||||
# This is normal three clause BSD.
|
# This is normal three clause BSD.
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://opencv.org
|
URL: http://opencv.org
|
||||||
@ -65,7 +64,6 @@ Source1: %{name}_contrib-clean-%{version}.tar.gz
|
|||||||
# https://bugzilla.redhat.com/1031312
|
# https://bugzilla.redhat.com/1031312
|
||||||
Patch1: opencv-3.2.0-cmake_paths.patch
|
Patch1: opencv-3.2.0-cmake_paths.patch
|
||||||
Patch2: opencv-3.1-pillow.patch
|
Patch2: opencv-3.1-pillow.patch
|
||||||
Patch3: opencv-3.2.0-test-file-fix.patch
|
|
||||||
# Backport patch, update OpenBLAS support
|
# Backport patch, update OpenBLAS support
|
||||||
# https://github.com/opencv/opencv/pull/9955
|
# https://github.com/opencv/opencv/pull/9955
|
||||||
# https://github.com/opencv/opencv/commit/476c513447eb16784113e982f6bef0dcabb77732.patch
|
# https://github.com/opencv/opencv/commit/476c513447eb16784113e982f6bef0dcabb77732.patch
|
||||||
@ -157,7 +155,7 @@ BuildRequires: lapack-devel
|
|||||||
%{?with_va:BuildRequires: libva-devel}
|
%{?with_va:BuildRequires: libva-devel}
|
||||||
|
|
||||||
Requires: opencv-core%{_isa} = %{version}-%{release}
|
Requires: opencv-core%{_isa} = %{version}-%{release}
|
||||||
|
Requires: gcc, gcc-c++
|
||||||
|
|
||||||
%description
|
%description
|
||||||
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of
|
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of
|
||||||
@ -167,7 +165,6 @@ and Computer Vision algorithms.
|
|||||||
|
|
||||||
%package core
|
%package core
|
||||||
Summary: OpenCV core libraries
|
Summary: OpenCV core libraries
|
||||||
Group: Development/Libraries
|
|
||||||
|
|
||||||
%description core
|
%description core
|
||||||
This package contains the OpenCV C/C++ core libraries.
|
This package contains the OpenCV C/C++ core libraries.
|
||||||
@ -175,7 +172,6 @@ This package contains the OpenCV C/C++ core libraries.
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for using the OpenCV library
|
Summary: Development files for using the OpenCV library
|
||||||
Group: Development/Libraries
|
|
||||||
Requires: %{name}%{_isa} = %{version}-%{release}
|
Requires: %{name}%{_isa} = %{version}-%{release}
|
||||||
Requires: %{name}-contrib%{_isa} = %{version}-%{release}
|
Requires: %{name}-contrib%{_isa} = %{version}-%{release}
|
||||||
|
|
||||||
@ -188,7 +184,6 @@ package.
|
|||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: docs files
|
Summary: docs files
|
||||||
Group: Development/Libraries
|
|
||||||
Requires: opencv-devel = %{version}-%{release}
|
Requires: opencv-devel = %{version}-%{release}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Provides: %{name}-devel-docs = %{version}-%{release}
|
Provides: %{name}-devel-docs = %{version}-%{release}
|
||||||
@ -200,7 +195,6 @@ This package contains the OpenCV documentation, samples and examples programs.
|
|||||||
|
|
||||||
%package -n python2-opencv
|
%package -n python2-opencv
|
||||||
Summary: Python2 bindings for apps which use OpenCV
|
Summary: Python2 bindings for apps which use OpenCV
|
||||||
Group: Development/Libraries
|
|
||||||
Requires: opencv%{_isa} = %{version}-%{release}
|
Requires: opencv%{_isa} = %{version}-%{release}
|
||||||
Requires: python2-numpy
|
Requires: python2-numpy
|
||||||
%{?python_provide:%python_provide python2-%{srcname}}
|
%{?python_provide:%python_provide python2-%{srcname}}
|
||||||
@ -215,7 +209,6 @@ This package contains Python bindings for the OpenCV library.
|
|||||||
|
|
||||||
%package -n python3-opencv
|
%package -n python3-opencv
|
||||||
Summary: Python3 bindings for apps which use OpenCV
|
Summary: Python3 bindings for apps which use OpenCV
|
||||||
Group: Development/Libraries
|
|
||||||
Requires: opencv%{_isa} = %{version}-%{release}
|
Requires: opencv%{_isa} = %{version}-%{release}
|
||||||
Requires: python3-numpy
|
Requires: python3-numpy
|
||||||
%{?python_provide:%python_provide python3-%{srcname}}
|
%{?python_provide:%python_provide python3-%{srcname}}
|
||||||
@ -230,7 +223,6 @@ This package contains Python3 bindings for the OpenCV library.
|
|||||||
|
|
||||||
%package contrib
|
%package contrib
|
||||||
Summary: OpenCV contributed functionality
|
Summary: OpenCV contributed functionality
|
||||||
Group: Development/Libraries
|
|
||||||
|
|
||||||
%description contrib
|
%description contrib
|
||||||
This package is intended for development of so-called "extra" modules, contributed
|
This package is intended for development of so-called "extra" modules, contributed
|
||||||
@ -242,14 +234,16 @@ to provide decent performance and stability.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -a1
|
%setup -q -a1
|
||||||
# we don't use pre-built contribs
|
# we don't use pre-built contribs
|
||||||
rm -r 3rdparty/
|
rm -rf 3rdparty/
|
||||||
%patch1 -p1 -b .cmake_paths
|
|
||||||
# missing dependecies for dnn module in Fedora (protobuf-cpp)
|
# missing dependecies for dnn module in Fedora (protobuf-cpp)
|
||||||
rm -r modules/dnn/
|
rm -rf modules/dnn/
|
||||||
|
|
||||||
|
%patch1 -p1 -b .cmake_paths
|
||||||
%patch50 -p1 -b .openblas
|
%patch50 -p1 -b .openblas
|
||||||
|
|
||||||
pushd %{name}_contrib-%{version}
|
pushd %{name}_contrib-%{version}
|
||||||
# missing dependecies for dnn_modern module in Fedora (tiny-dnn)
|
# missing dependecies for dnn_modern module in Fedora (tiny-dnn)
|
||||||
rm -r modules/dnn_modern/
|
rm -rf modules/dnn_modern/
|
||||||
%patch2 -p1 -b .pillow
|
%patch2 -p1 -b .pillow
|
||||||
popd
|
popd
|
||||||
|
|
||||||
@ -327,14 +321,11 @@ popd
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
%post core -p /sbin/ldconfig
|
%ldconfig_scriptlets core
|
||||||
%postun core -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%ldconfig_scriptlets
|
||||||
%postun -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%post contrib -p /sbin/ldconfig
|
%ldconfig_scriptlets contrib
|
||||||
%postun contrib -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.md
|
%doc README.md
|
||||||
@ -387,9 +378,9 @@ popd
|
|||||||
%{_libdir}/libopencv_calib3d.so.%{abiver}*
|
%{_libdir}/libopencv_calib3d.so.%{abiver}*
|
||||||
%{_libdir}/libopencv_ccalib.so.%{abiver}*
|
%{_libdir}/libopencv_ccalib.so.%{abiver}*
|
||||||
#Module opencv_datasets disabled because opencv_text dependency can't be resolved!
|
#Module opencv_datasets disabled because opencv_text dependency can't be resolved!
|
||||||
#{_libdir}/libopencv_datasets.so.%{abiver}*
|
#{_libdir}/libopencv_datasets.so.%%{abiver}*
|
||||||
# Disabled because of missing dependency package in fedora (protobuf-cpp)
|
# Disabled because of missing dependency package in fedora (protobuf-cpp)
|
||||||
#{_libdir}/libopencv_dnn.so.%{abiver}*
|
#{_libdir}/libopencv_dnn.so.%%{abiver}*
|
||||||
%{_libdir}/libopencv_dpm.so.%{abiver}*
|
%{_libdir}/libopencv_dpm.so.%{abiver}*
|
||||||
%{_libdir}/libopencv_face.so.%{abiver}*
|
%{_libdir}/libopencv_face.so.%{abiver}*
|
||||||
%{_libdir}/libopencv_freetype.so.%{abiver}*
|
%{_libdir}/libopencv_freetype.so.%{abiver}*
|
||||||
@ -407,13 +398,18 @@ popd
|
|||||||
%{_libdir}/libopencv_structured_light.so.%{abiver}*
|
%{_libdir}/libopencv_structured_light.so.%{abiver}*
|
||||||
%{_libdir}/libopencv_surface_matching.so.%{abiver}*
|
%{_libdir}/libopencv_surface_matching.so.%{abiver}*
|
||||||
#Module opencv_text disabled because opencv_dnn dependency can't be resolved!
|
#Module opencv_text disabled because opencv_dnn dependency can't be resolved!
|
||||||
#{_libdir}/libopencv_text.so.%{abiver}*
|
#{_libdir}/libopencv_text.so.%%{abiver}*
|
||||||
%{_libdir}/libopencv_tracking.so.%{abiver}*
|
%{_libdir}/libopencv_tracking.so.%{abiver}*
|
||||||
%{_libdir}/libopencv_ximgproc.so.%{abiver}*
|
%{_libdir}/libopencv_ximgproc.so.%{abiver}*
|
||||||
%{_libdir}/libopencv_xobjdetect.so.%{abiver}*
|
%{_libdir}/libopencv_xobjdetect.so.%{abiver}*
|
||||||
%{_libdir}/libopencv_xphoto.so.%{abiver}*
|
%{_libdir}/libopencv_xphoto.so.%{abiver}*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 01 2018 Josef Ridky <jridky@redhat.com> - 3.3.1-8
|
||||||
|
- Spec clean up (remove Group tag, add ldconfig scriptlets, escape macros in comments)
|
||||||
|
- Remove unused patch
|
||||||
|
- Add gcc and gcc-c++ requirements
|
||||||
|
|
||||||
* Sun Feb 18 2018 Sérgio Basto <sergio@serjux.com> - 3.3.1-7
|
* Sun Feb 18 2018 Sérgio Basto <sergio@serjux.com> - 3.3.1-7
|
||||||
- Rebuild for gdcm-2.8
|
- Rebuild for gdcm-2.8
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user