smplayer-vl.spec 8.3 KB

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