Projects
home:jianhua:branches:Multimedia
obs-studio
obs-studio.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-studio.spec of Package obs-studio
# Chromium Embedded Framework %ifarch x86_64 %bcond_with cef %define cef_binary cef_binary_5060_linux64 %else %bcond_with cef %endif %bcond_without websockets %bcond_with split_obs_x264 # 31.0.0~beta1 wants at least 6.1 lets just use 7 straight away # zypper info --provides $(zypper se -t package -s ffmpeg-7 | awk -F '|' '/devel/ {print $2}') | grep pkgconfig | perl -p -e 's|^\s+pkgconfig\(([^\)]+)\) = (\S+)|%%global minimum_$1_version $2|g' %global minimum_libavcodec_version 61.19.100 %global minimum_libavdevice_version 61.3.100 %global minimum_libavfilter_version 10.4.100 %global minimum_libavformat_version 61.7.100 %global minimum_libavutil_version 59.39.100 %global minimum_libpostproc_version 58.3.100 %global minimum_libswresample_version 5.3.100 %global minimum_libswscale_version 8.3.100 %if 0%{?suse_version} && 0%{?suse_version} < 1600 %global force_gcc_version 13 %global python_version 311 %else %global python_version 3 %endif Name: obs-studio Version: 31.0.0 Release: 0 Summary: A recording/broadcasting program Group: Productivity/Multimedia/Video/Editors and Convertors License: GPL-2.0 URL: https://obsproject.com/ # we fetch the tarball with a source service, because some subprojects are # not included in the offical tarball (e.g. obs-browser) Source: %{name}-%{version}.tar.xz %if %{with cef} Source17: %{cef_binary}.tar.bz2 %endif Patch1: 0001-Prefix-modinfo-with-sbin-since-not-in-normal-path.patch Patch2: libx264-optional.patch Patch3: ffmpeg-x11-linking.patch BuildRequires: update-desktop-files BuildRequires: cmake >= 2.8.12 BuildRequires: pkgconfig(fdk-aac) BuildRequires: fdupes BuildRequires: fontconfig-devel BuildRequires: freetype2-devel BuildRequires: gcc%{?force_gcc_version} BuildRequires: gcc%{?force_gcc_version}-c++ BuildRequires: hicolor-icon-theme BuildRequires: libXcomposite-devel BuildRequires: libXinerama-devel BuildRequires: libXrandr-devel BuildRequires: libcurl-devel BuildRequires: libjansson-devel BuildRequires: pciutils-devel BuildRequires: pipewire-devel BuildRequires: libpulse-devel BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6Svg) BuildRequires: qt6-base-private-devel BuildRequires: libudev-devel BuildRequires: libv4l-devel %if %{without split_obs_x264} BuildRequires: libx264-devel %endif BuildRequires: mbedtls-devel BuildRequires: pipewire-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(libavcodec) >= %{minimum_libavcodec_version} BuildRequires: pkgconfig(libavdevice) >= %{minimum_libavdevice_version} BuildRequires: pkgconfig(libavfilter) >= %{minimum_libavfilter_version} BuildRequires: pkgconfig(libavformat) >= %{minimum_libavformat_version} BuildRequires: pkgconfig(libavutil) >= %{minimum_libavutil_version} %ifarch %{ix86} x86_64 # comment out until resolved: nothing provides pkgconfig(libmfx) # BuildRequires: pkgconfig(libmfx) %endif BuildRequires: pkgconfig(librist) BuildRequires: pkgconfig(libswresample) >= %{minimum_libswresample_version} BuildRequires: pkgconfig(libswscale) >= %{minimum_libswscale_version} BuildRequires: pkgconfig(libva) BuildRequires: pkgconfig(lua) BuildRequires: pkgconfig(luajit) BuildRequires: pkgconfig(srt) >= 1.4 BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(rnnoise) BuildRequires: pkgconfig(ffnvcodec) >= 12.1.14.0 BuildRequires: pkgconfig(vpl) BuildRequires: libdatachannel-devel BuildRequires: pkgconfig(nlohmann_json) >= 3 %if %{with websockets} BuildRequires: pkgconfig(websocketpp) >= 0.8.0 BuildRequires: pkgconfig(asio) >= 1.12.1 BuildRequires: pkgconfig(qrcodegencpp) %endif BuildRequires: python%{python_version}-devel >= 3.8 %if 0%{?suse_version} != 1315 || 0%{?is_opensuse} BuildRequires: speexdsp-devel %endif BuildRequires: sndio-devel BuildRequires: swig BuildRequires: uthash-devel BuildRequires: vlc-devel %if %{with cef} BuildRequires: mozilla-nss BuildRequires: mozilla-nspr %endif # these deps couldn't be tracked Requires: librist4 Requires: libsrt1_5 Requires: libspeexdsp1 ExclusiveArch: x86_64 aarch64 Recommends: obs-studio-x264 # these are plugins, built as libs and as such should not be mixed up with their originals %global __provides_exclude_from ^(%{_libdir}/obs-plugins/.*\\.so.*|%{_libdir}/obs-scripting/.*\\.so.*)$ %global __requires_exclude libcef\\.so %description Open Broadcaster Software is free and open source software for video recording and live streaming. %if %{with split_obs_x264} %package x264 Summary: libx264 support for obs-studio # Requires: obs-studio = %{version}-%{release} %description x264 Open Broadcaster Software is free and open source software for video recording and live streaming. This package holds the obs-x264 plugin for obs-studio %endif %package devel Summary: A recording/broadcasting program - Development Files Group: Development/Multimedia Requires: %{name} = %{version} %description devel Open Broadcaster Software is free and open source software for video recording and live streaming. %prep %autosetup -p1 %if %{with cef} tar xvf %{SOURCE17} -C %{_builddir} %endif %build %if 0%{?force_gcc_version} export CC="gcc-%{?force_gcc_version}" export CXX="g++-%{?force_gcc_version}" %endif mkdir -p build && cd build # does not like cmake macro as it fails to link in math.h (-lma # the compile flags must be relaxed in order to compile obs-studio successfully 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 -Wno-error=switch -Wno-error=catch-value=" 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 -Wno-error=switch -Wno-error=catch-value=" cmake \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_C_FLAGS:STRING="$CFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$CXXFLAGS" \ -DUNIX_STRUCTURE=1 \ %if "%{_lib}" == "lib64" -DOBS_MULTIARCH_SUFFIX=64 \ %endif -DOBS_VERSION_OVERRIDE="$(echo "%{version}" | grep -oE "^[^+]+")" \ -DENABLE_AJA=OFF \ %if 0%{?sle_version} > 150000 && 0%{?sle_version} < 150500 && 0%{?is_opensuse} -DENABLE_PIPEWIRE=OFF \ %endif -DENABLE_JACK=ON \ -DENABLE_LIBFDK=ON \ -DENABLE_SNDIO=ON \ %if %{with websockets} -DENABLE_WEBSOCKET=ON \ %else -DENABLE_WEBSOCKET=OFF \ %endif %if %{with cef} -DBUILD_BROWSER=ON \ -DCEF_ROOT_DIR="%{_builddir}/%{cef_binary}" \ %else -DBUILD_BROWSER=OFF \ %endif .. %cmake_build %install %cmake_install %suse_update_desktop_file com.obsproject.Studio %fdupes %{buildroot}%{_datadir}/obs/ %post /sbin/ldconfig %icon_theme_cache_postun %postun /sbin/ldconfig %icon_theme_cache_postun %files %{_bindir}/obs %{_bindir}/obs-ffmpeg-mux %{_bindir}/obs-nvenc-test # Upstream forces libs dir regardless of arch and building plugins is encumbered # by moving them to the proper directory. %{_libdir}/obs-plugins/ %if %{with split_obs_x264} %exclude %{_libdir}/obs-plugins/obs-x264.so %endif %{_libdir}/libobs.so.* %{_libdir}/libobs-frontend-api.so.* %{_libdir}/libobs-opengl.so.* %{_libdir}/libobs-scripting.so.* %{_libdir}/obs-scripting/ %dir %{_datadir}/metainfo %{_datadir}/metainfo/com.obsproject.Studio.metainfo.xml %{_datadir}/applications/com.obsproject.Studio.desktop %{_datadir}/icons/hicolor %{_datadir}/obs/ %if %{with split_obs_x264} %exclude %{_datadir}/obs/obs-x264/ %endif %if %{with split_obs_x264} %files x264 %{_libdir}/obs-plugins/obs-x264.so %{_datadir}/obs/obs-x264/ %endif %files devel %{_libdir}/libobs.so %{_libdir}/libobs-frontend-api.so %{_libdir}/libobs-opengl.so %{_libdir}/libobs-scripting.so %{_libdir}/cmake %{_libdir}/pkgconfig/libobs.pc %{_includedir}/obs %{_libdir}/pkgconfig/obs-frontend-api.pc %changelog
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.