File obs-backgroundremoval.spec of Package obs-backgroundremoval (Revision dbec7f75233cf3a6707c15c1b53f3712)

Currently displaying revision dbec7f75233cf3a6707c15c1b53f3712 , Show latest

80
 
1
#
2
# spec file for package obs-backgroundremoval
3
#
4
# Copyright (c) 2023 SUSE LLC
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
19
Name:           obs-backgroundremoval
20
Version:        1.1.6
21
Release:        0
22
Summary:        OBS Plugin for Background Removal
23
License:        GPL-2.0
24
URL:            https://github.com/royshil/obs-backgroundremoval
25
Source:         %{name}-%{version}.tar.gz
26
Source1:        %{name}-rpmlintrc
27
Source2:        opencv-linux-Release-4.8.0-1.tar.gz
28
Source3:        onnxruntime-linux-x64-gpu-1.15.1.tgz
29
BuildRequires:  cmake
30
BuildRequires:  gcc12-c++
31
BuildRequires:  libcurl-devel
32
BuildRequires:  obs-studio
33
BuildRequires:  cmake(libobs)
34
BuildRequires:  cmake(Qt6Core)
35
BuildRequires:  cmake(Qt6Widgets)
36
Requires:       obs-studio >= 29.0.0
37
ExclusiveArch:  x86_64
38
39
%global __requires_exclude_from ^.*libonnxruntime.*$
40
%global __builddir build_x86_64
41
42
%description
43
An OBS plugin for removing background in portrait images (video), making it easy to replace the background when screen recording.
44
45
%prep
46
%autosetup
47
48
%build
49
%cmake \
50
  -DCMAKE_C_COMPILER=gcc-12 \
51
  -DCMAKE_CXX_COMPILER=g++-12 \
52
  -DQT_VERSION=6 \
53
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
54
  -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
55
  -DENABLE_FRONTEND_API=ON \
56
  -DENABLE_QT=ON \
57
  -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
58
  -DCUSTOM_OPENCV_URL=%{SOURCE2} \
59
  -DCUSTOM_OPENCV_HASH=MD5=7a668fbc3ac536812643c6b8c8f96be9 \
60
  -DCUSTOM_ONNXRUNTIME_URL=%{SOURCE3} \
61
  -DCUSTOM_ONNXRUNTIME_MD5=8d2f5ee9f449bdecb10a45715fe74c53
62
%cmake_build
63
64
%install
65
%cmake_install
66
67
%post
68
%postun
69
70
%files
71
%license LICENSE
72
%doc README.md
73
%defattr(-,root,root,-)
74
/usr/lib64/obs-plugins/obs-backgroundremoval.so
75
/usr/lib64/obs-plugins/obs-backgroundremoval
76
/usr/share/obs/obs-plugins/obs-backgroundremoval
77
78
%changelog
79
80