File obs-studio.spec of Package obs-studio

Name:           obs-studio
Version:        26.1.1
Release:        0
Summary:        A recording/broadcasting program
Group:          Productivity/Multimedia/Video/Editors and Convertors
License:        GPL-2.0
Source:         %{name}-%{version}.tar.xz
Patch0:         fix-luajit-include-path.patch
Patch1:         modinfo-use-full-path.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  update-desktop-files
BuildRequires:  cmake >= 2.8.12
BuildRequires:  fdk-aac-devel
BuildRequires:  fontconfig-devel
BuildRequires:  freetype2-devel
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  libXcomposite-devel
BuildRequires:  libXinerama-devel
BuildRequires:  libXrandr-devel
BuildRequires:  libcurl-devel
BuildRequires:  libjansson-devel
BuildRequires:  libpulse-devel
BuildRequires:  libqt5-qtbase-devel >= 5.3
BuildRequires:  libqt5-qtsvg-devel
BuildRequires:  libqt5-qtx11extras-devel >= 5.3
BuildRequires:  libudev-devel
BuildRequires:  libv4l-devel
BuildRequires:  libx264-devel
BuildRequires:  mbedtls-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(jack)
# Restricted to avoid segfault on Tumbleweed:
# -
# -
BuildRequires:  pkgconfig(libavcodec) = 57.107.100
BuildRequires:  pkgconfig(libavdevice) = 57.10.100
BuildRequires:  pkgconfig(libavfilter) = 6.107.100
BuildRequires:  pkgconfig(libavformat) = 57.83.100
BuildRequires:  pkgconfig(libavutil) = 55.78.100
BuildRequires:  pkgconfig(libswresample) = 2.9.100
BuildRequires:  pkgconfig(libswscale) = 4.8.100
BuildRequires:  pkgconfig(lua)
BuildRequires:  pkgconfig(luajit)
BuildRequires:  python3-devel
%if 0%{?suse_version} != 1315 || 0%{?is_opensuse}
BuildRequires:  speexdsp-devel
BuildRequires:  swig
BuildRequires:  vlc-devel
ExclusiveArch:  i586 x86_64

Open Broadcaster Software is free and open source software for video recording and live streaming.

%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.

%autosetup -p1

mkdir -p build && cd build
# does not like cmake macro as it fails to link in math.h (-lm)
cmake \
%if "%{_lib}" == "lib64"
  -DOBS_VERSION_OVERRIDE="$(echo "%{version}" | grep -oE "^[^+]+")" \

%suse_update_desktop_file com.obsproject.Studio



# Upstream forces libs dir regardless of arch and building plugins is encumbered
# by moving them to the proper directory.
%dir %{_datadir}/metainfo

%files devel