[packages/clementine] add tests; fix .desktop file validation

glen glen at pld-linux.org
Sat Sep 7 23:57:57 CEST 2013


commit 58fa3d3783f72e13828fdd5f016f7a2b647ffec7
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Sep 8 00:57:41 2013 +0300

    add tests; fix .desktop file validation

 clementine-desktop.patch | 35 +++++++++++++++++++++++++++++++++++
 clementine.spec          | 12 ++++++++++--
 2 files changed, 45 insertions(+), 2 deletions(-)
---
diff --git a/clementine.spec b/clementine.spec
index c62cd9d..2f4f192 100644
--- a/clementine.spec
+++ b/clementine.spec
@@ -11,6 +11,7 @@
 %bcond_without	static_sqlite	# with static sqlite3
 %bcond_with	static_projectm	# with static projectM
 %bcond_with	libspotify	# build with system libspotify instead of downloading blob
+%bcond_without	tests		# build without tests
 
 %define		qtver	%(pkg-config --silence-errors --modversion QtCore 2>/dev/null || echo ERROR)
 Summary:	A music player and library organiser
@@ -28,6 +29,7 @@ Patch1:		unbundle-po.patch
 Patch2:		%{name}-1.1.1-libimobiledevice-fix.patch
 Patch3:		%{name}-dt_categories.patch
 Patch4:		%{name}-mygpo.patch
+Patch5:		%{name}-desktop.patch
 BuildRequires:	QtCore-devel >= %{qtver}
 BuildRequires:	QtDBus-devel >= %{qtver}
 BuildRequires:	QtGui-devel >= %{qtver}
@@ -41,6 +43,7 @@ BuildRequires:	QtXml-devel >= %{qtver}
 BuildRequires:	QtXmlPatterns-devel >= %{qtver}
 BuildRequires:	boost-devel
 BuildRequires:	cmake >= 2.6
+BuildRequires:	desktop-file-utils
 #%{?with_static_projectm:BuildRequires:	ftgl-devel >= 2.1.3}
 BuildRequires:	gettext-devel
 %{?with_static_projectm:BuildRequires:	glew-devel}
@@ -109,6 +112,7 @@ a Qt4 előnyeit.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 # Remove all 3rdparty libraries exceph universalchardet
 # as it is not available as a separate library.
@@ -139,6 +143,10 @@ CXXFLAGS="%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG_OUTPUT"
 	..
 %{__make}
 
+%if %{with tests}
+desktop-file-validate ../dist/%{name}.desktop
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
@@ -152,8 +160,8 @@ rm -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
 %find_lang %{name} --with-qm
 
 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
-cp -a dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
-cp -a dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
+cp -p dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
+cp -p dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/clementine-desktop.patch b/clementine-desktop.patch
new file mode 100644
index 0000000..434ef4e
--- /dev/null
+++ b/clementine-desktop.patch
@@ -0,0 +1,35 @@
+--- clementine-1.1.1/dist/clementine.desktop.orig	2012-10-11 05:16:39.000000000 -0600
++++ clementine-1.1.1/dist/clementine.desktop	2013-02-24 10:20:27.771542899 -0700
+@@ -15,27 +15,27 @@
+ MimeType=application/ogg;application/x-ogg;application/x-ogm-audio;audio/aac;audio/mp4;audio/mpeg;audio/mpegurl;audio/ogg;audio/vnd.rn-realaudio;audio/vorbis;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-wma;audio/x-musepack;audio/x-oggflac;audio/x-pn-realaudio;audio/x-scpls;audio/x-speex;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-wav;video/x-ms-asf;x-content/audio-player;x-scheme-handler/zune;x-scheme-handler/itpc;x-scheme-handler/itms;x-scheme-handler/feed;
+ X-Ayatana-Desktop-Shortcuts=Play;Pause;Stop;Previous;Next;
+ 
+-[Play Shortcut Group]
++[X-Play Shortcut Group]
+ Name=Play
+ Exec=clementine --play
+ TargetEnvironment=Unity
+ 
+-[Pause Shortcut Group]
++[X-Pause Shortcut Group]
+ Name=Pause
+ Exec=clementine --pause
+ TargetEnvironment=Unity
+ 
+-[Stop Shortcut Group]
++[X-Stop Shortcut Group]
+ Name=Stop
+ Exec=clementine --stop
+ TargetEnvironment=Unity
+ 
+-[Previous Shortcut Group]
++[X-Previous Shortcut Group]
+ Name=Previous
+ Exec=clementine --previous
+ TargetEnvironment=Unity
+ 
+-[Next Shortcut Group]
++[X-Next Shortcut Group]
+ Name=Next
+ Exec=clementine --next
+ TargetEnvironment=Unity
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/clementine.git/commitdiff/58fa3d3783f72e13828fdd5f016f7a2b647ffec7



More information about the pld-cvs-commit mailing list