]> git.pld-linux.org Git - packages/clementine.git/commitdiff
add tests; fix .desktop file validation
authorElan Ruusamäe <glen@delfi.ee>
Sat, 7 Sep 2013 21:57:41 +0000 (00:57 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 7 Sep 2013 21:57:41 +0000 (00:57 +0300)
clementine-desktop.patch [new file with mode: 0644]
clementine.spec

diff --git a/clementine-desktop.patch b/clementine-desktop.patch
new file mode 100644 (file)
index 0000000..434ef4e
--- /dev/null
@@ -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
index c62cd9db6b6d02dfd3fe2cce89efd40c3059596e..2f4f192ea066542eed23a378e9028713f25914e4 100644 (file)
@@ -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
This page took 0.195259 seconds and 4 git commands to generate.