diff --git a/opencv.spec b/opencv.spec new file mode 100644 index 0000000000000000000000000000000000000000..55a1e4259b7aae2272f5decca74f76af8041ad3d --- /dev/null +++ b/opencv.spec @@ -0,0 +1,66 @@ +Name: opencv +Version: 4.5.2 +Release: 1 +Summary: OpenCV means IntelĀ® Open Source Computer Vision Library. +License: Apache-2.0 +URL: https://github.com/opencv/opencv +Source0: https://github.com/opencv/opencv/archive/v%{version}.tar.gz +BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf +BuildRequires: cmake +BuildRequires: libjpeg-devel +BuildRequires: libtiff-devel +BuildRequires: libpng-devel + +%description +OpenCV means IntelĀ® Open Source Computer Vision Library. It is a collection of +C functions and a few C++ classes that implement some popular Image Processing +and Computer Vision algorithms. +ON +%global debug_package %{nil} + +%prep +%autosetup -p1 -n %{name}-%{version} + +%build +mkdir -p cmake/build +cd cmake/build +cmake ../../ -DCMAKE_BUILD_TYPE=Release -DWITH_PROTOBUF=OFF -DWITH_WEBP=OFF\ + -DWITH_IPP=OFF\ + -DWITH_ADE=OFF\ + -DBUILD_ZLIB=ON\ + -DBUILD_JPEG=OFF\ + -DBUILD_PNG=OFF\ + -DBUILD_OPENEXR=ON\ + -DBUILD_TESTS=ON\ + -DBUILD_PERF_TESTS=OFF\ + -DBUILD_opencv_apps=OFF\ + -DCMAKE_SKIP_RPATH=TRUE\ + -DBUILD_opencv_python3=OFF\ + -DBUILD_opencv_videoio=OFF\ + -DWITH_FFMPEG=OFF\ + -DWITH_TIFF=ON\ + -DBUILD_TIFF=OFF\ + -DWITH_ITT=OFF\ + -DWITH_JASPER=OFF\ + -DBUILD_JASPER=OFF\ + -DOPENCV_BIN_INSTALL_PATH=%{_bindir}\ + -DOPENCV_LIB_INSTALL_PATH=%{_libdir}\ + -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} +make -j24 V=1 + + +%install +cd cmake/build +# mkdir %{buildroot}/usr/ +make install DESTDIR=%{buildroot} + +%files +%defattr(-,root,root) +%exclude /usr/local/bin/setup_vars_opencv4.sh +%{_libdir}/* +%{_includedir}/* +%exclude /usr/local/share/* + +%changelog +* Wed Sep 29 2021 shenwei - 4.5.2-1 +- package init diff --git a/v4.5.2.tar.gz b/v4.5.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..cd63e5b3cc627068875a11f6a19502d4fdefa68a Binary files /dev/null and b/v4.5.2.tar.gz differ