[kmplayer] use %find_lang ... --with-kde broken or deprecated mime type (#587573) (upstreamable) fix for execut

Rex Dieter rdieter at fedoraproject.org
Mon Mar 21 14:06:43 UTC 2011


commit 58987daa80712329308d83d79529a59136bd0fdb
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Mon Mar 21 09:06:34 2011 -0500

    use %find_lang ... --with-kde
    broken or deprecated mime type (#587573)
    (upstreamable) fix for executable script

 kmplayer-0.11.2c-desktop_validate.patch  |   54 ++++++++++++++++++++++++++++++
 kmplayer-0.11.2c-executable_script.patch |    8 ++++
 kmplayer-no-xtest.patch                  |   45 -------------------------
 kmplayer.spec                            |   53 ++++++++++++-----------------
 4 files changed, 84 insertions(+), 76 deletions(-)
---
diff --git a/kmplayer-0.11.2c-desktop_validate.patch b/kmplayer-0.11.2c-desktop_validate.patch
new file mode 100644
index 0000000..07c27f4
--- /dev/null
+++ b/kmplayer-0.11.2c-desktop_validate.patch
@@ -0,0 +1,54 @@
+diff -up kmplayer-0.11.2c/src/kmplayer.desktop.no-x-text kmplayer-0.11.2c/src/kmplayer.desktop
+--- kmplayer-0.11.2c/src/kmplayer.desktop.no-x-text	2010-10-02 14:47:03.000000000 -0500
++++ kmplayer-0.11.2c/src/kmplayer.desktop	2011-03-21 08:43:10.459771473 -0500
+@@ -42,7 +42,6 @@ Comment[sv]=KDE-gränssnitt för Mplayer
+ Comment[th]=ระบบติดต่อผู้ใช้ของ MPlayer บน KDE 
+ Comment[tr]=MPlayer için KDE arayüzü
+ Comment[uk]=KDE-інтерфейс для MPlayer
+-Comment[x-test]=xxKDE interface for MPlayerxx
+ Comment[zh_CN]=MPlayer 的 KDE 界面
+ Terminal=false
+ Name=KMPlayer
+@@ -86,10 +85,9 @@ Name[sv]=Kmplayer
+ Name[th]=KMPlayer
+ Name[tr]=KMPlayer
+ Name[uk]=KMPlayer
+-Name[x-test]=xxKMPlayerxx
+ Name[zh_CN]=KMPlayer
+ Name[zh_TW]=KMPlayer
+-MimeType=application/ogg;application/smil;application/vnd.ms-asf;application/vnd.rn-realmedia;application/x-kmplayer;application/x-mplayer2;application/x-ogg;application/xspf+xml;audio/basic;audio/m3u;audio/mp4;audio/mpeg;audio/mpegurl;audio/vnd.rn-realaudio;audio/vorbis;audio/x-aiff;audio/x-flac;audio/x-m3u;audio/x-matroska;audio/x-mp2;audio/x-mp3;audio/x-mpegurl;audio/x-ms-asx;audio/x-ms-wma;audio/x-musepack;audio/x-mod;audio/x-oggflac;audio/x-pn-realaudio;audio/x-scpls;audio/x-speex;audio/x-vorbis;audio/x-wav;video/avi;video/flv;video/mediaplayer;video/mp4;video/mpeg;video/quicktime;video/vnd.rn-realvideo;video/x-avi;video/x-flic;video/x-matroska;video/x-ms-asf;video/x-flv;video/x-msvideo;video/x-ms-wmp;video/x-ms-wmv;video/x-ogm;video/x-theora;uri/mms;uri/pnm;uri/rtspt;uri/rtspu;
++MimeType=application/ogg;application/smil;application/vnd.ms-asf;application/vnd.rn-realmedia;application/x-kmplayer;application/x-mplayer2;application/x-ogg;application/xspf+xml;audio/basic;audio/m3u;audio/mp4;audio/mpeg;audio/mpegurl;audio/vnd.rn-realaudio;audio/vorbis;audio/x-aiff;audio/x-flac;audio/x-m3u;audio/x-matroska;audio/x-mp2;audio/x-mp3;audio/x-mpegurl;audio/x-ms-asx;audio/x-ms-wma;audio/x-musepack;audio/x-mod;audio/x-oggflac;audio/x-pn-realaudio;audio/x-scpls;audio/x-speex;audio/x-vorbis;audio/x-wav;video/avi;video/flv;video/mediaplayer;video/mp4;video/mpeg;video/quicktime;video/vnd.rn-realvideo;video/x-avi;video/x-flic;video/x-matroska;video/x-ms-asf;video/x-flv;video/x-msvideo;video/x-ms-wmp;video/x-ms-wmv;video/x-ogm;video/x-theora;
+ InitialPreference=7
+ Categories=Qt;KDE;AudioVideo;
+ GenericName=Media Player
+@@ -133,6 +131,5 @@ GenericName[sv]=Mediaspelare
+ GenericName[th]=โปรแกรมเล่นสื่อ
+ GenericName[tr]=Medya Oynatıcı
+ GenericName[uk]=Програвач
+-GenericName[x-test]=xxMedia Playerxx
+ GenericName[zh_CN]=媒体播放器
+ GenericName[zh_TW]=媒體播放器
+diff -up kmplayer-0.11.2c/src/kmplayer_part.desktop.no-x-text kmplayer-0.11.2c/src/kmplayer_part.desktop
+--- kmplayer-0.11.2c/src/kmplayer_part.desktop.no-x-text	2010-10-02 14:47:03.000000000 -0500
++++ kmplayer-0.11.2c/src/kmplayer_part.desktop	2011-03-21 08:44:38.521428334 -0500
+@@ -39,7 +39,6 @@ Name[sv]=Inbäddad Mplayer för KDE
+ Name[th]=ตัวเล่นสื่อ MPlayer แบบฝังตัวได้สำหรับ KDE
+ Name[tr]=KDE için gömülmüş MPlayer
+ Name[uk]=Вбудований MPlayer для KDE
+-Name[x-test]=xxEmbedded MPlayer for KDExx
+ Name[zh_CN]=KDE 嵌入式 MPlayer
+ Comment=Video player plugin (QuickTime, XMovie, Windows Media and RealPlayer compatible)
+ Comment[be]=Утулка прайгравання відэа (сумяшчальны з QuickTime, XMovie, Windows Media і RealPlayer)
+@@ -79,11 +78,10 @@ Comment[sv]=Insticksprogram för videosp
+ Comment[th]=ส่วนเสริมตัวเล่นวิดีโอ (ใช้ด้วยกันได้กับ QuickTime, XMovie, Windows Media และ RealPlayer)
+ Comment[tr]=Video oynatıcı eklentisi (QuickTime, XMovie, Windows Media ve RealPlayer ile uyumlu)
+ Comment[uk]=Додаток відтворення відео (QuickTime, XMovie, Windows Media і сумісних з RealPlayer)
+-Comment[x-test]=xxVideo player plugin (QuickTime, XMovie, Windows Media and RealPlayer compatible)xx
+ Comment[zh_CN]=视频播放器插件(兼容 QuickTime、XMovie、Windows Media 和 RealPlayer)
+ X-KDE-Library=libkmplayerpart
+ # Keep in sync with the audio types in kmplayer.desktop
+-MimeType=application/ogg;application/smil;application/vnd.ms-asf;application/vnd.rn-realmedia;application/x-kmplayer;application/x-mplayer2;application/x-ogg;application/xspf+xml;audio/basic;audio/m3u;audio/mp4;audio/mpeg;audio/mpegurl;audio/vnd.rn-realaudio;audio/vorbis;audio/x-aiff;audio/x-flac;audio/x-m3u;audio/x-matroska;audio/x-mp2;audio/x-mp3;audio/x-mpegurl;audio/x-ms-asx;audio/x-ms-wma;audio/x-musepack;audio/x-mod;audio/x-oggflac;audio/x-pn-realaudio;audio/x-scpls;audio/x-speex;audio/x-vorbis;audio/x-wav;video/avi;video/mediaplayer;video/mp4;video/mpeg;video/quicktime;video/vnd.rn-realvideo;video/x-avi;video/x-flic;video/x-matroska;video/x-ms-asf;video/x-msvideo;video/x-ms-wmp;video/x-ms-wmv;video/x-ogm;video/x-theora;uri/mms;uri/pnm;uri/rtspt;uri/rtspu;
++MimeType=application/ogg;application/smil;application/vnd.ms-asf;application/vnd.rn-realmedia;application/x-kmplayer;application/x-mplayer2;application/x-ogg;application/xspf+xml;audio/basic;audio/m3u;audio/mp4;audio/mpeg;audio/mpegurl;audio/vnd.rn-realaudio;audio/vorbis;audio/x-aiff;audio/x-flac;audio/x-m3u;audio/x-matroska;audio/x-mp2;audio/x-mp3;audio/x-mpegurl;audio/x-ms-asx;audio/x-ms-wma;audio/x-musepack;audio/x-mod;audio/x-oggflac;audio/x-pn-realaudio;audio/x-scpls;audio/x-speex;audio/x-vorbis;audio/x-wav;video/avi;video/mediaplayer;video/mp4;video/mpeg;video/quicktime;video/vnd.rn-realvideo;video/x-avi;video/x-flic;video/x-matroska;video/x-ms-asf;video/x-msvideo;video/x-ms-wmp;video/x-ms-wmv;video/x-ogm;video/x-theora;
+ Type=Service
+ Icon=kmplayer
+ X-KDE-ServiceTypes=KParts/ReadOnlyPart,Browser/View,KMediaPlayer/Player
diff --git a/kmplayer-0.11.2c-executable_script.patch b/kmplayer-0.11.2c-executable_script.patch
new file mode 100644
index 0000000..375210c
--- /dev/null
+++ b/kmplayer-0.11.2c-executable_script.patch
@@ -0,0 +1,8 @@
+diff -up kmplayer-0.11.2c/data/CMakeLists.txt.executable_script kmplayer-0.11.2c/data/CMakeLists.txt
+--- kmplayer-0.11.2c/data/CMakeLists.txt.executable_script	2010-04-24 14:48:11.000000000 -0500
++++ kmplayer-0.11.2c/data/CMakeLists.txt	2011-03-21 08:55:50.686195907 -0500
+@@ -1,2 +1,3 @@
+-install(FILES blip-api.xsl find-media.sh shoutcast.xsl youtube.xsl DESTINATION  ${DATA_INSTALL_DIR}/kmplayer)
++install(FILES blip-api.xsl shoutcast.xsl youtube.xsl DESTINATION  ${DATA_INSTALL_DIR}/kmplayer)
++install(PROGRAMS find-media.sh DESTINATION  ${DATA_INSTALL_DIR}/kmplayer)
+ install(FILES find-media.xml shoutcast.xml youtube-query.xml blip-tv.xml DESTINATION  ${DATA_INSTALL_DIR}/kmplayer/generators)
diff --git a/kmplayer.spec b/kmplayer.spec
index ff34335..162f7ee 100644
--- a/kmplayer.spec
+++ b/kmplayer.spec
@@ -1,7 +1,7 @@
 Name:    kmplayer
 Summary: A simple front-end for MPlayer/FFMpeg/Phonon
 Version: 0.11.2c
-Release: 2%{?dist}
+Release: 3%{?dist}
 Group:   Applications/Multimedia
 # The documentation is GFDL.
 # The files under src/moz-sdk are MPLv1.1 or GPLv2+ or LGPLv2+
@@ -17,11 +17,16 @@ License: GFDL and GPLv2+
 URL:     http://kmplayer.kde.org/
 Source0: http://kmplayer.kde.org/pkgs/kmplayer-%{version}%{?beta}.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-# We don't want this weird invalid locale:
-Patch2: kmplayer-no-xtest.patch
+
 # default to using phonon (instead of mplayer)
+# Put this into kde-settings instead? -- Rex
 Patch4: kmplayer-0.11.0a-kmplayerrc_phonon_default.patch
 
+## upstreamable patches
+# fix .desktop-related validation (categories, locale, mimetypes)
+Patch50: kmplayer-0.11.2c-desktop_validate.patch
+# install find_media.sh executable
+Patch51: kmplayer-0.11.2c-executable_script.patch
 
 BuildRequires: cairo-devel
 BuildRequires: dbus-devel 
@@ -44,8 +49,10 @@ on a movie file, the movie is played inside Konqueror.
 
 %prep
 %setup -q -n %{name}-%{version}%{?beta}
-%patch2 -p1 -b .no-x-text
+
 %patch4 -p1 -b .kmplayerrc_phonon_default
+%patch50 -p1 -b .desktop_validate
+%patch51 -p1 -b .executable_script
 
 
 %build
@@ -67,36 +74,15 @@ make install DESTDIR=%{buildroot} -C %{_target_platform}
 
 ## File lists
 # locale's
-%find_lang %{name} 
-# HTML (1.0)
-HTML_DIR=$(kde4-config --expandvars --install html)
-if [ -d %{buildroot}$HTML_DIR ]; then
-for lang_dir in %{buildroot}$HTML_DIR/* ; do
-  if [ -d $lang_dir ]; then
-    lang=$(basename $lang_dir)
-    echo "%lang($lang) $HTML_DIR/$lang/*" >> %{name}.lang
-    # replace absolute symlinks with relative ones
-    pushd $lang_dir
-      for i in *; do
-        [ -d $i -a -L $i/common ] && rm -f $i/common && ln -sf ../common $i/common
-      done
-    popd
-  fi
-done
-fi
+%find_lang %{name} --with-kde
 
-## unpackaged files
-# oxygen conflicts
-rm -f %{buildroot}%{_kde4_iconsdir}/oxygen/*/apps/kmplayer.*
 
-# Desktop file
-desktop-file-install \
-   --dir=%{buildroot}/%{_kde4_datadir}/applications/kde4 \
-   --add-category="Player" \
-   %{buildroot}/%{_kde4_datadir}/applications/kde4/kmplayer.desktop
+%check
+# validate patch50
+desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/kmplayer.desktop
+# validate patch51
+test -x %{buildroot}%{_kde4_datadir}/kde4/apps/kmplayer/find-media.sh
 
-# Permission fix
-chmod +x %{buildroot}/%{_kde4_datadir}/kde4/apps/kmplayer/find-media.sh
 
 %clean
 rm -rf %{buildroot}
@@ -134,6 +120,11 @@ update-desktop-database -q &> /dev/null || :
 
 
 %changelog
+* Mon Mar 21 2011 Rex Dieter <rdieter at fedoraproject.org> 0.11.2c-3
+- use %%find_lang ... --with-kde
+- broken or deprecated mime type (#587573)
+- (upstreamable) fix for executable script
+
 * Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.11.2c-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list