From 50fca482f0ae4dcac6f60356030db0d6239056d0 Mon Sep 17 00:00:00 2001 From: dou33 Date: Thu, 27 Jan 2022 14:36:11 +0800 Subject: [PATCH] use %{python3_sitelib} instead of /usr/lib/python3.8/site-packages,add pkgconfig file --- opencv.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/opencv.spec b/opencv.spec index 5569258..6df5d6e 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,6 +1,6 @@ Name: opencv Version: 4.5.2 -Release: 4 +Release: 6 Summary: OpenCV means IntelĀ® Open Source Computer Vision Library. License: Apache-2.0 URL: https://github.com/opencv/opencv @@ -68,7 +68,9 @@ cmake ../../ -DCMAKE_BUILD_TYPE=Release\ -DPYTHON3_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -DPYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ -DPYTHON_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\ - -DCMAKE_INSTALL_PREFIX=/usr + -DCMAKE_INSTALL_PREFIX=/usr \ + -DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \ + -DOPENCV_GENERATE_PKGCONFIG=ON make -j24 V=1 ctest -E "opencv_test_objdetect|opencv_test_photo" @@ -84,9 +86,15 @@ make install DESTDIR=%{buildroot} %{_libdir}/* %{_includedir}/* %exclude /usr/share/* -/usr/lib/python3.8/site-packages/cv2/* +%{python3_sitelib}/cv2/* %changelog +* Thu Jan 28 2022 douyan - 4.5.2-6 +- add pkgconfig file + +* Thu Jan 27 2022 douyan - 4.5.2-5 +- use %{python3_sitelib} instead of /usr/lib/python3.8/site-packages + * Wed Nov 17 2021 shenwei - 4.5.2-4 - repair Clang ABI -- Gitee