smplayer-vl.spec 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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 16.1.0
  5. Name: smplayer
  6. Version: 16.1.0
  7. Release: 2%{?_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. # Patch2: smplayer-14.9.0.6966-system-qtsingleapplication.patch
  27. # Patch3: smtube-15.5.10-system-qtsingleapplication.patch
  28. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  29. BuildRequires: desktop-file-utils
  30. BuildRequires: qt4-designer
  31. BuildRequires: qt4-devel
  32. # smplayer without mplayer is quite useless
  33. ##Requires: mplayer
  34. %description
  35. smplayer intends to be a complete front-end for Mplayer, from basic features
  36. like playing videos, DVDs, and VCDs to more advanced features like support
  37. for Mplayer filters and more. One of the main features is the ability to
  38. remember the state of a played file, so when you play it later it will resume
  39. at the same point and with the same settings. smplayer is developed with
  40. the Qt toolkit, so it's multi-platform.
  41. #'
  42. %prep
  43. %setup -a3 -qn %{name}-%{version}
  44. %patch0 -p0 -b .desktop-files
  45. # correction for wrong-file-end-of-line-encoding
  46. %{__sed} -i 's/\r//' *.txt
  47. # fix files which are not UTF-8
  48. iconv -f Latin1 -t UTF-8 -o Changelog.utf8 Changelog
  49. %__mv Changelog.utf8 Changelog
  50. # fix path of docs
  51. %__sed -i 's|DOC_PATH=$(PREFIX)/share/doc/packages/smplayer|DOC_PATH=$(PREFIX)/share/doc/smplayer-%{version}|' Makefile
  52. # use %{?_smp_mflags}
  53. %__sed -i '/cd src && $(QMAKE) $(QMAKE_OPTS) && $(DEFS) make/s!$! %{?_smp_mflags}!' Makefile
  54. # don't show smplayer_enqueue.desktop in KDE and use servicemenus instead
  55. echo "NotShowIn=KDE;" >> smplayer_enqueue.desktop
  56. %build
  57. %__make QMAKE=%{_qt4_qmake} PREFIX=%{_prefix} LRELEASE=%{_qt4_lrelease}
  58. pushd smtube-%{smtube_ver}
  59. sed -i 's|/usr/local|%{_prefix}|' Makefile
  60. sed -i 's|doc/smtube|doc/%{name}-%{version}/smtube|' Makefile
  61. sed -i 's|smtube/translations|smplayer/translations|' Makefile
  62. make QMAKE=%{_qt4_qmake} PREFIX=%{_prefix} LRELEASE=%{_qt4_lrelease}
  63. popd
  64. %install
  65. %__rm -rf %{buildroot}
  66. %__make QMAKE=%{_qt4_qmake} PREFIX=%{_prefix} DESTDIR=%{buildroot}/ install
  67. pushd smtube-%{smtube_ver}
  68. %__make install DESTDIR=%{buildroot}
  69. popd
  70. desktop-file-install --delete-original \
  71. --vendor "vine" \
  72. --dir %{buildroot}%{_datadir}/applications/ \
  73. %{buildroot}%{_datadir}/applications/%{name}.desktop
  74. desktop-file-install --delete-original \
  75. --vendor "vine" \
  76. --dir %{buildroot}%{_datadir}/applications/ \
  77. %{buildroot}%{_datadir}/applications/%{name}_enqueue.desktop
  78. # # Add servicemenus dependend on the version of KDE:
  79. # # https://sourceforge.net/tracker/index.php?func=detail&aid=2052905&group_id=185512&atid=913576
  80. # %if 0%{?fedora} >= 9
  81. # install -Dpm 0644 %{SOURCE1} %{buildroot}%{_datadir}/kde4/services/ServiceMenus/smplayer_enqueue.desktop
  82. # %else
  83. # install -Dpm 0644 %{SOURCE2} %{buildroot}%{_datadir}/apps/konqueror/servicemenus/smplayer_enqueue.desktop
  84. # %endif
  85. %clean
  86. %__rm -rf %{buildroot}
  87. %post
  88. touch --no-create %{_datadir}/icons/hicolor
  89. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  90. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  91. fi
  92. update-desktop-database &> /dev/null || :
  93. %postun
  94. touch --no-create %{_datadir}/icons/hicolor
  95. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  96. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  97. fi
  98. update-desktop-database &> /dev/null || :
  99. %files
  100. %defattr(-,root,root,-)
  101. %{_docdir}/%{name}-%{version}/
  102. %{_bindir}/smplayer
  103. %{_bindir}/smtube
  104. %{_datadir}/applications/*-smplayer*.desktop
  105. %{_datadir}/applications/smtube.desktop
  106. %{_datadir}/icons/hicolor/*/apps/smplayer.*
  107. %{_datadir}/icons/hicolor/*/apps/smtube.*
  108. %{_datadir}/smplayer/
  109. %{_mandir}/man1/smplayer.1.gz
  110. # %if 0%{?fedora} >= 9
  111. # %dir %{_datadir}/kde4/services/ServiceMenus/
  112. # %{_datadir}/kde4/services/ServiceMenus/smplayer_enqueue.desktop
  113. # %else
  114. # %dir %{_datadir}/apps/konqueror/
  115. # %dir %{_datadir}/apps/konqueror/servicemenus/
  116. # %{_datadir}/apps/konqueror/servicemenus/smplayer_enqueue.desktop
  117. # %endif
  118. %changelog
  119. * Fri Sep 02 2016 Toshiaki Ara <ara_t@384.jp> 16.1.0-2
  120. - rebuild with gcc-5.4.0
  121. * Sun Jan 24 2016 Munehiro Yamamoto <munepi@vinelinux.org> 16.1.0-1
  122. - new upstream release
  123. * Thu Apr 5 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.8.0-1
  124. - new upstream release
  125. * Mon Feb 13 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.7.0-1
  126. - new upstream release
  127. * Thu Feb 9 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.6.9-2
  128. - rebuild
  129. * Sat Jul 10 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.6.9-1
  130. - built based on RPM Fusion development