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

Currently displaying revision b2618152f5befae75de7b284cf24b674 , Show latest

81
 
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.13
21
Release:        0
22
Summary:        OBS Plugin for Background Removal
23
License:        GPL-2.0
24
URL:            https://github.com/locaal-ai/obs-backgroundremoval
25
Source:         https://github.com/locaal-ai/%{name}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
26
Source1:        %{name}-rpmlintrc
27
Source2:        opencv-linux-Release-4.8.0-1.tar.gz
28
Source3:        https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-linux-x64-gpu-1.17.1.tgz
29
Patch0:         fix-cmake-error.patch
30
BuildRequires:  cmake
31
BuildRequires:  gcc12-c++
32
BuildRequires:  libcurl-devel
33
BuildRequires:  obs-studio
34
BuildRequires:  cmake(libobs)
35
BuildRequires:  cmake(Qt6Core)
36
BuildRequires:  cmake(Qt6Widgets)
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 -p1
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
  -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
59
  -DCUSTOM_OPENCV_URL=%{SOURCE2} \
60
  -DCUSTOM_OPENCV_HASH=MD5=7a668fbc3ac536812643c6b8c8f96be9 \
61
  -DCUSTOM_ONNXRUNTIME_URL=%{SOURCE3} \
62
  -DCUSTOM_ONNXRUNTIME_HASH=MD5=da53e83b3ad3ab2cf46fbabd6a648a9d
63
%cmake_build
64
65
%install
66
%cmake_install
67
68
%post
69
%postun
70
71
%files
72
%license LICENSE
73
%doc README.md
74
%defattr(-,root,root,-)
75
/usr/lib64/obs-plugins/obs-backgroundremoval.so
76
/usr/lib64/obs-plugins/obs-backgroundremoval
77
/usr/share/obs/obs-plugins/obs-backgroundremoval
78
79
%changelog
80
81