smplayer-vl.spec 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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.8.0
  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.8.0-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. * Thu Apr 5 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.8.0-1
  104. - new upstream release
  105. * Mon Feb 13 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.7.0-1
  106. - new upstream release
  107. * Thu Feb 9 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.6.9-2
  108. - rebuild
  109. * Sat Jul 10 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.6.9-1
  110. - built based on RPM Fusion development
  111. * Mon May 24 2010 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.9-2
  112. - #1217: fix regression in Thunar
  113. * Sat Apr 24 2010 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.9-1
  114. - new upstream version: 0.6.9
  115. * Sun Jul 28 2009 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.8-1
  116. - new upstream version: 0.6.8
  117. * Sun Mar 29 2009 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.7-1
  118. - new upstream version: 0.6.7
  119. * Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 0.6.6-2
  120. - rebuild for new F11 features
  121. * Sat Jan 10 2009 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.6-1
  122. - new upstream version: 0.6.6
  123. * Thu Nov 13 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.5.1-1
  124. - new upstream version: 0.6.5.1
  125. * Wed Oct 29 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.4-1
  126. - new upstream version: 0.6.4
  127. * Mon Sep 29 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.3-1
  128. - new upstream version: 0.6.3
  129. * Fri Aug 15 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.2-1
  130. - new upstream version: 0.6.2
  131. - add servicemenus depending on the KDE version
  132. * Wed Jul 30 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 0.6.1-4
  133. - rebuild for buildsys cflags issue
  134. * Tue Jul 22 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.1-3
  135. - import into rpmfusion
  136. * Tue Jul 08 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.1-2
  137. - fix packaging of FAQs
  138. * Tue Jun 17 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.1-1
  139. - update to latest upstream version
  140. * Sat Feb 24 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.0-0.3.rc2
  141. - add %%{?_smp_mflags} in Makefile to really use it
  142. - finally fix usage of macros
  143. - mode 0644 for desktop-file isn't needed anymore
  144. * Sat Feb 23 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.0-0.2.rc2
  145. - Update %%post and %%postun scriplets
  146. - use %%{?_smp_mflags} in make
  147. - change vendor to rpmfusion in desktop-file-install
  148. - some minor spec cleanups
  149. * Thu Feb 14 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.0-0.1.rc2
  150. - new upstream version: 0.6.0rc2
  151. * Tue Feb 12 2008 Sebastian Vahl <fedora@deadbabylon.de> - 0.6.0-0.1.rc1
  152. - new upstream version: 0.6.0rc1
  153. - added docs: Changelog Copying.txt Readme.txt Release_notes.txt
  154. - fix path of %%docdir in Makefile
  155. * Tue Dec 18 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.62-1
  156. - new version: 0.5.62
  157. - specify license as GPLv2+
  158. * Thu Sep 20 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.60-1
  159. - Update to development version of qt4
  160. * Thu Sep 20 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.21-1
  161. - new upstream version: 0.5.21
  162. - don't add category "Multimedia" to desktop-file
  163. - correct url of Source0
  164. * Mon Jul 29 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.20-1
  165. - new upstream version: 0.5.20
  166. * Mon Jun 18 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.14-1
  167. - new upstream version: 0.5.14
  168. * Thu Jun 14 2007 Sebastian Vahl <fedora@deadbabylon.de> - 0.5.7-1
  169. - Initial Release