commit e7664fa464b1e90c32f377870dec5a5ef080be99
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Sun Jul 17 18:17:31 2016 +0100
Switch builds to Qt5
- Do not apply a vendor tag to .desktop files (using --vendor).
- Drop old smplayer_enqueue.desktop
smplayer.spec | 53 +++++++++++++++++++++++--------------------
smplayer_enqueue_kde4.desktop | 17 --------------
2 files changed, 28 insertions(+), 42 deletions(-)
---
diff --git a/smplayer.spec b/smplayer.spec
index 2040a10..43b1c56 100644
--- a/smplayer.spec
+++ b/smplayer.spec
@@ -1,7 +1,7 @@
Name: smplayer
Version: 16.6.0
%global smtube_ver 16.6.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A graphical frontend for mplayer
Group: Applications/Multimedia
@@ -11,7 +11,6 @@ Source0:
http://downloads.sourceforge.net/smplayer/smplayer-%{version}.ta
# Add a servicemenu to enqeue files in smplayer's playlist.
# see also:
#
https://sourceforge.net/tracker/?func=detail&atid=913576&aid=2052...
-Source1: smplayer_enqueue_kde4.desktop
Source3:
http://downloads.sourceforge.net/smtube/smtube-%{smtube_ver}.tar.bz2
# Fix regression in Thunar (TODO: re-check in upcoming versions!)
#
https://bugzilla.rpmfusion.org/show_bug.cgi?id=1217
@@ -20,14 +19,24 @@ Patch2: smplayer-14.9.0.6966-system-qtsingleapplication.patch
Patch3: smtube-16.3.0-system-qtsingleapplication.patch
BuildRequires: desktop-file-utils
-BuildRequires: qt4-devel
-BuildRequires: quazip-devel
-BuildRequires: qtsingleapplication-devel
-BuildRequires: qtwebkit-devel
+BuildRequires: qt5-qttools
+BuildRequires: pkgconfig(Qt5Core)
+BuildRequires: pkgconfig(Qt5DBus)
+BuildRequires: pkgconfig(Qt5Gui)
+BuildRequires: pkgconfig(Qt5Network)
+BuildRequires: pkgconfig(Qt5Script)
+BuildRequires: pkgconfig(Qt5Widgets)
+BuildRequires: pkgconfig(Qt5Xml)
+BuildRequires: qt5-linguist
+BuildRequires: qtsingleapplication-qt5-devel
+BuildRequires: quazip-qt5-devel
+BuildRequires: zlib-devel
+# for smtube only
+BuildRequires: pkgconfig(Qt5WebKit)
+BuildRequires: pkgconfig(Qt5WebKitWidgets)
# smplayer without mplayer is quite useless
Requires: mplayer
-Requires: kde-filesystem
-%{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}}
+%{?_qt5_version:Requires: qt5-qtbase%{?_isa} >= %{_qt5_version}}
%description
smplayer intends to be a complete front-end for Mplayer, from basic features
@@ -64,43 +73,34 @@ sed -i
's|DOC_PATH=$(PREFIX)/share/doc/packages/smplayer|DOC_PATH=$(PREFIX)/shar
# use %{?_smp_mflags}
sed -i '/cd src && $(QMAKE) $(QMAKE_OPTS) && $(DEFS) make/s!$!
%{?_smp_mflags}!' Makefile
-# don't show smplayer_enqueue.desktop in KDE and use servicemenus instead
-echo "NotShowIn=KDE;" >> smplayer_enqueue.desktop
-
%build
-make QMAKE=%{_qt4_qmake} PREFIX=%{_prefix} LRELEASE=%{_bindir}/lrelease-qt4
+make QMAKE=%{_qt5_qmake} PREFIX=%{_prefix} LRELEASE=%{_bindir}/lrelease-qt5
pushd smtube-%{smtube_ver}
-sed -i 's|/usr/local|%{_prefix}|' Makefile
sed -i 's|doc/smtube|doc/%{name}/smtube|' Makefile
sed -i 's|smtube/translations|smplayer/translations|' Makefile
-make QMAKE=%{_qt4_qmake} PREFIX=%{_prefix} LRELEASE=%{_bindir}/lrelease-qt4
+make QMAKE=%{_qt5_qmake} PREFIX=%{_prefix} LRELEASE=%{_bindir}/lrelease-qt5
popd
+
%install
-make QMAKE=%{_qt4_qmake} PREFIX=%{_prefix} DESTDIR=%{buildroot}/ install
+make install DESTDIR=%{buildroot} PREFIX=%{_prefix}
pushd smtube-%{smtube_ver}
-make install DESTDIR=%{buildroot}
+make install DESTDIR=%{buildroot} PREFIX=%{_prefix}
popd
desktop-file-install --delete-original \
- --vendor "rpmfusion" \
--dir %{buildroot}%{_datadir}/applications/ \
%{buildroot}%{_datadir}/applications/%{name}.desktop
desktop-file-install --delete-original \
- --vendor "rpmfusion" \
--dir %{buildroot}%{_datadir}/applications/ \
%{buildroot}%{_datadir}/applications/%{name}_enqueue.desktop
desktop-file-validate %{buildroot}%{_datadir}/applications/smtube.desktop
-# Add servicemenus dependend on the version of KDE:
-#
https://sourceforge.net/tracker/index.php?func=detail&aid=2052905&...
-install -Dpm 0644 %{SOURCE1}
%{buildroot}%{_datadir}/kde4/services/ServiceMenus/smplayer_enqueue.desktop
-
%post
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
@@ -118,18 +118,21 @@ update-desktop-database &> /dev/null || :
%files
%{_bindir}/smplayer
%{_bindir}/smtube
-%{_datadir}/applications/rpmfusion-smplayer*.desktop
+%{_datadir}/applications/smplayer*.desktop
%{_datadir}/applications/smtube.desktop
%{_datadir}/icons/hicolor/*/apps/smplayer.png
%{_datadir}/icons/hicolor/*/apps/smplayer.svg
%{_datadir}/icons/hicolor/*/apps/smtube.png
%{_datadir}/smplayer/
-%dir %{_datadir}/kde4/services/ServiceMenus/
-%{_datadir}/kde4/services/ServiceMenus/smplayer_enqueue.desktop
%{_mandir}/man1/smplayer.1.gz
%{_docdir}/%{name}/
%changelog
+* Sun Jul 17 2016 Sérgio Basto <sergio(a)serjux.com> - 16.6.0-2
+- Switch builds to Qt5
+- Do not apply a vendor tag to .desktop files (using --vendor).
+- Drop old smplayer_enqueue.desktop
+
* Wed Jun 22 2016 Sérgio Basto <sergio(a)serjux.com> - 16.6.0-1
- Update to 16.6.0