self-build-mplayer-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. %define pkgname mplayer
  2. %define name self-build-%{pkgname}
  3. %define version 1.0
  4. %define extver rc3
  5. #% define release 4%{?extver:.%{extver}}%{?_dist_release}
  6. %define svndate 20100709
  7. %define release 38.%{svndate}%{?_dist_release}
  8. %define source0path MPlayer/releases/MPlayer-%{version}%{extver}.tar.bz2
  9. %define source1path MPlayer/skins/Blue-1.7.tar.bz2
  10. %define with_vaapi 1
  11. %define with_libvpx 1
  12. Summary: Package to automatically build %{pkgname} rpm package
  13. Summary(ja): %{pkgname} の rpm パッケージを自動作成するパッケージ
  14. Name: %{name}
  15. Version: %{version}
  16. Release: %{release}
  17. Source0: %{pkgname}-vl.spec
  18. Source1: %{pkgname}-snapshot-vine.sh
  19. #Source11: %{pkgname}-export-%{svndate}.tar.bz2
  20. #Source12: Blue-1.7.tar.bz2
  21. Source102: %{pkgname}-config.patch
  22. Source108: %{pkgname}-manlinks.patch
  23. Source114: %{pkgname}-nodvdcss.patch
  24. Source150: mplayer-20100709-fixed-vo_x11_create_vo_window.patch
  25. License: GPLv2+
  26. Group: Restricted Software
  27. Requires(post): self-build-setup >= 0.9.9
  28. Requires(post): subversion
  29. # (build)requies of target package.
  30. Requires(post): gtk2-devel
  31. Requires(post): freetype2-devel
  32. Requires(post): SDL-devel
  33. Requires(post): alsa-lib-devel
  34. Requires(post): esound-devel
  35. Requires(post): cdparanoia-devel
  36. Requires(post): libvorbis-devel
  37. Requires(post): libjpeg-devel
  38. Requires(post): libpng-devel
  39. Requires(post): giflib-devel
  40. Requires(post): zlib-devel
  41. Requires(post): libdvdread
  42. Requires(post): libmpcdec-devel
  43. Requires(post): twolame-devel
  44. Requires(post): yasm
  45. Requires(post): libvdpau-devel
  46. %{?with_vaapi:Requires(post): libva-devel}
  47. %{?with_libvpx:Requires(post): libvpx-devel >= 0.9.1}
  48. Requires(post): libXinerama-devel
  49. Requires(post): libXScrnSaver-devel
  50. Requires(post): self-build-mplayer-codecs
  51. Requires(post): self-build-libdvdcss
  52. Requires(post): self-build-libdvdnav
  53. Requires(post): self-build-faac
  54. Requires(post): self-build-faad2 >= 2.6
  55. Requires(post): self-build-lame
  56. Requires(post): self-build-libdca
  57. Requires(post): self-build-libmad
  58. Requires(post): self-build-x264 >= 0.0.0-9.20090522
  59. Requires(post): self-build-xvidcore >= 0.9.2
  60. Requires(post): self-build-libmpeg2
  61. Requires: TrueType-vlgothic
  62. %if %{?_dist_release} == "vl5" || %{?_dist_release} == "vl6"
  63. Requires: mesa-libGL
  64. Requires(post): xorg-x11-devel
  65. Requires(post): mesa-libGL-devel
  66. %endif
  67. BuildArch: noarch
  68. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  69. Packager: munepi
  70. %description
  71. MPlayer can play most standard video formats out of the box and almost
  72. all others with the help of external codecs.
  73. MPlayer currently works best from the command line, but visual feedback
  74. for many functions is available from its onscreen status display (OSD),
  75. which is also used for displaying subtitles.
  76. MPlayer also has a GUI with skin support and several unofficial alternative
  77. graphical frontends are available.
  78. MEncoder is a command line video encoder for advanced users that can
  79. be built from the MPlayer source tree. Unofficial graphical frontends
  80. exist but arenot included.
  81. MPlayer supports most common formats, like DVDs, MPEG-1/2/4, etc, but
  82. support for some newer codecs are not yet inpmlemented.
  83. You should install mplayer-codecs package if you want to play videos
  84. using those new codecs.
  85. Additional function is automatically included if following
  86. packages are installed in advance.
  87. samba-libsmbclient-devel: SMB file system support
  88. [Note]
  89. This package requires many other packages to compile
  90. targetsoftware. So it consume more disk space than usual.
  91. Also installation takes logner time because of compilation.
  92. (This will take a few minutes to quarter or half of an hour,
  93. depends on building environment)
  94. [About self-build package]
  95. For some kind of software, distributing of binary package
  96. may viorate the patent or law. Therefore we chose self-build
  97. packge, create binary package on your machine, for such kind
  98. of softwares instead of distributing binary package.
  99. Please obey the national law when you use the created binary
  100. packages. And if you want to use the softwares using patented
  101. thechnology, it may be required to get a permission, make an
  102. agreement or purchas a license. Please consider it with your
  103. purpose or way of use and take appropriate action.
  104. %description -l ja
  105. MPlayer は一般的なフォーマットの動画ならそのままですぐ再生できます。
  106. またそれ以外のほとんど全てのフォーマットも外部 Codec を使用すること
  107. で生できます。
  108. 現在の MPlayer はコマンドラインから使うのが一番便利ですが、多くの操作
  109. は字幕と同様に、オンスクリーン・ディスプレイ (OSD) によりその結果が画
  110. 面上で確認できます。
  111. MPlayer には スキンを変更できる GUI も用意されていますし、また複数の
  112. 非公式なフロントエンドも利用できます。
  113. MEncoder は上級者向けのコマンドラインの動画用エンコーダーです。
  114. 非公式な GUI フロントエンドもありますが、このパッケージには含まれて
  115. いません。
  116. MPlayer は何もしなくても DVD や MPEG-1/2/4 のように一般的なフォーマット
  117. を再生できます。ただし一部の最新のフォーマットへの対応はまだ実装されて
  118. いないので、そのような動画を再生したい場合は mplayer-codecs パッケージ
  119. をインストールする必要があります。
  120. このパッケージより前に以下の関連パッケージをインストールして
  121. おくと、%{pkgname} が対応できる機能が自動的に追加されます。
  122. samba-libsmbclient-devel: SMB ファイルシステムのサポート
  123. [注意]
  124. コンパイルに必要な多くの関連パッケージを要求するので通常より
  125. ディスクの領域を多く消費します。
  126. またインストール時にコンパイルを行うため、通常より時間がかか
  127. る場合があります。(環境にもよりますが数分から数十分程度)
  128. [self-build パッケージについて]
  129. ソフトウェアによってはバイナリパッケージの配布が特許や法律に
  130. 違反する可能性があるものがあります。その為、このような問題が
  131. 懸念されるソフトウェアについてはバイナリパッケージを直接配布
  132. せずに、ユーザの環境でバイナリを作成する self-build パッケー
  133. ジという方法を採っています。
  134. 作成されたバイナリパッケージの利用にあたっては、各ソフトウェ
  135. アのライセンス、および利用する国の各種法令に従ってください。
  136. また特許に関連するソフトウェアの場合、利用許諾や契約、ライ
  137. センスの購入などが必要となる場合がありますので、利用する目的
  138. や形態に応じて各自で判断し適切な対応を取ってください。
  139. %prep
  140. [ "%{version}-%{release}" != $(rpm -q --queryformat "%%{version}-%%{release}\n" --specfile %{SOURCE0} | tail -1) ] && exit 1
  141. %install
  142. %{__rm} -rf ${RPM_BUILD_ROOT}
  143. %{__install} -d ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  144. %{__install} -m 644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  145. %{__install} -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  146. #%{__install} -m 644 %{SOURCE11} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  147. #%{__install} -m 644 %{SOURCE12} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  148. %{__install} -m 644 %{SOURCE102} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  149. %{__install} -m 644 %{SOURCE108} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  150. %{__install} -m 644 %{SOURCE114} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  151. %{__install} -m 644 %{SOURCE150} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  152. %clean
  153. %{__rm} -rf ${RPM_BUILD_ROOT}
  154. %posttrans
  155. ## svn checkout
  156. # set locale
  157. case $LANG in
  158. ja*)LOCALE=ja ;;
  159. *) LOCALE=C ;;
  160. esac
  161. GetSrc_C(){
  162. echo -n " "
  163. echo "Download source file with Subversion..."
  164. }
  165. GetSrc_ja(){
  166. echo -n " "
  167. echo "Subversion を用いてソースファイルをダウンロードしています..."
  168. }
  169. GetSrc_$LOCALE
  170. # svn checkout
  171. . /etc/self-build.conf
  172. (cd $TEMP_DIR
  173. su $BUILD_USER -c "/bin/bash %{_datadir}/%{name}/%{pkgname}-snapshot-vine.sh >/dev/null 2>&1 || exit 1"
  174. %__mv %{pkgname}-export-%{svndate}.tar.bz2 %{_datadir}/%{name}/ || exit 1
  175. )
  176. # /usr/lib/rpm/self-build-rpm.sh %{name} %{pkgname}-vl.spec \
  177. # http://www{,1,2,3,4,5,7,8}.mplayerhq.hu/%{source0path} \
  178. # http://www{,1,2,3,4,5,7,8}.mplayerhq.hu/%{source1path} \
  179. # 635000
  180. /usr/lib/rpm/self-build-rpm.sh %{name} %{pkgname}-vl.spec \
  181. http://www{,1,2,3,4,5,7,8}.mplayerhq.hu/%{source1path} \
  182. 635000
  183. %files
  184. %defattr(-,root,root)
  185. %{_datadir}/%{name}
  186. %changelog
  187. * Sat Jul 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-38.20100709
  188. - unpacked source archives
  189. * Sat Jul 10 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-37.20100709
  190. - updated source snapshot 20100709
  191. - renamed %%Source10 to mplayer-snapshot-vine.sh
  192. - added Requires(post): libva-devel, libvpx-devel >= 0.9.1
  193. - dropped vl4 support
  194. - updated %%description
  195. * Sat Jun 26 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-36.20100621
  196. - updated source snapshot 20100621
  197. - added Requires(post): libXinerama-devel
  198. - dropped vl4 support
  199. * Fri Apr 02 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-33.20100401
  200. - updated source snapshot 20100401
  201. * Thu Mar 18 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-31.20100317
  202. - updated source snapshot 20100317
  203. - renamed %%{Source0} to mplayer-vl.spec
  204. * Wed Feb 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-30.20100216
  205. - updated source snapshot 20100216
  206. - dropped obsolete patches
  207. - added Requires(post): libvdpau-devel libXScrnSaver-devel
  208. * Sat Dec 26 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-28.20091031
  209. - update mplayer-config-20091215-vine.patch
  210. - update mplayer-20091215-x86_32-compile.patch
  211. * Sun Nov 01 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-27.20091031
  212. - source snapshot 20091031
  213. - updated mplayer-20091031-x86_32-compile.patch
  214. * Sun Oct 04 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-26.20091003
  215. - source snapshot 20091003
  216. * Sun Sep 13 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-25.20090905
  217. - added some if conditions for "vl6"
  218. * Sun Sep 06 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-24.20090905
  219. - source snapshot 20090905
  220. - added settings for vl6
  221. * Thu Aug 22 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-23.20090821
  222. - source snapshot 20090821
  223. - replaced BR: libungif-devel with BR: giflib-devel
  224. - mentioned VDPAU support in %%description
  225. * Thu Jul 23 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-22.20090722
  226. - source snapshot 20090722
  227. * Fri Jul 03 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-21.20090702
  228. - source snapshot 20090702
  229. - check version between original spec and self-build spec in %%prep
  230. * Fri Jun 12 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-20.20090611
  231. - source snapshot 20090611
  232. * Sun Jun 07 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-19.20090522
  233. - added Requires: TrueType-vlgothic
  234. * Sat May 23 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-18.20090522
  235. - source snapshot 20090522
  236. - build with x264 >= 0.0.0-9.20090522
  237. - updated mplayer-20090502-nodvdcss.patch
  238. - avoided to execute self-build-rpm.sh on RPM transaction
  239. - moved %%post actions to %%posttrans
  240. * Thu May 07 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-17.20090502
  241. - added PreReq: self-build-mplayer-codecs
  242. * Tue May 05 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-16.20090502
  243. - added BuildArch: noarch
  244. - source snapshot 20090502
  245. - updated mplayer-20090503-x86_32-compile.patch
  246. - updated mplayer-20090502-nodvdcss.patch
  247. * Thu Apr 09 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-15.20090327
  248. - included source archives:
  249. - mplayer-export-20090327.tar.bz2
  250. - Blue-1.7.tar.bz2
  251. - applied mplayer-config-vine.patch
  252. * Sat Mar 28 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-14.20090327
  253. - source snapshot 20090327
  254. - updated mplayer-20090327-x86_32-compile.patch
  255. - updated mplayer-20090325-nodvdcss.patch
  256. - dropped gmplayer-about-vine.patch
  257. * Sun Feb 08 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-10.20090206
  258. - source snapshot 20090206
  259. - dropped mplayer-man-zh_CN.patch
  260. - updated mplayer-20090206-nodvdcss.patch
  261. - changed to PreReq: self-build-faad2 from faad2-devel
  262. - added PreReq: self-build-libmad
  263. * Sun Feb 01 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-9.20090131
  264. - source snapshot 20090131
  265. - fixed %%files section
  266. * Thu Jan 29 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-8.20090122
  267. - fixed %%post: added rm -f "$pwd"/%{pkgname}-export-%{svndate}.tar.bz2
  268. * Sun Jan 25 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-7.20090122
  269. - source snapshot
  270. - update mplayer-nodvdcss.patch: mplayer-20090122-nodvdcss.patch
  271. - added PreReq:
  272. - faad2-devel
  273. - libmpcdec-devel
  274. - twolame-devel
  275. - yasm
  276. - self-build-libdvdcss
  277. - self-build-libdvdnav
  278. - self-build-faac
  279. - self-build-lame
  280. - self-build-libdca
  281. - self-build-x264 >= 0.0.0-4.20090110
  282. - self-build-xvidcore >= 0.9.2
  283. - move %%define source0Exists() from %%post section to header
  284. - fixed %%post section: clean up source archive
  285. * Sat Jan 10 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-6.20090109
  286. - source snapshot
  287. - added --disable-faac-lavc --disable-mp3lame-lavc --disable-x264-lavc
  288. --disable-faad-internal in configure options
  289. - dropped gmplayer-add-flv-extension.patch
  290. * Sun Dec 14 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-5.20081001
  291. - source snapshot
  292. - fixed License
  293. - added some patches from RPM Fusion
  294. - updated gmplayer-about-vine.patch for 20081001 snapshot
  295. - added BuildRequires: libdvdread
  296. - added BuildRequires: self-build-libdvdcss self-build-libdvdnav
  297. - added --disable-dvdread-internal --enable-dvdread --enable-dvdnav
  298. in configure options
  299. #- applied mplayer-avoid-Warning_MVs_not_available.patch for VineSeed
  300. - added PreReq: subversion
  301. * Mon Nov 17 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-4.rc2
  302. - fixed License
  303. - added some devel packages to support OpenGL
  304. * Sun Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-3.rc2
  305. - spec in utf8
  306. - fix sybolic link of subfont for vl5
  307. * Wed May 07 2008 Atsushi SHICHI <ats777@gmail.com> 1.0-2.rc2vl4
  308. - add "Source105: CVE-2008-1558.patch".
  309. * Fri May 02 2008 Atsushi SHICHI <ats777@gmail.com> 1.0-1.rc2vl4
  310. - build with new versioning policy.
  311. - add "Source200: gmplayer-about-vine.patch".
  312. - add "Source201: gmplayer-add-flv-extension.patch".
  313. - fix <BTS:VineLinux:603>.
  314. - add ">= 0.7-1vl4" to "PreReq: self-build-setup".
  315. - add mirror URLs to self-build-rpm.sh.
  316. * Sun Feb 17 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-0vl0.3rc2
  317. - add four official security patches (CVE-2008-0485, CVE-2008-0486,
  318. CVE-2008-0629, CVE-2008-0630)
  319. - add mplayer-1.0rc2-20080211-stream_cddb.patch
  320. * Tue Feb 12 2008 Kazutaka HARADA <Kazutaka HARADA> 1.0-0vl0.2rc2
  321. - change source download URL. <BTS:VineLinux:603>
  322. * Sun Jan 27 2008 Kazutaka HARADA <Kazutaka HARADA> 1.0-0vl0.1rc2
  323. - fix CONFDIR for make install in mplayer.spec. <BTS:wishes:33>
  324. * Fri Jan 18 2008 Kazutaka HARADA <Kazutaka HARADA> 1.0-0vl0.0rc2
  325. - initial build for Vine Linux.