%if 0%{?flatpak} || 0%{?rhel} %bcond system_qtsingleapplication 0 %else %bcond system_qtsingleapplication 1 %endif %global smplayer_themes_ver 20.11.0 %global smplayer_skins_ver 20.11.0 %global svn_revision 10411 Name: smplayer Version: 26.8.29 Release: 1.qt6%{?dist} Summary: Graphical front-end for mplayer and mpv License: GPL-2.0-or-later URL: https://www.smplayer.info/ Source0: https://github.com/smplayer-dev/smplayer/releases/download/v%{version}/smplayer-%{version}.tar.bz2 Source3: https://downloads.sourceforge.net/smplayer/smplayer-themes-%{smplayer_themes_ver}.tar.bz2 Source4: https://downloads.sourceforge.net/smplayer/smplayer-skins-%{smplayer_skins_ver}.tar.bz2 Patch0: qt6.patch Patch1: smplayer-25.6.0.10411-system-qtsingleapplication.patch # mongoose.c - num_fds set but not used -Werror=unused-but-set-variable Patch2: smplayer-25.6.0-mongoose-unused-variable.patch BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: libappstream-glib BuildRequires: pkgconfig(Qt6) BuildRequires: pkgconfig(Qt6Designer) BuildRequires: qt6-qtbase-private-devel BuildRequires: qt6-qtdeclarative-devel BuildRequires: pkgconfig(Qt6Concurrent) BuildRequires: pkgconfig(Qt6Core) BuildRequires: pkgconfig(Qt6DBus) BuildRequires: pkgconfig(Qt6Gui) BuildRequires: pkgconfig(Qt6Network) BuildRequires: pkgconfig(Qt6PrintSupport) BuildRequires: pkgconfig(Qt6Sql) #BuildRequires: pkgconfig(Qt5WebKitWidgets) BuildRequires: pkgconfig(Qt6Widgets) BuildRequires: pkgconfig(Qt6Xml) BuildRequires: pkgconfig(Qt6Core5Compat) BuildRequires: pkgconfig(xext) # for unbundle sources %if %{with system_qtsingleapplication} BuildRequires: qtsingleapplication-qt6-devel %endif BuildRequires: pkgconfig(zlib) Requires: hicolor-icon-theme Requires: mpv Recommends: (yt-dlp or youtube-dl) Suggests: yt-dlp Provides: bundled(mongoose) = 6.11 Provides: bundled(libmaia) = 0.9.0 %description SMPlayer is a graphical user interface (GUI) for the award-winning mplayer and also for mpv. But apart from providing access for the most common and useful options of mplayer and mpv, SMPlayer adds other interesting features like the possibility to play Youtube videos or search and download subtitles. One of the main features is the ability to remember the state of a played file, so when you play it later it will be resumed at the same point and with the same settings. SMPlayer is developed with the Qt toolkit, so it's multi-platform. %package themes Summary: Themes and Skins for SMPlayer Requires: %{name} = %{version}-%{release} BuildArch: noarch %description themes A set of themes for SMPlayer and a set of skins for SMPlayer. %prep %setup -q -a3 -a4 #remove some bundle sources rm -rf zlib #TODO unbundle libmaia #rm -rf src/findsubtitles/libmaia %patch -P0 -p1 -b .qt6 %if %{with system_qtsingleapplication} rm -rf src/qtsingleapplication/ %patch -P1 -p1 -b .qtsingleapplication %endif %patch -P2 -p1 # correction for wrong-file-end-of-line-encoding sed -i 's/\r//' *.txt *.md # change rcc binary sed -e "s#rcc -binary#%{_qt6_libexecdir}/rcc -binary#" -i smplayer-themes-%{smplayer_themes_ver}/themes/Makefile sed -e "s#rcc -binary#%{_qt6_libexecdir}/rcc -binary#" -i smplayer-skins-%{smplayer_skins_ver}/themes/Makefile %build if [ ! -f src/svn_revision.h ]; then echo '#define SVN_REVISION "%{svn_revision}"' > src/svn_revision.h fi pushd src sed -i 's/DEFINES += YT_CODEDOWNLOADER/DEFINES -= YT_CODEDOWNLOADER/' smplayer.pro %{qmake_qt6} %make_build DATA_PATH="\\\"%{_datadir}/%{name}\\\"" \ TRANSLATION_PATH="\\\"%{_datadir}/%{name}/translations\\\"" \ DOC_PATH="\\\"%{_docdir}/%{name}\\\"" \ THEMES_PATH="\\\"%{_datadir}/%{name}/themes\\\"" \ SHORTCUTS_PATH="\\\"%{_datadir}/%{name}/shortcuts\\\"" lrelease-qt6 %{name}.pro popd pushd smplayer-themes-%{smplayer_themes_ver} %make_build popd pushd smplayer-skins-%{smplayer_skins_ver} %make_build popd pushd webserver export CFLAGS_EXTRA="%{optflags} %{?__global_ldflags}" %make_build popd %install %make_install PREFIX=%{_prefix} DOC_PATH=%{_docdir}/%{name} # License docs go to another place rm -r %{buildroot}%{_docdir}/%{name}/Copying* pushd smplayer-themes-%{smplayer_themes_ver} %make_install PREFIX=%{_prefix} popd pushd smplayer-skins-%{smplayer_skins_ver} %make_install PREFIX=%{_prefix} mv README.txt README-skins.txt mv Changelog Changelog-skins.txt popd %check desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdata.xml %files %license Copying* %{_bindir}/smplayer %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.* %{_datadir}/smplayer/ %exclude %{_datadir}/smplayer/themes/ %{_mandir}/man1/%{name}.1.* %{_docdir}/%{name}/ %{_bindir}/simple_web_server %{_metainfodir}/%{name}.appdata.xml %files themes %doc smplayer-themes-%{smplayer_themes_ver}/README.txt %doc smplayer-themes-%{smplayer_themes_ver}/Changelog %doc smplayer-skins-%{smplayer_skins_ver}/README-skins.txt %doc smplayer-skins-%{smplayer_skins_ver}/Changelog-skins.txt %license smplayer-themes-%{smplayer_themes_ver}/COPYING* %{_datadir}/smplayer/themes/ %changelog * Thu Sep 03 2026 Sérgio Basto - 26.8.29-1 - 26.8.29 + qt6 * Wed Mar 11 2026 Sérgio Basto - 25.6.0.10411-1 - Qt6 branch