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

Currently displaying revision edd552f92c6b694387f9b06329ba8241 , Show latest

82
 
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.5
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:  obs-studio
32
BuildRequires:  libcurl-devel
33
BuildRequires:  cmake(libobs)
34
BuildRequires:  cmake(Qt6Core)
35
BuildRequires:  cmake(Qt6Widgets)
36
Requires:       libcurl4
37
Requires:       obs-studio >= 29.0.0
38
ExclusiveArch:  x86_64
39
40
%global __requires_exclude_from ^.*libonnxruntime.*$
41
%global __builddir build_x86_64
42
43
%description
44
An OBS plugin for removing background in portrait images (video), making it easy to replace the background when screen recording.
45
46
%prep
47
%autosetup
48
49
%build
50
%cmake \
51
  -DCMAKE_C_COMPILER=gcc-12 \
52
  -DCMAKE_CXX_COMPILER=g++-12 \
53
  -DQT_VERSION=6 \
54
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
55
  -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
56
  -DENABLE_FRONTEND_API=ON \
57
  -DENABLE_QT=ON \
58
  -DUSE_SYSTEM_CURL=ON \
59
  -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
60
  -DCUSTOM_OPENCV_URL=%{SOURCE2} \
61
  -DCUSTOM_OPENCV_HASH=MD5=7a668fbc3ac536812643c6b8c8f96be9 \
62
  -DCUSTOM_ONNXRUNTIME_URL=%{SOURCE3} \
63
  -DCUSTOM_ONNXRUNTIME_MD5=8d2f5ee9f449bdecb10a45715fe74c53
64
%cmake_build
65
66
%install
67
%cmake_install
68
69
%post
70
%postun
71
72
%files
73
%license LICENSE
74
%doc README.md
75
%defattr(-,root,root,-)
76
/usr/lib64/obs-plugins/obs-backgroundremoval.so
77
/usr/lib64/obs-plugins/obs-backgroundremoval
78
/usr/share/obs/obs-plugins/obs-backgroundremoval
79
80
%changelog
81
82