%define api 7 %define major 7 %define libname %mklibname %{name} %{api} %{major} %define libplus_major 7 %define libplus %mklibname mlt++ %{api} %{libplus_major} %define libnamedev %mklibname %{name} -d # We can't distribute MLT with CUDA enabled. # You have to build it yourself if you want it. # 0 => don't build with CUDA enabled # 1 => build with CUDA enabled %define build_cuda 0 %bcond_without rtaudio %bcond_without qt6 Name: mlt Version: 7.28.0 Release: %mkrel 0 Summary: Media Lovin' Toolkit License: LGPLv2+ and GPLv2+ Group: Video/Editors and Converters Url: https://www.mltframework.org Source0: https://github.com/mltframework/mlt/releases/download/v%{version}/mlt-%{version}.tar.gz ### from upstream (https://github.com/mltframework/mlt/) BuildRequires: cmake BuildRequires: ffmpeg-devel BuildRequires: imagemagick BuildRequires: ladspa-devel BuildRequires: pkgconfig(libebur128) BuildRequires: pkgconfig(fftw3) BuildRequires: pkgconfig(frei0r) BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(libarchive) BuildRequires: pkgconfig(libdv) BuildRequires: pkgconfig(libexif) BuildRequires: pkgconfig(libquicktime) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(mad) BuildRequires: pkgconfig(movit) BuildRequires: pkgconfig(ogg) BuildRequires: pkgconfig(opencv) BuildRequires: pkgconfig(pango) %if %{with rtaudio} BuildRequires: pkgconfig(rtaudio) %endif BuildRequires: pkgconfig(rubberband) BuildRequires: pkgconfig(samplerate) BuildRequires: pkgconfig(sdl) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(sox) BuildRequires: pkgconfig(vidstab) BuildRequires: pkgconfig(vorbis) # For Qt5 Module BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Xml) # For Qt6 Module %if %{with qt6} BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6Core5Compat) BuildRequires: cmake(Qt6DBus) BuildRequires: cmake(Qt6Gui) BuildRequires: cmake(Qt6Network) BuildRequires: cmake(Qt6OpenGL) BuildRequires: cmake(Qt6Svg) BuildRequires: cmake(Qt6SvgWidgets) BuildRequires: cmake(Qt6Widgets) BuildRequires: cmake(Qt6Xml) %endif # For python-bindings BuildRequires: swig BuildRequires: pkgconfig(python3) # For ruby bindings BuildRequires: pkgconfig(ruby) %if %{build_cuda} BuildRequires: nvidia-cuda-toolkit-devel BuildRequires: nv-codec-headers %endif %description MLT is an open source multimedia framework, designed and developed for television broadcasting. It provides a toolkit for broadcasters, video editors, media players, transcoders, web streamers and many more types of applications. The functionality of the system is provided via an assortment of ready to use tools, xml authoring components, and an extendible plug-in based API. %package kdenlive Summary: Media Lovin' Toolkit Group: Video/Editors and Converters %description kdenlive MLT is an open source multimedia framework, designed and developed for television broadcasting. It provides a toolkit for broadcasters, video editors, media players, transcoders, web streamers and many more types of applications. The functionality of the system is provided via an assortment of ready to use tools, xml authoring components, and an extendible plug-in based API. This package contains plugins aimed to be used by kde apps. %if %{with qt6} %package qt6 Summary: Media Lovin' Toolkit with Qt6 Group: Video/Editors and Converters Requires: %{name} >= %{version}-%{release} Conflicts: mlt < 7.20.0 %description qt6 MLT is an open source multimedia framework, designed and developed for television broadcasting. It provides a toolkit for broadcasters, video editors, media players, transcoders, web streamers and many more types of applications. The functionality of the system is provided via an assortment of ready to use tools, xml authoring components, and an extendible plug-in based API. This package contains plugins aimed to be used with Qt6. %endif %package -n %{libname} Summary: Main library for mlt Group: System/Libraries Obsoletes: %{_lib}mlt7 < 7.4.0-3 %description -n %{libname} This package contains the libraries needed to run programs dynamically linked with mlt. %package -n %{libplus} Summary: Main library for mlt++ Group: System/Libraries Obsoletes: %{_lib}mlt++7 < 7.4.0-3 %description -n %{libplus} This package contains the libraries needed to run programs dynamically linked with mlt++. %package -n %{libnamedev} Summary: Headers for developing programs that will use mlt Group: Development/C Requires: %{libname} = %{version}-%{release} Requires: %{libplus} = %{version}-%{release} # mlt-config requires stuff from %%{_datadir}/%%{name} Requires: %{name} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Provides: %{name}++-devel = %{version}-%{release} Provides: lib%{name}++-devel = %{version}-%{release} %description -n %{libnamedev} This package contains the headers that programmers will need to develop applications which will use mlt. %package -n python3-%{name} Summary: Python 3 bindings for MLT Group: Development/Python Requires: python3 Requires: %{name} = %{version}-%{release} Provides: python-mlt = %{version}-%{release} %description -n python3-%{name} This module allows to work with MLT using python 3. %package -n ruby-%{name} Summary: Ruby bindings for MLT Group: Development/Ruby Requires: ruby Requires: %{name} = %{version}-%{release} %description -n ruby-%{name} This module allows to work with MLT using ruby. %prep %autosetup -p1 %build %cmake \ %ifnarch x86_64 -DCPU_MMX:BOOL=OFF \ -DCPU_SSE:BOOL=OFF \ -DCPU_SSE2:BOOL=OFF \ %endif %if %{build_cuda} -DMOD_NDI:BOOL=ON \ -DNDI_SDK_INCLUDE_PATH:PATH=%{_includedir} \ -DNDI_SDK_LIBRARY_PATH:PATH=%{_libdir} \ -DNDI_INCLUDE_DIR=%{_includedir} \ %endif -DCMAKE_SKIP_RPATH:BOOL=ON \ -DGPL:BOOL=ON \ -DGPL3:BOOL=ON \ -DMOD_OPENCV:BOOL=ON \ -DMOD_KDENLIVE:BOOL=ON \ -DMOD_GLAXNIMATE:BOOL=ON \ %{?with_qt6:-DMOD_QT6:BOOL=ON} \ %{?with_qt6:-DMOD_GLAXNIMATE_QT6:BOOL=ON} \ %{!?with_rtaudio:-DMOD_RTAUDIO:BOOL=OFF} \ -DSWIG_RUBY:BOOL=ON \ -DSWIG_PYTHON:BOOL=ON %cmake_build %install %cmake_install #man page install -Dpm644 docs/melt.1 %{buildroot}%{_mandir}/man1/melt.1 %files %doc README.md %license COPYING %{_bindir}/melt %{_bindir}/melt-%{api} %{_datadir}/mlt-%{api} %dir %{_libdir}/mlt-%{api} %{_libdir}/mlt-%{api}/libmltavformat.so %{_libdir}/mlt-%{api}/libmltcore.so %{_libdir}/mlt-%{api}/libmltdecklink.so %{_libdir}/mlt-%{api}/libmltfrei0r.so %{_libdir}/mlt-%{api}/libmltgdk.so %{_libdir}/mlt-%{api}/libmltglaxnimate.so %{_libdir}/mlt-%{api}/libmltjackrack.so %{_libdir}/mlt-%{api}/libmltmovit.so %{_libdir}/mlt-%{api}/libmltnormalize.so %{_libdir}/mlt-%{api}/libmltoldfilm.so %{_libdir}/mlt-%{api}/libmltopencv.so %{_libdir}/mlt-%{api}/libmltplus.so %{_libdir}/mlt-%{api}/libmltplusgpl.so %{_libdir}/mlt-%{api}/libmltqt.so %{_libdir}/mlt-%{api}/libmltresample.so %if %{with rtaudio} %{_libdir}/mlt-%{api}/libmltrtaudio.so %endif %{_libdir}/mlt-%{api}/libmltrubberband.so %{_libdir}/mlt-%{api}/libmltsdl.so %{_libdir}/mlt-%{api}/libmltsdl2.so %{_libdir}/mlt-%{api}/libmltsox.so %{_libdir}/mlt-%{api}/libmltvidstab.so %{_libdir}/mlt-%{api}/libmltvorbis.so %{_libdir}/mlt-%{api}/libmltxine.so %{_libdir}/mlt-%{api}/libmltxml.so %{_mandir}/man1/melt.1* %{_mandir}/man1/melt-%{api}.1* %files kdenlive %{_libdir}/mlt-%{api}/libmltkdenlive.so %if %{with qt6} %files qt6 %{_libdir}/mlt-%{api}/libmltqt6.so %{_libdir}/mlt-%{api}/libmltglaxnimate-qt6.so %endif %files -n %{libname} %{_libdir}/libmlt-%{api}.so.%{major} %{_libdir}/libmlt-%{api}.so.%{version} %files -n %{libplus} %{_libdir}/libmlt++-%{api}.so.%{libplus_major} %{_libdir}/libmlt++-%{api}.so.%{version} %files -n %{libnamedev} %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %{_libdir}/cmake/Mlt%{api}/ %files -n python3-%{name} %{python3_sitearch}/* %files -n ruby-%{name} %{_libdir}/ruby/vendor_ruby/mlt.so