File obs-studio.spec of Package obs-studio (Revision 352e76fb992eee2bc00805f8959a4dbf)

Currently displaying revision 352e76fb992eee2bc00805f8959a4dbf , Show latest

209
 
1
2
# Chromium Embedded Framework
3
%ifarch x86_64
4
%bcond_without cef
5
%define cef_binary cef_binary_5060_linux64
6
%else
7
%bcond_with cef
8
%endif
9
10
%if 0%{?suse_version} > 1500
11
%define qt_version 6
12
%else
13
%define qt_version 5
14
%endif
15
%bcond_without websockets
16
17
Name:           obs-studio
18
Version:        29.1.3
19
Release:        0
20
Summary:        A recording/broadcasting program
21
Group:          Productivity/Multimedia/Video/Editors and Convertors
22
License:        GPL-2.0
23
URL:            https://obsproject.com/
24
# we fetch the tarball with a source service, because some subprojects are
25
# not included in the offical tarball (e.g. obs-browser)
26
Source:         %{name}-%{version}.tar.xz
27
%if %{with cef}
28
Source17:       %{cef_binary}.tar.bz2
29
%endif
30
Patch0:         0002-Include-diverse-luajit.patch
31
Patch1:         0001-Prefix-modinfo-with-sbin-since-not-in-normal-path.patch
32
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
33
BuildRequires:  update-desktop-files
34
BuildRequires:  cmake >= 2.8.12
35
BuildRequires:  fdk-aac-devel
36
BuildRequires:  fdupes
37
BuildRequires:  fontconfig-devel
38
BuildRequires:  freetype2-devel
39
BuildRequires:  gcc
40
BuildRequires:  gcc-c++
41
BuildRequires:  hicolor-icon-theme
42
BuildRequires:  libXcomposite-devel
43
BuildRequires:  libXinerama-devel
44
BuildRequires:  libXrandr-devel
45
BuildRequires:  libcurl-devel
46
BuildRequires:  libjansson-devel
47
BuildRequires:  pciutils-devel
48
BuildRequires:  pipewire-devel
49
BuildRequires:  libpulse-devel
50
%if "%{qt_version}" == "5"
51
BuildRequires:  libqt5-qtbase-devel >= 5.3
52
BuildRequires:  libqt5-qtbase-private-headers-devel
53
BuildRequires:  libqt5-qtsvg-devel
54
BuildRequires:  libqt5-qtx11extras-devel >= 5.3
55
%endif
56
%if "%{qt_version}" == "6"
57
BuildRequires:  cmake(Qt6Core)
58
BuildRequires:  cmake(Qt6Svg)
59
BuildRequires:  qt6-base-private-devel
60
%endif
61
BuildRequires:  libudev-devel
62
BuildRequires:  libv4l-devel
63
BuildRequires:  libx264-devel
64
BuildRequires:  mbedtls-devel
65
BuildRequires:  pipewire-devel
66
BuildRequires:  pkgconfig
67
BuildRequires:  pkgconfig(alsa)
68
BuildRequires:  pkgconfig(jack)
69
BuildRequires:  pkgconfig(libavcodec)
70
BuildRequires:  pkgconfig(libavdevice)
71
BuildRequires:  pkgconfig(libavfilter)
72
BuildRequires:  pkgconfig(libavformat)
73
BuildRequires:  pkgconfig(libavutil)
74
%ifarch %{ix86} x86_64
75
# comment out until resolved: nothing provides pkgconfig(libmfx)
76
# BuildRequires:  pkgconfig(libmfx)
77
%endif
78
BuildRequires:  pkgconfig(librist)
79
BuildRequires:  pkgconfig(libswresample)
80
BuildRequires:  pkgconfig(libswscale)
81
BuildRequires:  pkgconfig(libva)
82
BuildRequires:  pkgconfig(lua)
83
BuildRequires:  pkgconfig(luajit)
84
BuildRequires:  pkgconfig(srt) >= 1.4
85
BuildRequires:  pkgconfig(uuid)
86
%if %{with websockets}
87
BuildRequires:  pkgconfig(nlohmann_json) >= 3
88
BuildRequires:  pkgconfig(websocketpp) >= 0.8.0
89
BuildRequires:  pkgconfig(asio) >= 1.12.1
90
%endif
91
BuildRequires:  python3-devel
92
%if 0%{?suse_version} != 1315 || 0%{?is_opensuse}
93
BuildRequires:  speexdsp-devel
94
%endif
95
BuildRequires:  sndio-devel
96
BuildRequires:  swig
97
BuildRequires:  vlc-devel
98
%if %{with cef}
99
BuildRequires:  mozilla-nss
100
BuildRequires:  mozilla-nspr
101
%endif
102
# these deps couldn't be tracked
103
Requires:       librist4
104
Requires:       libsrt1_5
105
Requires:       libspeexdsp1
106
Recommends:     libqt5-qtwayland
107
ExclusiveArch:  x86_64 aarch64
108
109
# these are plugins, built as libs and as such should not be mixed up with their originals
110
%global __provides_exclude_from ^(%{_libdir}/obs-plugins/.*\\.so.*|%{_libdir}/obs-scripting/.*\\.so.*)$
111
%global __requires_exclude libcef\\.so
112
113
%description
114
Open Broadcaster Software is free and open source software for video recording and live streaming.
115
116
%package devel
117
Summary:        A recording/broadcasting program - Development Files
118
Group:          Development/Multimedia
119
Requires:       %{name} = %{version}
120
121
%description devel
122
Open Broadcaster Software is free and open source software for video recording and live streaming.
123
124
%prep
125
%autosetup -p1
126
%if %{with cef}
127
tar xvf %{SOURCE17} -C %{_builddir}
128
%endif
129
130
%build
131
mkdir -p build && cd build
132
# does not like cmake macro as it fails to link in math.h (-lma
133
# the compile flags must be relaxed in order to compile obs-studio successfully
134
export CFLAGS="%{optflags} -Wno-error=type-limits -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-error=return-type -Wno-error=unused-but-set-variable -Wno-error=pointer-sign -Wno-error=reorder"
135
export CXXFLAGS="%{optflags} -Wno-error=type-limits -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-error=return-type -Wno-error=unused-but-set-variable -Wno-error=pointer-sign -Wno-error=reorder"
136
137
cmake \
138
  -DCMAKE_CXX_STANDARD=17 \
