Exclude python3-opencv from TV profile 62/256962/2 accepted/tizen/unified/20210418.142833 submit/tizen/20210416.014745
authorTae-Young Chung <ty83.chung@samsung.com>
Thu, 15 Apr 2021 13:47:44 +0000 (22:47 +0900)
committerTae-Young Chung <ty83.chung@samsung.com>
Fri, 16 Apr 2021 00:45:54 +0000 (09:45 +0900)
In TV profile, python3-numpy-devel isn't provided,
which is mandatory for python3-opencv. So, it is excluded
from TV profile.

Change-Id: I8c82a3dbf4d9d0723563e73dfe7def9182e9abe7
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
packaging/opencv.spec

index 2c0c875..300b029 100644 (file)
@@ -1,7 +1,7 @@
 Name: opencv
 Summary: OpenCV library
 Version: 4.5.0
-Release: 1
+Release: 2
 Group: Development/Libraries
 License: Apache-2.0 and BSD-3-Clause
 Source0: %{name}-%{version}.tar.gz
@@ -26,8 +26,10 @@ BuildRequires:  libavcodec-devel
 BuildRequires:  libavformat-devel
 BuildRequires:  libswscale-devel
 #support python3
+%if "%{?profile}" != "tv"
 BuildRequires:  python3-devel
 BuildRequires:  python3-numpy-devel
+%endif
 
 Requires(post):  /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
@@ -43,6 +45,7 @@ Requires:    %{name} = %{version}-%{release}
 %description devel
 The Open Computer Vision Library (Dev) includes various algorithms for computer vision problems.
 
+%if "%{?profile}" != "tv"
 %package -n python3-opencv
 Summary:    OpenCV Python3 Library
 Group:      Development/Libraries
@@ -50,6 +53,7 @@ Requires:   %{name} = %{version}-%{release}
 
 %description -n python3-opencv
 The Open Computer Vision Library (Python3) includes various algorithms for computre vision problems.
+%endif
 
 %prep
 %setup -q
@@ -75,7 +79,6 @@ ARCH=i386
 # compatibility to opencv3
 sed -i 's/opencv4.pc/opencv.pc/g' cmake/OpenCVGenPkgconfig.cmake
 
-
 mkdir -p build
 cd build
 cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
@@ -99,7 +102,11 @@ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
        -DBUILD_opencv_objdetect=ON \
        -DBUILD_opencv_photo=ON \
        -DBUILD_opencv_python2=OFF \
+%if "%{?profile}" != "tv"
        -DBUILD_opencv_python3=ON \
+%else
+       -DBUILD_opencv_python3=OFF \
+%endif
        -DBUILD_opencv_shape=OFF \
        -DBUILD_opencv_stitching=OFF \
        -DBUILD_opencv_superres=OFF \
@@ -301,9 +308,11 @@ fi
 %exclude /usr/share/opencv4/lbpcascades/*silverware*
 %exclude /usr/share/opencv4/*.supp
 
+%if "%{?profile}" != "tv"
 %files -n python3-opencv
 %{python3_sitearch}/cv2/*.py
 %{python3_sitearch}/cv2/*/*.so
+%endif
 
 %files devel
 /usr/include/*