smplayer-vl.spec 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. # define correct path to used binaries
  2. %define _qt4_qmake %{_libdir}/qt4/bin/qmake
  3. %define _qt4_lrelease %{_libdir}/qt4/bin/lrelease
  4. Name: smplayer
  5. Version: 0.6.9
  6. Release: 1%{?_dist_release}
  7. Summary: A graphical frontend for mplayer
  8. Summary(ja): MPlayerのグラフィカルフロントエンド
  9. Group: Applications/Multimedia
  10. License: GPLv2+
  11. URL: http://smplayer.sourceforge.net/linux/
  12. Source0: http://downloads.sourceforge.net/sourceforge/smplayer/smplayer-%{version}.tar.bz2
  13. # # Add a servicemenu to enqeue files in smplayer's playlist.
  14. # # The first one is for KDE4, the second one for KDE3.
  15. # # see also:
  16. # # https://sourceforge.net/tracker/?func=detail&atid=913576&aid=2052905&group_id=185512
  17. # Source1: smplayer_enqueue_kde4.desktop
  18. # Source2: smplayer_enqueue_kde3.desktop
  19. # Fix regression in Thunar (TODO: re-check in upcoming versions!)
  20. # https://bugzilla.rpmfusion.org/show_bug.cgi?id=1217
  21. Patch0: smplayer-0.6.9-desktop-files.patch
  22. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  23. BuildRequires: desktop-file-utils
  24. BuildRequires: qt4-designer
  25. BuildRequires: qt4-devel
  26. # smplayer without mplayer is quite useless
  27. ##Requires: mplayer
  28. %description
  29. smplayer intends to be a complete front-end for Mplayer, from basic features
  30. like playing videos, DVDs, and VCDs to more advanced features like support
  31. for Mplayer filters and more. One of the main features is the ability to
  32. remember the state of a played file, so when you play it later it will resume
  33. at the same point and with the same settings. smplayer is developed with
  34. the Qt toolkit, so it's multi-platform.
  35. #'
  36. %prep
  37. %setup -qn %{name}-%{version}
  38. %patch0 -p0 -b .desktop-files
  39. # correction for wrong-file-end-of-line-encoding
  40. %{__sed} -i 's/\r//' *.txt
  41. # fix files which are not UTF-8
  42. iconv -f Latin1 -t UTF-8 -o Changelog.utf8 Changelog
  43. %__mv Changelog.utf8 Changelog
  44. # use lrelease from qt4-devel
  45. %__sed -i 's|LRELEASE=lrelease|LRELEASE=%{_qt4_lrelease}|' Makefile
  46. # fix path of docs
  47. %__sed -i 's|DOC_PATH=$(PREFIX)/share/doc/packages/smplayer|DOC_PATH=$(PREFIX)/share/doc/smplayer-%{version}|' Makefile
  48. # use %{?_smp_mflags}
  49. %__sed -i '/cd src && $(QMAKE) $(QMAKE_OPTS) && $(DEFS) make/s!$! %{?_smp_mflags}!' Makefile
  50. # don't show smplayer_enqueue.desktop in KDE and use servicemenus instead
  51. echo "NotShowIn=KDE;" >> smplayer_enqueue.desktop
  52. %build
  53. %__make QMAKE=%{_qt4_qmake} PREFIX=%{_prefix}
  54. %install
  55. %__rm -rf %{buildroot}
  56. %__make QMAKE=%{_qt4_qmake} PREFIX=%{_prefix} DESTDIR=%{buildroot}/ install
  57. desktop-file-install --delete-original \
  58. --vendor "vine" \
  59. --dir %{buildroot}%{_datadir}/applications/ \
  60. %{buildroot}%{_datadir}/applications/%{name}.desktop
  61. desktop-file-install --delete-original \
  62. --vendor "vine" \
  63. --dir %{buildroot}%{_datadir}/applications/ \
  64. %{buildroot}%{_datadir}/applications/%{name}_enqueue.desktop
  65. # # Add servicemenus dependend on the version of KDE:
  66. # # https://sourceforge.net/tracker/index.php?func=detail&aid=2052905&group_id=185512&atid=913576
  67. # %if 0%{?fedora} >= 9
  68. # install -Dpm 0644 %{SOURCE1} %{buildroot}%{_datadir}/kde4/services/ServiceMenus/smplayer_enqueue.desktop
  69. # %else
  70. # install -Dpm 0644 %{SOURCE2} %{buildroot}%{_datadir}/apps/konqueror/servicemenus/smplayer_enqueue.desktop
  71. # %endif
  72. %clean
  73. %__rm -rf %{buildroot}
  74. %post
  75. touch --no-create %{_datadir}/icons/hicolor
  76. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  77. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  78. fi
  79. update-desktop-database &> /dev/null || :
  80. %postun
  81. touch --no-create %{_datadir}/icons/hicolor
  82. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  83. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  84. fi
  85. update-desktop-database &> /dev/null || :
  86. %files
  87. %defattr(-,root,root,-)
  88. %{_docdir}/%{name}-%{version}/
  89. %{_bindir}/smplayer
  90. %{_datadir}/applications/*-smplayer*.desktop
  91. %{_datadir}/icons/hicolor/*/apps/smplayer.png
  92. %{_datadir}/smplayer/
  93. %{_mandir}/man1/smplayer.1.gz
  94. # %if 0%{?fedora} >= 9
  95. # %dir %{_datadir}/kde4/services/ServiceMenus/
  96. # %{_datadir}/kde4/services/ServiceMenus/smplayer_enqueue.desktop
  97. # %else
  98. # %dir %{_datadir}/apps/konqueror/
  99. # %dir %{_datadir}/apps/konqueror/servicemenus/
  100. # %{_datadir}/apps/konqueror/servicemenus/smplayer_enqueue.desktop
  101. # %endif
  102. %changelog
  103. * Sat Jul 10 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.6.9-1
  104. - built based on RPM Fusion development
  105. * Mon May 24 2010 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.9-2
  106. - #1217: fix regression in Thunar
  107. * Sat Apr 24 2010 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.9-1
  108. - new upstream version: 0.6.9
  109. * Sun Jul 28 2009 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.8-1
  110. - new upstream version: 0.6.8
  111. * Sun Mar 29 2009 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.7-1
  112. - new upstream version: 0.6.7
  113. * Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 0.6.6-2
  114. - rebuild for new F11 features
  115. * Sat Jan 10 2009 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.6-1
  116. - new upstream version: 0.6.6
  117. * Thu Nov 13 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.5.1-1
  118. - new upstream version: 0.6.5.1
  119. * Wed Oct 29 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.4-1
  120. - new upstream version: 0.6.4
  121. * Mon Sep 29 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.3-1
  122. - new upstream version: 0.6.3
  123. * Fri Aug 15 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.2-1
  124. - new upstream version: 0.6.2
  125. - add servicemenus depending on the KDE version
  126. * Wed Jul 30 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 0.6.1-4
  127. - rebuild for buildsys cflags issue
  128. * Tue Jul 22 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.1-3
  129. - import into rpmfusion
  130. * Tue Jul 08 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.1-2
  131. - fix packaging of FAQs
  132. * Tue Jun 17 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.1-1
  133. - update to latest upstream version
  134. * Sat Feb 24 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.0-0.3.rc2
  135. - add %%{?_smp_mflags} in Makefile to really use it
  136. - finally fix usage of macros
  137. - mode 0644 for desktop-file isn't needed anymore
  138. * Sat Feb 23 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.0-0.2.rc2
  139. - Update %%post and %%postun scriplets
  140. - use %%{?_smp_mflags} in make
  141. - change vendor to rpmfusion in desktop-file-install
  142. - some minor spec cleanups
  143. * Thu Feb 14 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.0-0.1.rc2
  144. - new upstream version: 0.6.0rc2
  145. * Tue Feb 12 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.0-0.1.rc1
  146. - new upstream version: 0.6.0rc1
  147. - added docs: Changelog Copying.txt Readme.txt Release_notes.txt
  148. - fix path of %%docdir in Makefile
  149. * Tue Dec 18 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.62-1
  150. - new version: 0.5.62
  151. - specify license as GPLv2+
  152. * Thu Sep 20 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.60-1
  153. - Update to development version of qt4
  154. * Thu Sep 20 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.21-1
  155. - new upstream version: 0.5.21
  156. - don't add category "Multimedia" to desktop-file
  157. - correct url of Source0
  158. * Mon Jul 29 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.20-1
  159. - new upstream version: 0.5.20
  160. * Mon Jun 18 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.14-1
  161. - new upstream version: 0.5.14
  162. * Thu Jun 14 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.7-1
  163. - Initial Release