use %{python3_sitelib} instead of /usr/lib/python3.8/site-packages,add pkgconfig file

This commit is contained in:
dou33 2022-01-27 14:36:11 +08:00
parent 875926e3df
commit 50fca482f0

View File

@ -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 <douyan@kylinos.cn> - 4.5.2-6
- add pkgconfig file
* Thu Jan 27 2022 douyan <douyan@kylinos.cn> - 4.5.2-5
- use %{python3_sitelib} instead of /usr/lib/python3.8/site-packages
* Wed Nov 17 2021 shenwei <shenwei41@huawei.com> - 4.5.2-4
- repair Clang ABI