opencv/opencv.spec

78 lines
2.3 KiB
RPMSpec
Raw Normal View History

2021-09-06 11:02:01 +08:00
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
2021-10-29 10:00:49 +08:00
Source0: %{name}-%{version}.tar.gz
Source1: %{name}_extra-%{version}.tar.gz
Source2: opencv_extra-4.5.2.tar.gz.aa
Source3: opencv_extra-4.5.2.tar.gz.ab
Source4: opencv_extra-4.5.2.tar.gz.ac
Source5: opencv_extra-4.5.2.tar.gz.ad
Source6: opencv_extra-4.5.2.tar.gz.ae
2021-09-06 11:02:01 +08:00
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.
2021-10-29 10:00:49 +08:00
2021-09-06 11:02:01 +08:00
%global debug_package %{nil}
%prep
2021-10-29 10:00:49 +08:00
cat %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} > %{SOURCE1}
2021-09-06 11:02:01 +08:00
%autosetup -p1 -n %{name}-%{version}
2021-10-29 10:00:49 +08:00
tar -xvf %{SOURCE1} -C .
2021-09-06 11:02:01 +08:00
%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\
2021-10-29 10:00:49 +08:00
-DBUILD_PERF_TESTS=ON\
-DBUILD_EXAMPLES=ON\
-DOPENCV_TEST_DATA_PATH=opencv_extra-%{version}/testdata\
-DINSTALL_TESTS=ON\
-DCMAKE_INSTALL_PREFIX=/usr/local\
2021-09-06 11:02:01 +08:00
-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
make install DESTDIR=%{buildroot}
%files
%defattr(-,root,root)
%exclude /usr/local/bin/setup_vars_opencv4.sh
%{_libdir}/*
%{_includedir}/*
%exclude /usr/local/share/*
%changelog
2021-10-29 10:00:49 +08:00
* Wed Sep 30 2021 shenwei <shenwei41@huawei.com> - 4.5.2-1
2021-09-06 11:02:01 +08:00
- package init