diff --git a/opencv-4.4.0.tar.gz b/opencv-4.4.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..bf19f293d8ec4cf0ec6bef69f0401ecf541dc501 Binary files /dev/null and b/opencv-4.4.0.tar.gz differ diff --git a/opencv.spec b/opencv.spec new file mode 100755 index 0000000000000000000000000000000000000000..7647424f66c1101e548c04c3b952c48106596906 --- /dev/null +++ b/opencv.spec @@ -0,0 +1,71 @@ +Name: opencv +Version: 4.4.0 +Release: 1 +Summary: OpenCV means IntelĀ® Open Source Computer Vision Library. +Group: Development/Tools +License: Apache-2.0 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +URL: https://github.com/opencv/opencv/archive/4.4.0.tar.gz +Source: %{name}-%{version}.tar.gz +Provides: opencv = %{version} +BuildRequires: cmake python3 python3-setuptools + +%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. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%setup -q -n %{name}-%{version} + +%build +mkdir build +cd build/ +cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr .. +make %{?_smp_mflags} + +%install +cd build +make DESTDIR=$RPM_BUILD_ROOT install + +mkdir -p $RPM_BUILD_ROOT/usr/lib64/pkgconfig/ +cat > $RPM_BUILD_ROOT/usr/lib64/pkgconfig/opencv.pc << EOF +# Package Information for pkg-config + +prefix=/usr +exec_prefix=\${prefix} +libdir=\${exec_prefix}/lib64 +includedir=\${prefix}/include/opencv4/ + +Name: OpenCV +Description: Open Source Computer Vision Library +Version: 4.4.0 +Libs: -L\${exec_prefix}/lib64 -lopencv_dnn -lopencv_ml -lopencv_objdetect -lopencv_stitching -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_imgproc -lopencv_flann -lopencv_core -lopencv_gapi +Libs.private: -ldl -lm -lpthread -lrt -L/lib64 -lGL +Cflags: -I\${includedir} +EOF + +%files +%{_bindir}/* +/usr/share/* +%{python3_sitelib}/* +%{_libdir}/*.so.* + +%files devel +%{_includedir}/opencv4/opencv2/* +%{_libdir}/*.so +%{_libdir}/cmake/* +%{_libdir}/pkgconfig/* + +%changelog +* Wed Jul 1 2020 fu zhengwei +- Create it.