diff --git a/opencv-clean.sh b/opencv-clean.sh new file mode 100644 index 0000000000000000000000000000000000000000..ffe18877d5e9e054543fd3d2b62c168bdd111745 --- /dev/null +++ b/opencv-clean.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +VERSION=4.7.0 + +wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz +wget -c https://github.com/opencv/opencv_contrib/archive/${VERSION}/opencv_contrib-${VERSION}.tar.gz +wget -c https://github.com/opencv/opencv_extra/archive/${VERSION}/opencv_extra-${VERSION}.tar.gz + +rm -rf opencv-${VERSION}/ +tar xf opencv-${VERSION}.tar.gz +find opencv-${VERSION}/ -iname "*lena*" -exec rm {} ';' -print +find opencv-${VERSION}/ -iname "*lenna*" -exec rm {} ';' -print +rm -r opencv-${VERSION}/modules/xfeatures2d/ +tar zcf opencv-clean-${VERSION}.tar.gz opencv-${VERSION}/ +rm -r opencv-${VERSION}/ + +rm -rf opencv_contrib-${VERSION}/ +tar xf opencv_contrib-${VERSION}.tar.gz +find opencv_contrib-${VERSION}/ -iname "*lena*" -exec rm {} ';' -print +find opencv_contrib-${VERSION}/ -iname "*lenna*" -exec rm {} ';' -print +rm -r opencv_contrib-${VERSION}/modules/xfeatures2d/ +tar zcf opencv_contrib-clean-${VERSION}.tar.gz opencv_contrib-${VERSION}/ +rm -r opencv_contrib-${VERSION}/ + +rm -rf opencv_extra-${VERSION}/ +tar xf opencv_extra-${VERSION}.tar.gz +find opencv_extra-${VERSION} -iname "*lena*" -exec rm {} ';' -print +find opencv_extra-${VERSION} -iname "*lenna*" -exec rm {} ';' -print +find opencv_extra-${VERSION} \( -iname "len*.*" -o -iname "*lena*.png" -o -iname "*lena*.jpg" \) -exec rm {} ';' -print +tar zcf opencv_extra-clean-${VERSION}.tar.gz opencv_extra-${VERSION}/ +rm -r opencv_extra-${VERSION}/ diff --git a/opencv.spec b/opencv.spec index 1a9c8efc393ccf6871b1eedc6b154a2738a82c07..e0d8b4b66dafccf744fba99d541df9f3ba54a607 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,3 +1,4 @@ +%define anolis_release 9 %undefine __cmake_in_source_build %bcond_with tests @@ -49,20 +50,27 @@ Version: 4.7.0 %global minorver %(foo=%{version}; a=(${foo//./ }); echo ${a[1]} ) %global padding %(digits=00; num=%{minorver}; echo ${digits:${#num}:${#digits}} ) %global abiver %(echo %{majorver}%{padding}%{minorver} ) -Release: 8%{?dist} +Release: %{anolis_release}%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD URL: https://opencv.org +# Need to remove copyrighted lena.jpg images +# and SIFT/SURF (module xfeatures2d) from tarball, due to legal concerns. +# tarballs generated by opencv-clean.sh Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz %{?with_extras_tests: Source2: %{name}_extra-clean-%{version}.tar.gz } +# files from https://github.com/opencv/opencv_3rdparty/blob/contrib_face_alignment_20170818/face_landmark_model.dat Source3: face_landmark_model.dat.xz +# from https://github.com/opencv/ade/archive/v0.1.2a.zip +# mv v0.1.2a.zip $(md5sum v0.1.2a.zip | cut -d' ' -f1)-v0.1.2a.zip Source4: fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip Source5: xorg.conf +Source6: opencv-clean.sh Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch3: opencv.python.patch @@ -154,7 +162,7 @@ BuildRequires: xorg-x11-drv-dummy BuildRequires: mesa-dri-drivers %endif -Requires: opencv-core%{_isa} = %{version}-%{release} +Requires: opencv-core = %{version}-%{release} %description OpenCV means IntelĀ® Open Source Computer Vision Library. It is a collection of @@ -173,8 +181,8 @@ This package contains the OpenCV C/C++ core libraries. %package devel Summary: Development files for using the OpenCV library -Requires: %{name}%{_isa} = %{version}-%{release} -Requires: %{name}-contrib%{_isa} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} +Requires: %{name}-contrib = %{version}-%{release} %description devel This package contains the OpenCV C/C++ library and header files, as well as @@ -195,7 +203,7 @@ This package contains the OpenCV documentation, samples and examples programs. %package -n python3-opencv Summary: Python3 bindings for apps which use OpenCV -Requires: opencv%{_isa} = %{version}-%{release} +Requires: opencv = %{version}-%{release} Requires: python3-numpy %{?%py_provides:%py_provides python3-%{name}} @@ -207,7 +215,7 @@ This package contains Python3 bindings for the OpenCV library. Summary: Java bindings for apps which use OpenCV Requires: java-headless Requires: javapackages-filesystem -Requires: %{name}-core%{_isa} = %{version}-%{release} +Requires: %{name}-core = %{version}-%{release} %description java This package contains Java bindings for the OpenCV library. @@ -439,5 +447,8 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog -* Fri Jun 16 2023 forrest_ly - +* Thu Dec 28 2023 Chunmei Xu - 4.7.0-9 +- rebuild with protobuf-3.20.2 + +* Fri Jun 16 2023 forrest_ly - 4.7.0-8 - init for anolis 23