139
  -DCMAKE_INSTALL_PREFIX=/usr \
140
  -DCMAKE_C_FLAGS:STRING="$CFLAGS" \
141
  -DCMAKE_CXX_FLAGS:STRING="$CXXFLAGS" \
142
  -DUNIX_STRUCTURE=1 \
143
%if "%{_lib}" == "lib64"
144
  -DOBS_MULTIARCH_SUFFIX=64 \
145
%endif
146
  -DOBS_VERSION_OVERRIDE="$(echo "%{version}" | grep -oE "^[^+]+")" \
147
  -DENABLE_AJA=OFF \
148
%if 0%{?sle_version} > 150000 && 0%{?sle_version} < 150500 && 0%{?is_opensuse}
149
  -DENABLE_PIPEWIRE=OFF \
150
%endif
151
  -DENABLE_JACK=ON \
152
  -DENABLE_LIBFDK=ON \
153
  -DENABLE_SNDIO=ON \
154
%if %{with websockets}
155
  -DENABLE_WEBSOCKET=ON \
156
%else
157
  -DENABLE_WEBSOCKET=OFF \
158
%endif
159
%if %{with cef}
160
  -DBUILD_BROWSER=ON \
161
  -DCEF_ROOT_DIR="%{_builddir}/%{cef_binary}" \
162
%else
163
  -DBUILD_BROWSER=OFF \
164
%endif
165
  ..
166
167
%cmake_build
168
169
%install
170
%cmake_install
171
%suse_update_desktop_file com.obsproject.Studio
172
%fdupes %{buildroot}%{_datadir}/obs/
173
174
%post
175
/sbin/ldconfig
176
%icon_theme_cache_postun
177
178
%postun
179
/sbin/ldconfig
180
%icon_theme_cache_postun
181
182
%files
183
%{_bindir}/obs
184
%{_bindir}/obs-ffmpeg-mux
185
# Upstream forces libs dir regardless of arch and building plugins is encumbered
186
# by moving them to the proper directory.
187
%{_libdir}/obs-plugins/
188
%{_libdir}/libobs.so.*
189
%{_libdir}/libobs-frontend-api.so.*
190
%{_libdir}/libobs-opengl.so.*
191
%{_libdir}/libobs-scripting.so.*
192
%{_libdir}/obs-scripting/
193
%dir %{_datadir}/metainfo
194
%{_datadir}/metainfo/com.obsproject.Studio.appdata.xml
195
%{_datadir}/applications/com.obsproject.Studio.desktop
196
%{_datadir}/icons/hicolor
197
%{_datadir}/obs
198
199
%files devel
200
%{_libdir}/libobs.so
201
%{_libdir}/libobs-frontend-api.so
202
%{_libdir}/libobs-opengl.so
203
%{_libdir}/libobs-scripting.so
204
%{_libdir}/cmake
205
%{_libdir}/pkgconfig/libobs.pc
206
%{_includedir}/obs
207
208
%changelog
209