opencv/opencv-clean.sh
Sérgio M. Basto 5bfb0d052e Update opencv to 4.9.0
Enable ffmpeg and xine (now they are available on Fedora)
Really drop compat symlink for includes - rhbz#1830266
  Note: conditional builds with underscrore don't have _without option
  https://github.com/rpm-software-management/rpm/issues/1929
2024-02-05 11:38:06 +00:00

35 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
VERSION=4.9.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}/
echo fedpkg new-sources $(spectool -l --sources opencv.spec | sed 's/.*: //;s/.*\///')