]>
Commit | Line | Data |
---|---|---|
37050656 | 1 | # |
94cb018b | 2 | # Conditional build: |
8cc223f8 | 3 | %bcond_with directfb # with DirectFB video output |
8cc223f8 JB |
4 | %bcond_with dxr3 # enable use of DXR3/H+ hardware MPEG decoder |
5 | %bcond_with ggi # with ggi video output | |
8cc223f8 JB |
6 | %bcond_with nas # with NAS audio output |
7 | %bcond_with svga # with svgalib video output | |
01a889a4 | 8 | %bcond_without osd # with osd menu support |
93ab9715 | 9 | %bcond_without altivec # without altivec support |
bbab8eb7 | 10 | %bcond_without x264 # without x264 support |
2af58a38 | 11 | %bcond_with xmms # with XMMS inputplugin support |
8cc223f8 | 12 | %bcond_without aalib # without aalib video output |
e5b91f83 | 13 | %bcond_without jack # without JACKD support |
8cc223f8 | 14 | %bcond_without alsa # without ALSA audio output |
12768ddc | 15 | %bcond_with arts # with arts audio output |
75894477 | 16 | %bcond_without blueray # disable Blue-ray support |
dd153a0d | 17 | %bcond_without caca # without libcaca video output |
3c3fdfcc | 18 | %bcond_without cdparanoia # without cdparanoia support |
32272421 | 19 | %bcond_without dvdnav # without dvdnav support |
3c3fdfcc | 20 | %bcond_without enca # disable using ENCA charset oracle library |
18c746ca | 21 | %bcond_with esd # enable EsounD sound support |
3c3fdfcc JB |
22 | %bcond_without faad # disable FAAD2 (AAC) support |
23 | %bcond_without gif # disable GIF support | |
8d7378f8 | 24 | %bcond_without gui # without GTK+ GUI |
8cc223f8 | 25 | %bcond_without joystick # disable joystick support |
3c3fdfcc | 26 | %bcond_without libdts # disable libdts support |
a4298e0c | 27 | %bcond_without libdv # disable libdv en/decoding support |
8cc223f8 | 28 | %bcond_without lirc # without lirc support |
5244e474 | 29 | %bcond_without live # without LIVE555 libraries |
841cb995 | 30 | %bcond_without lzo # with LZO support (requires lzo 2.x) |
8cc223f8 | 31 | %bcond_without mad # without mad (audio MPEG) support |
7d814b48 | 32 | %bcond_without pulseaudio # without pulseaudio output |
8cc223f8 JB |
33 | %bcond_without quicktime # without binary quicktime dll support |
34 | %bcond_without real # without Real* 8/9 codecs support | |
35 | %bcond_without runtime # disable runtime cpu detection, just detect CPU | |
11421384 ER |
36 | # in compile time (advertised by mplayer authors as working faster); in this case |
37 | # mplayer may not work on machine other then where it was compiled | |
38 | %bcond_without select # disable audio select() support (for example required this option ALSA or Vortex2 driver) | |
a4298e0c | 39 | %bcond_without smb # disable Samba (SMB) input support |
de0c2d91 | 40 | %bcond_without theora # without theora support |
8cc223f8 | 41 | %bcond_without win32 # without win32 codecs support |
53f97285 | 42 | %bcond_without vdpau # disable vdpau |
1087e996 | 43 | %bcond_without vidix # disable vidix |
3b930ad6 | 44 | %bcond_without vorbis # without Ogg-Vorbis audio support |
d1f72115 | 45 | %bcond_with system_vorbis # use system libvorbis instead of internal tremor |
3c3fdfcc | 46 | %bcond_without xvid # disable XviD codec |
2af58a38 | 47 | %bcond_without mencoder # disable mencoder (a/v encoder) compilation |
906bf13b | 48 | %bcond_without sdl # disable SDL |
aab7d90d | 49 | %bcond_without doc # don't build docs (slow) |
59a38ff4 | 50 | %bcond_with shared # experimental libmplayer.so support |
b69a6f83 | 51 | %bcond_without amr # enable Adaptive Multi Rate (AMR) speech codec support |
0256d486 | 52 | %bcond_without gnomess # disable controling gnome screensaver |
759ef2d3 ER |
53 | %bcond_without ssse3 # sse3 optimizations (needs binutils >= 2.16.92) |
54 | %bcond_with system_ffmpeg # use ffmpeg-devel, rather bundled sources (likely needs ffmpeg from same svn revision than mplayer) | |
d1f72115 | 55 | %bcond_with on2 # with patches from On2 Flix Engine for Linux |
7016f339 | 56 | %bcond_with zr # enable ZR360[56]7/ZR36060 video output (needs deprecated V4L1 linux headers) |
5dcdda0f ER |
57 | %if "%{pld_release}" == "ac" |
58 | %bcond_with hidden_visibility # no gcc hidden visibility | |
59 | %else | |
60 | %bcond_without hidden_visibility # no gcc hidden visibility | |
61 | %endif | |
2dfabf36 | 62 | |
9accd5e5 | 63 | %if %{with alsa} |
64 | %undefine with_select | |
65 | %endif | |
66 | ||
d1f72115 | 67 | %if %{without vorbis} |
68 | %undefine with_system_vorbis | |
69 | %endif | |
70 | ||
94cb018b JB |
71 | %ifnarch %{ix86} |
72 | %undefine with_win32 | |
7a82c266 | 73 | %undefine with_quicktime |
1087e996 | 74 | %undefine with_vidix |
94cb018b JB |
75 | %endif |
76 | ||
38c74592 | 77 | %ifnarch %{ix86} %{x8664} ppc ppc64 |
906bf13b JB |
78 | %undefine with_runtime |
79 | %endif | |
1a8df7bd | 80 | |
ca278bdf ER |
81 | %ifnarch %{ix86} %{x8664} |
82 | %undefine with_vdpau | |
83 | %endif | |
84 | ||
3d17ae18 ER |
85 | %ifnarch ppc |
86 | %undefine with_altivec | |
87 | %endif | |
88 | ||
1a8df7bd | 89 | %if %{_lib} == "lib64" |
422903c7 | 90 | %define _suf 64 |
1a8df7bd | 91 | %else |
422903c7 | 92 | %define _suf 32 |
1a8df7bd | 93 | %endif |
94 | ||
5bcd4a3c | 95 | %define subver rc5 |
75894477 | 96 | %define svnver 34894 |
97 | %define rel 1 | |
906bf13b | 98 | Summary: MPlayer - THE Movie Player for UN*X |
eeb91a66 ER |
99 | Summary(de.UTF-8): MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player |
100 | Summary(es.UTF-8): Otro reproductor de películas | |
101 | Summary(ko.UTF-8): 리눅스용 미디어플레이어 | |
102 | Summary(pl.UTF-8): Odtwarzacz filmów dla systemów uniksowych | |
103 | Summary(pt_BR.UTF-8): Reprodutor de filmes | |
2adea73e | 104 | Name: mplayer |
9cb1ef87 | 105 | Version: 1.0 |
71d2d72a | 106 | Release: 5.%{subver}_svn%{svnver}.%{rel} |
1f85fd72 ER |
107 | # DO NOT increase epoch unless it's really neccessary! |
108 | # especially such changes like pre7->pre7try2, increase Release instead! | |
109 | # PS: $ rpmvercmp pre7try2 pre7 | |
110 | # pre7try2 > pre7 | |
59476b48 | 111 | Epoch: 3 |
bc426a7f | 112 | License: GPL |
906bf13b | 113 | Group: Applications/Multimedia |
ffa24b78 | 114 | # svn export svn://svn.mplayerhq.hu/mplayer/trunk mplayer-rXXX |
e48160f4 | 115 | # cd mplayer-rXXX && git clone git://git.videolan.org/ffmpeg.git |
ffa24b78 | 116 | # tar -cvJf mplayer-rXXX.tar.xz mplayer-rXXX |
e48160f4 | 117 | Source0: %{name}-r%{svnver}.tar.xz |
75894477 | 118 | # Source0-md5: 86409e811285d9e8796d4034cd6f9bb8 |
031c3c7c | 119 | Source3: ftp://ftp1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 |
0a38bda8 | 120 | # Source3-md5: 7b47904a925cf58ea546ca15f3df160c |
e601cd91 | 121 | Source5: g%{name}.desktop |
623ea2d1 | 122 | Source6: ftp://ftp2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 |
0a38bda8 | 123 | # Source6-md5: 1ecd31d17b51f16332b1fcc7da36b312 |
11b89ef7 | 124 | Source7: %{name}.png |
24481cd2 | 125 | Source8: %{name}.desktop |
dfd680ce | 126 | # http://www.on2.com/gpl/mplayer/ |
53f97285 | 127 | Source9: http://support.on2.com/gpl/mplayer/2009-10-08-mencoder-on2flixenglinux.tar.bz2 |
128 | # Source9-md5: 07774a2663a8fda07c308df0c6569b56 | |
79907b07 | 129 | |
130 | # build (configure / Makefile) related: | |
131 | Patch10: %{name}-ldflags.patch | |
132 | Patch11: %{name}-altivec.patch | |
133 | Patch12: %{name}-check-byteswap.patch | |
c2bf8f19 | 134 | Patch13: %{name}-visibility-hidden-fix.patch |
135 | Patch14: %{name}-ffmpeg.patch | |
136 | Patch15: %{name}-shared_live.patch | |
137 | Patch16: %{name}-shared.patch | |
79907b07 | 138 | |
139 | # codecs, outputs, demuxers: | |
140 | Patch20: %{name}-auto-expand.patch | |
141 | Patch21: %{name}-release_directfb.patch | |
142 | ||
143 | # goodies: | |
144 | Patch30: %{name}-cp1250-fontdesc.patch | |
2833f81f | 145 | Patch31: %{name}-350.patch |
d1f72115 | 146 | # update, hard to fix right now because of gnome bug 579430: |
147 | # https://bugzilla.gnome.org/show_bug.cgi?id=579430 | |
2833f81f | 148 | #Patch32: %{name}-gnome-screensaver.patch |
79907b07 | 149 | |
150 | Patch100: %{name}-on2flix.patch | |
b252aa8a | 151 | Patch101: %{name}-link.patch |
e48160f4 | 152 | Patch102: %{name}-build.patch |
79907b07 | 153 | |
c5b97685 | 154 | URL: http://www.mplayerhq.hu/ |
33c4efab | 155 | %{?with_directfb:BuildRequires: DirectFB-devel} |
aeb67db6 | 156 | BuildRequires: OpenAL-devel |
b458005d | 157 | BuildRequires: OpenGL-devel |
11421384 | 158 | %{?with_sdl:BuildRequires: SDL-devel >= 1.1.7} |
dd6c659c JB |
159 | %{?with_aalib:BuildRequires: aalib-devel} |
160 | %{?with_alsa:BuildRequires: alsa-lib-devel} | |
161 | %{?with_arts:BuildRequires: artsc-devel} | |
841cb995 | 162 | %{?with_ssse3:BuildRequires: binutils >= 3:2.16.92} |
0431b837 | 163 | BuildRequires: bzip2-devel |
3c3fdfcc | 164 | %{?with_cdparanoia:BuildRequires: cdparanoia-III-devel} |
c521a17c | 165 | BuildRequires: dirac-devel |
5dcdda0f ER |
166 | %{?with_doc:BuildRequires: docbook-dtd412-xml} |
167 | %{?with_doc:BuildRequires: docbook-style-xsl} | |
dd6c659c | 168 | %{?with_dxr3:BuildRequires: em8300-devel} |
3c3fdfcc JB |
169 | %{?with_enca:BuildRequires: enca-devel} |
170 | %{?with_esd:BuildRequires: esound-devel} | |
30e3739f | 171 | BuildRequires: faac-devel |
3c3fdfcc | 172 | %{?with_faad:BuildRequires: faad2-devel >= 2.0} |
759ef2d3 | 173 | %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-4.20081024.3} |
6bd88460 | 174 | BuildRequires: freetype-devel >= 1:2.2.1 |
30e3739f | 175 | BuildRequires: fribidi-devel |
3d17ae18 | 176 | %{?with_altivec:BuildRequires: gcc >= 5:4.1} |
5dcdda0f | 177 | %{?with_gnomess:BuildRequires: dbus-glib-devel} |
3c3fdfcc | 178 | %{?with_gif:BuildRequires: giflib-devel} |
d1f72115 | 179 | %{?with_gui:BuildRequires: gtk+2-devel} |
d336e259 | 180 | %{?with_jack:BuildRequires: jack-audio-connection-kit-devel} |
a8a0c1d1 | 181 | BuildRequires: lame-libs-devel |
6bd88460 | 182 | BuildRequires: libass-devel >= 0.9.10 |
75894477 | 183 | %{?with_blueray:BuildRequires: libbluray-devel} |
dd6c659c | 184 | %{?with_caca:BuildRequires: libcaca-devel} |
49aed190 | 185 | %{?with_libdts:BuildRequires: libdts-devel} |
c521a17c | 186 | %{?with_libdv:BuildRequires: libdv-devel > 0.9.5} |
759ef2d3 | 187 | %{?with_dvdnav:BuildRequires: libdvdnav-devel >= 4.1.3} |
dd6c659c | 188 | %{?with_ggi:BuildRequires: libggi-devel} |
af480c75 | 189 | BuildRequires: libjpeg-devel |
dd6c659c | 190 | %{?with_mad:BuildRequires: libmad-devel} |
c521a17c | 191 | BuildRequires: libmng-devel |
af480c75 | 192 | BuildRequires: libpng-devel |
a4298e0c | 193 | %{?with_smb:BuildRequires: libsmbclient-devel} |
de0c2d91 | 194 | %{?with_theora:BuildRequires: libtheora-devel} |
5dcdda0f | 195 | %{?with_vdpau:BuildRequires: libvdpau-devel} |
d1f72115 | 196 | %{?with_system_vorbis:BuildRequires: libvorbis-devel} |
0431b837 | 197 | BuildRequires: libvpx-devel |
bbab8eb7 | 198 | %{?with_x264:BuildRequires: libx264-devel >= 0.1.3} |
ceb01d0e | 199 | BuildRequires: libxslt-progs |
dd6c659c | 200 | %{?with_lirc:BuildRequires: lirc-devel} |
5244e474 | 201 | %{?with_live:BuildRequires: live-devel} |
841cb995 | 202 | %{?with_lzo:BuildRequires: lzo-devel >= 2.0} |
dd6c659c | 203 | %{?with_nas:BuildRequires: nas-devel} |
b458005d | 204 | BuildRequires: ncurses-devel |
b69a6f83 | 205 | %{?with_amr:BuildRequires: opencore-amr-devel} |
e9d22b19 | 206 | BuildRequires: pkgconfig |
86bc294f | 207 | %{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9} |
5dcdda0f | 208 | BuildRequires: rpm >= 4.4.9-56 |
9accd5e5 | 209 | BuildRequires: rpmbuild(macros) >= 1.527 |
c521a17c | 210 | BuildRequires: schroedinger-devel |
aeb67db6 | 211 | BuildRequires: speex-devel >= 1.1 |
dd6c659c | 212 | %{?with_svga:BuildRequires: svgalib-devel} |
3af20979 | 213 | BuildRequires: tar >= 1:1.22 |
c521a17c | 214 | BuildRequires: twolame-devel |
3af20979 | 215 | %{?with_vidix:BuildRequires: vidix-devel} |
c521a17c | 216 | %{?with_xmms:BuildRequires: xmms-devel} |
5dcdda0f ER |
217 | %{?with_xvid:BuildRequires: xvid-devel >= 1:0.9.0} |
218 | %ifarch %{ix86} %{x8664} | |
219 | BuildRequires: yasm | |
220 | %endif | |
221 | BuildRequires: zlib-devel | |
222 | %if "%{pld_release}" == "ac" | |
223 | BuildRequires: XFree86-devel >= 4.0.2 | |
224 | %else | |
627a7a97 | 225 | BuildRequires: xorg-lib-libX11-devel |
c521a17c | 226 | BuildRequires: xorg-lib-libXScrnSaver-devel |
627a7a97 ER |
227 | BuildRequires: xorg-lib-libXext-devel |
228 | BuildRequires: xorg-lib-libXinerama-devel | |
229 | BuildRequires: xorg-lib-libXv-devel | |
230 | BuildRequires: xorg-lib-libXvMC-devel | |
231 | BuildRequires: xorg-lib-libXxf86dga-devel | |
232 | BuildRequires: xorg-lib-libXxf86vm-devel | |
c521a17c | 233 | %endif |
4d75c49f | 234 | Requires: %{name}-common = %{epoch}:%{version}-%{release} |
b458005d | 235 | Requires: OpenGL |
0f2a502d | 236 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
2adea73e | 237 | |
a8e3a9a7 | 238 | %define _noautoreqdep libGL.so.1 libGLU.so.1 |
bb27cfbd | 239 | %define specflags_ia32 -fomit-frame-pointer |
198487b4 | 240 | %if %{with altivec} |
adfd0023 | 241 | %define specflags_ppc -maltivec |
20a66bdb | 242 | %endif |
2adea73e | 243 | |
e245ad6d ER |
244 | %if "%{pld_release}" == "ac" |
245 | %ifarch ppc | |
246 | %define __cc gcc4 | |
247 | %endif | |
248 | %endif | |
249 | ||
2adea73e | 250 | %description |
c902f7c6 | 251 | Movie player. Supported input formats: VCD (VideoCD), MPEG1/2, RIFF |
252 | AVI, ASF 1.0, Quicktime. Supported audio codecs: PCM (uncompressed), | |
6db4b1ea | 253 | MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Supported video codecs: |
254 | MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. Supported output | |
c902f7c6 | 255 | devices: Matrox G200/G400 hardware, Matrox G200/G400 overlay, X11 |
256 | optionally with SHM extension, X11 using overlays with the Xvideo | |
257 | extension, OpenGL renderer, Matrox G400 YUV support on framebuffer | |
258 | Voodoo2/3 hardware, SDL v1.1.7 driver etc. | |
2adea73e | 259 | |
8b146837 | 260 | If you want to use win32 codecs install w32codec package. |
4228a246 | 261 | |
e011d408 | 262 | %description -l de.UTF-8 |
deba608c | 263 | MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player. |
264 | Kennzeichnend ist die herausragende Format- und | |
e011d408 | 265 | Plattform-Kompatibilität. |
deba608c | 266 | |
e011d408 JR |
267 | Es unterstützt eine Vielzahl von Video und Audio-Codecs, darunter auch |
268 | plattformexklusive, wodurch etwa Windows Media auch außerhalb von | |
269 | Windows wiedergegeben werden kann. Darüber hinaus unterstützt er DVB. | |
270 | Eine besondere Fehlertoleranz ermöglicht es dem mehrfach | |
deba608c | 271 | ausgezeichneten Player, auch defekte Dateien abzuspielen. Eine weitere |
e011d408 JR |
272 | Stärke ist dabei der Wegfall jeglicher Installation, so dass bereits |
273 | installierte Codecs nicht mit MPlayer kollidieren können. | |
deba608c | 274 | |
e011d408 | 275 | %description -l es.UTF-8 |
c902f7c6 | 276 | Reproductor video. Formatos de entrada soportados: VCD (VideoCD), |
277 | MPEG1/2, RIFF AVI, ASF 1.0, Quicktime. Codecs de audio soportados: PCM | |
278 | (uncompressed), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Codecs | |
279 | de video soportados: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. | |
280 | Dispositivos de salida soportados: Matrox G200/G400 hardware, Matrox | |
e011d408 JR |
281 | G200/G400 overlay, X11 optionalmente con la extensión SHM, X11 usando |
282 | overlays con la extensión Xvideo, plasmador OpenGL, soporte de Matrox | |
c902f7c6 | 283 | G400 YUV en hardware de framebuffer de Voodoo2/3, controlador SDL |
284 | v1.1.7 etc. | |
33c4efab | 285 | |
8b146837 | 286 | Si quiere usar codecs Win32, instale el paquete w32codec. |
33c4efab | 287 | |
e011d408 JR |
288 | %description -l ko.UTF-8 |
289 | MPlayer는 리눅스용 무비플레이어입니다. 대부분의 mpeg, avi 그리고 asf | |
290 | 파일을 재생합니다. VCD, DVD, 심 지어 DivX까지 볼 수 있습니다. | |
291 | MPlayer의 또 다른 큰 특징은 출력 드라이버가 다양하다는 것입니다. X11, | |
292 | Xv, DGA, OpenGL, SVGAlib, fbdev와 작동하며, SDL이나 | |
293 | (Matrox/3dfx/Sis등의) 특정 카드에 종속된 로우레 벨 드라이버들도 사용할 | |
294 | 수 있습니다. 대부분의 출력 드라이버들은 소프트웨어 혹은 하드웨어적인 | |
295 | 크기조절 (scaling)을 지원하므로, 전체화면으로 영상을 감상할 수 | |
296 | 있습니다. 뿐만아니라, 한국어, 영어, 헝가리어, 체코어, 러시아어등의 | |
297 | 부드러운(antialiased) 자막폰트도 사용할 수 있습니다. | |
af480c75 | 298 | |
e011d408 JR |
299 | %description -l pl.UTF-8 |
300 | Odtwarzacz wideo. Wspierane formaty wejściowe: VCD (VideoCD), MPEG1/2, | |
c902f7c6 | 301 | RIFF AVI, ASF 1.0, Quicktime. Wspierane kodeki audio: PCM |
302 | (nieskompresowane), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. | |
303 | Wspierane kodeki wideo: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. | |
e011d408 | 304 | Wspierane urządzenia wyjściowe: Matrox G200/G400, X11 opcjonalnie z |
c902f7c6 | 305 | rozszerzeniem SHM, X11 z rozszerzeniem Xvideo, renderer OpenGL, Matrox |
e011d408 | 306 | G400 używając framebuffera, Voodoo2/3, SDL v1.1.7 itp. |
2adea73e | 307 | |
e011d408 | 308 | Jeśli chcesz używać kodeków win32, zainstaluj pakiet w32codec. |
4228a246 | 309 | |
e011d408 JR |
310 | %description -l pt_BR.UTF-8 |
311 | MPlayer é um reprodutor de filmes que suporta vários codecs de vídeo e | |
312 | áudio. Diferentes mecanismos de reprodução podem também ser | |
2abc285c | 313 | escolhidos, incluindo SDL, SVGALib, frame buffer, aalib, X11 e outros. |
314 | ||
11421384 ER |
315 | %package -n gmplayer |
316 | Summary: MPlayer with GTK+ GUI interface | |
eeb91a66 | 317 | Summary(pl.UTF-8): MPlayer z graficznym interfejsem GTK+ |
11421384 | 318 | Group: X11/Applications/Multimedia |
11421384 | 319 | Requires: %{name}-common = %{epoch}:%{version}-%{release} |
deba608c | 320 | Requires: %{name}-skin |
11421384 ER |
321 | |
322 | %description -n gmplayer | |
323 | MPlayer with GUI GTK+ interface. | |
324 | ||
e011d408 | 325 | %description -n gmplayer -l pl.UTF-8 |
906bf13b JB |
326 | MPlayer z graficznym interfejsem GTK+. |
327 | ||
11421384 | 328 | %package common |
906bf13b | 329 | Summary: Configuration files and documentation for MPlayer |
eeb91a66 | 330 | Summary(pl.UTF-8): Pliki konfiguracyjne i dokumentacja dla MPlayera |
11421384 | 331 | Group: Applications/Multimedia |
c521a17c | 332 | Suggests: unrar |
1087e996 | 333 | Obsoletes: mplayer-vidix |
11421384 ER |
334 | |
335 | %description common | |
906bf13b JB |
336 | Configuration files, man page and HTML documentation for MPlayer. |
337 | ||
e011d408 | 338 | %description common -l pl.UTF-8 |
906bf13b | 339 | Pliki konfiguracyjne, strona manuala i dokumentacja HTML dla MPlayera. |
11421384 | 340 | |
dc3c7d77 ER |
341 | %package doc |
342 | Summary: HTML documentation for %{name} | |
343 | Group: Documentation | |
344 | ||
345 | %description doc | |
346 | HTML Documentation for %{name}. | |
347 | ||
11421384 | 348 | %package -n mencoder |
906bf13b | 349 | Summary: MEncoder - a movie encoder for Linux |
eeb91a66 | 350 | Summary(pl.UTF-8): MEncoder - koder filmów dla Linuksa |
11421384 ER |
351 | Group: Applications/Multimedia |
352 | Requires: %{name}-common = %{epoch}:%{version}-%{release} | |
353 | ||
354 | %description -n mencoder | |
906bf13b JB |
355 | MEncoder is a movie encoder for Linux and is a part of the MPlayer |
356 | package. | |
357 | ||
e011d408 JR |
358 | %description -n mencoder -l pl.UTF-8 |
359 | MEncoder to koder filmów dla Linuksa będący częścią pakietu MPlayer. | |
11421384 | 360 | |
2adea73e | 361 | %prep |
5dcdda0f | 362 | %setup -q -n %{name}-r%{svnver} -a3 -a6 -a9 |
833dbe20 | 363 | cp -f etc/codecs.conf etc/codecs.win32.conf |
79907b07 | 364 | |
365 | # build (configure / Makefile) related: | |
366 | %patch10 -p1 | |
367 | %patch11 -p1 | |
368 | %patch12 -p1 | |
c2bf8f19 | 369 | %patch13 -p1 |
370 | %{?with_system_ffmpeg:%patch14 -p1} | |
371 | %{?with_live:%patch15 -p1} | |
372 | %{?with_shared:%patch16 -p1} | |
79907b07 | 373 | |
374 | # codecs, outputs, demuxers: | |
375 | %patch20 -p1 | |
376 | %patch21 -p1 | |
377 | ||
378 | # goodies: | |
379 | %patch30 -p0 | |
2833f81f | 380 | %patch31 -p1 |
381 | #%{with_gnomess:%patch32 -p1} | |
59ba0205 | 382 | |
dfd680ce | 383 | # on2flix |
759ef2d3 | 384 | mv mencoder-on2flixenglinux{-*-*-*,} |
d1f72115 | 385 | %if %{with on2} |
79907b07 | 386 | #%%patch100 -p1 |
d1f72115 | 387 | cp -a mencoder-on2flixenglinux/patch/new_files/libmpdemux/* libmpdemux |
388 | # remove broken patches: | |
389 | # - first set does not apply | |
390 | # - second set beakes build | |
391 | for PATCH in asf-correct_movielength avi_check_idxflags \ | |
392 | demux_lavf-add_dv_mts_preferred demux_lavf-probe_small_files \ | |
393 | mencoder_07_demux_update_pts mencoder_10_correct_pts \ | |
394 | mpegvideo-revert_r18381 \ | |
395 | \ | |
396 | reduce_spurious_logging | |
397 | do | |
398 | rm mencoder-on2flixenglinux/patch/$PATCH.diff | |
399 | done | |
400 | for a in mencoder-on2flixenglinux/patch/*.diff; do | |
401 | patch -p0 < $a | |
402 | done | |
403 | %endif | |
dfd680ce | 404 | |
b252aa8a | 405 | %patch101 -p1 |
e48160f4 | 406 | %patch102 -p1 |
b252aa8a | 407 | |
79907b07 | 408 | # Set version |
53f97285 | 409 | %if "x%{svnver}" != "x%{nil}" |
d1f72115 | 410 | echo "SVN-r%{svnver}%{?with_on2:-on2}" > VERSION |
53f97285 | 411 | %endif |
759ef2d3 | 412 | |
53f97285 | 413 | cat etc/example.conf > etc/mplayer.conf |
c521a17c | 414 | cat <<'CONFIGADD' >> etc/mplayer.conf |
415 | ||
d1f72115 | 416 | ###################### |
8b2ed1fb | 417 | # PLD Linux Defaults # |
d1f72115 | 418 | ###################### |
2833f81f | 419 | [default] |
420 | ||
421 | # alternate solution for CP1250-encoded subtitles | |
422 | fontconfig = yes | |
423 | subcp = cp1250 | |
424 | ||
425 | # ...or if you prefer native bitmap fonts shipped with mplayer | |
426 | #fontconfig = no | |
427 | #subcp = iso-8859-1 | |
428 | ||
429 | # Standard location | |
430 | unrarexec = "%{_bindir}/unrar" | |
431 | ||
c521a17c | 432 | CONFIGADD |
d1732085 | 433 | |
1f8d8779 ER |
434 | %if %{with system_ffmpeg} |
435 | # using external ffmpeg, but mplayer adds these to includepath | |
53f97285 | 436 | rm -r libavcodec libavdevice libavformat libavutil libpostproc libswscale |
1f8d8779 ER |
437 | %endif |
438 | ||
c521a17c | 439 | # *** HOT FIXES *** |
440 | ||
441 | # typo, fixed in recent svn | |
53f97285 | 442 | sed 's/STREAM_NONCACHEABLE/STREAM_NON_CACHEABLE/' -i stream/stream_live555.c |
53f97285 | 443 | |
c521a17c | 444 | # mjpeg encoder is required for Zoran hardware |
445 | sed '/_libavencoders="MPEG/s/"$/ MJPEG_ENCODER"/' -i configure | |
446 | ||
2adea73e | 447 | %build |
5dcdda0f | 448 | CFLAGS="%{rpmcflags} %{?with_hidden_visibility:-fvisibility=hidden} %{?with_shared:-fvisibility=default -fPIC}" |
53f97285 | 449 | CFLAGS="$CFLAGS -I%{_includedir}/xvid%{?with_directfb::%{_includedir}/directfb}" |
450 | %{?with_live:CFLAGS="$CFLAGS -I/usr/include/liveMedia"} | |
451 | ||
11421384 | 452 | build() { |
c521a17c | 453 | set -x |
53f97285 | 454 | |
11421384 ER |
455 | ./configure \ |
456 | %{?debug:--enable-debug=3} \ | |
dd6c659c JB |
457 | --prefix=%{_prefix} \ |
458 | --confdir=%{_sysconfdir}/mplayer \ | |
53f97285 | 459 | --cc="%{__cc}" \ |
460 | --extra-cflags="$CFLAGS" \ | |
79907b07 | 461 | --real-ldflags="%{rpmldflags}" \ |
462 | --extra-ldflags="%{?_x_libraries:-L%{_x_libraries}}" \ | |
1f8d8779 | 463 | %if %{with system_ffmpeg} |
841cb995 ER |
464 | --disable-libavutil_a \ |
465 | --disable-libavcodec_a \ | |
466 | --disable-libavformat_a \ | |
467 | --disable-libpostproc_a \ | |
468 | --enable-libavutil_so \ | |
469 | --enable-libavcodec_so \ | |
470 | --enable-libavformat_so \ | |
471 | --enable-libpostproc_so \ | |
1f8d8779 | 472 | %endif |
57f87bc2 | 473 | %ifnarch %{ix86} %{x8664} |
dd6c659c | 474 | --disable-mmx \ |
a14f4270 | 475 | --disable-mmxext \ |
dd6c659c | 476 | --disable-3dnow \ |
a14f4270 | 477 | --disable-3dnowext \ |
dd6c659c JB |
478 | --disable-sse \ |
479 | --disable-sse2 \ | |
480 | --disable-fastmemcpy \ | |
dfeec30a | 481 | %endif |
9accd5e5 | 482 | %{__disable ssse3} \ |
1837afdf | 483 | %ifarch ppc |
9accd5e5 | 484 | %{__disable altivec} \ |
1837afdf | 485 | %endif |
9accd5e5 | 486 | %{__enable_disable amr libopencore_amrnb} %{__enable_disable amr libopencore_amrwb} \ |
487 | %{__enable_disable directfb} \ | |
488 | %{__disable dxr3} \ | |
489 | %{__disable ggi} \ | |
490 | %{__disable live} \ | |
491 | %{__disable lzo liblzo} \ | |
492 | %{__disable nas} \ | |
493 | %{__disable svga} \ | |
494 | %{__disable aalib aa} \ | |
495 | %{__disable jack} \ | |
496 | %{__enable_disable alsa} \ | |
497 | %{__disable arts} \ | |
498 | %{__disable caca} \ | |
499 | %{__disable cdparanoia} \ | |
500 | %{__disable enca} \ | |
501 | %{__disable esd} \ | |
9accd5e5 | 502 | %{__disable faad} \ |
503 | %{__disable gif} \ | |
504 | %{__enable joystick} \ | |
75894477 | 505 | %{__disable blueray} \ |
9accd5e5 | 506 | %{__disable libdv} \ |
507 | %{__disable libdts libdca} \ | |
508 | %{__enable_disable lirc} \ | |
509 | %{__disable mad} \ | |
510 | %{__disable pulseaudio pulse} \ | |
511 | %{__disable quicktime qtx} \ | |
512 | %{__disable real} \ | |
513 | %{__enable_disable runtime runtime-cpudetection} \ | |
514 | %{__disable select} \ | |
515 | %{__disable smb} \ | |
516 | %{__disable win32 win32dll} \ | |
d1f72115 | 517 | %{__disable vorbis tremor-internal} --disable-tremor %{__disable vorbis libvorbis} \ |
518 | %{__disable_if system_vorbis tremor-internal} \ | |
9accd5e5 | 519 | %{__enable osd menu} \ |
520 | %{__disable theora} \ | |
521 | %{__disable x264} \ | |
d1732085 | 522 | %{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}} \ |
9accd5e5 | 523 | %{__disable xvid} \ |
524 | %{__disable vidix} \ | |
525 | %{__disable vdpau} \ | |
526 | %{__disable mencoder} \ | |
841cb995 ER |
527 | --enable-dga1 \ |
528 | --enable-dga2 \ | |
9accd5e5 | 529 | %{__enable_disable dvdnav} \ |
dd6c659c JB |
530 | --enable-fbdev \ |
531 | --enable-gl \ | |
532 | --enable-mga \ | |
e7261209 KK |
533 | --enable-radio \ |
534 | --enable-radio-capture \ | |
9accd5e5 | 535 | %{__enable_disable sdl} \ |
dd6c659c JB |
536 | --enable-tdfxfb \ |
537 | --enable-vm \ | |
538 | --enable-x11 \ | |
539 | --enable-xmga \ | |
540 | --enable-xv \ | |
541 | --enable-xvmc \ | |
0c2d081d | 542 | --with-xvmclib=XvMCW \ |
7016f339 | 543 | %{__enable_disable zr} \ |
c521a17c | 544 | --enable-unrarexec \ |
3c3fdfcc | 545 | --enable-dynamic-plugins \ |
dd6c659c | 546 | --language=all \ |
841cb995 | 547 | --codecsdir=%{_libdir}/codecs \ |
11421384 | 548 | "$@" |
eb52750a | 549 | |
11421384 ER |
550 | %{__make} |
551 | } | |
2adea73e | 552 | |
11421384 ER |
553 | %if %{with gui} |
554 | # build GUI version | |
841cb995 | 555 | build --enable-gui --disable-mencoder |
11421384 | 556 | mv -f mplayer gmplayer |
aeb67db6 | 557 | %{__make} distclean |
11421384 ER |
558 | %endif |
559 | ||
560 | # now build regular version | |
561 | build --disable-gui | |
562 | ||
aab7d90d | 563 | %if %{with doc} |
ef1e3931 | 564 | %{__make} -j1 doc |
11421384 | 565 | %endif |
ceb01d0e | 566 | |
2adea73e AM |
567 | %install |
568 | rm -rf $RPM_BUILD_ROOT | |
e0e4b963 | 569 | install -d \ |
d23c171d | 570 | $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_sysconfdir}/mplayer} \ |
59ba0205 | 571 | $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,fr,hu,it,pl,sv,zh_CN,}/man1 \ |
9accd5e5 | 572 | $RPM_BUILD_ROOT%{_datadir}/%{name}/skins \ |
59ba0205 | 573 | $RPM_BUILD_ROOT%{_desktopdir} |
2adea73e | 574 | |
e0e4b963 | 575 | # default config files |
c455a752 | 576 | install etc/{codecs,mplayer%{?with_osd:,menu},input}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer |
e0e4b963 | 577 | |
578 | # executables | |
2af58a38 | 579 | %if %{with mencoder} |
1a8df7bd | 580 | install mencoder $RPM_BUILD_ROOT%{_bindir}/mencoder%{_suf} |
581 | ln -sf mencoder%{_suf} $RPM_BUILD_ROOT%{_bindir}/mencoder | |
2af58a38 | 582 | %endif |
1a8df7bd | 583 | install mplayer $RPM_BUILD_ROOT%{_bindir}/mplayer%{_suf} |
584 | ln -sf mplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/mplayer | |
11421384 | 585 | %if %{with gui} |
1a8df7bd | 586 | install gmplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer%{_suf} |
587 | ln -sf gmplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/gmplayer | |
11421384 | 588 | %endif |
e0e4b963 | 589 | |
c2bf8f19 | 590 | %if %{with shared} |
591 | install -d $RPM_BUILD_ROOT%{_libdir} | |
592 | install libmplayer.so $RPM_BUILD_ROOT%{_libdir} | |
593 | %endif | |
594 | ||
e0e4b963 | 595 | # fonts |
9d62f689 | 596 | cp -r font-* $RPM_BUILD_ROOT%{_datadir}/mplayer |
6e933f9c | 597 | ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font |
e0e4b963 | 598 | |
11421384 | 599 | %if %{with gui} |
f0d8c47e | 600 | install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir} |
68dd28e8 | 601 | %endif |
9accd5e5 | 602 | touch $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/default |
24481cd2 | 603 | install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir} |
11b89ef7 | 604 | install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir} |
e0e4b963 | 605 | |
606 | # man pages | |
59ba0205 | 607 | install DOCS/man/cs/*.1 $RPM_BUILD_ROOT%{_mandir}/cs/man1 |
aee40e50 | 608 | install DOCS/man/de/*.1 $RPM_BUILD_ROOT%{_mandir}/de/man1 |
609 | install DOCS/man/en/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
610 | install DOCS/man/es/*.1 $RPM_BUILD_ROOT%{_mandir}/es/man1 | |
611 | install DOCS/man/fr/*.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1 | |
612 | install DOCS/man/hu/*.1 $RPM_BUILD_ROOT%{_mandir}/hu/man1 | |
8cda16b8 | 613 | install DOCS/man/it/*.1 $RPM_BUILD_ROOT%{_mandir}/it/man1 |
aee40e50 | 614 | install DOCS/man/pl/*.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1 |
841cb995 | 615 | #install DOCS/man/sv/*.1 $RPM_BUILD_ROOT%{_mandir}/sv/man1 |
53f97285 | 616 | #install DOCS/man/zh/*.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1 |
6db4b1ea | 617 | |
2adea73e AM |
618 | %clean |
619 | rm -rf $RPM_BUILD_ROOT | |
620 | ||
a69eaaef | 621 | %post -n gmplayer |
cd748ae6 | 622 | umask 022 |
cd748ae6 | 623 | [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||: |
624 | ||
a69eaaef | 625 | %postun -n gmplayer |
cd748ae6 | 626 | umask 022 |
75b3147a | 627 | [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||: |
2ea7d522 | 628 | |
2adea73e AM |
629 | %files |
630 | %defattr(644,root,root,755) | |
1a8df7bd | 631 | %attr(755,root,root) %{_bindir}/mplayer* |
11421384 ER |
632 | |
633 | %if %{with gui} | |
634 | %files -n gmplayer | |
635 | %defattr(644,root,root,755) | |
1a8df7bd | 636 | %attr(755,root,root) %{_bindir}/gmplayer* |
11421384 | 637 | %{_desktopdir}/gmplayer.desktop |
11421384 ER |
638 | %endif |
639 | ||
0fb5a7ee | 640 | %if %{with mencoder} |
11421384 ER |
641 | %files -n mencoder |
642 | %defattr(644,root,root,755) | |
aeb67db6 | 643 | %doc DOCS/tech/encoding-guide.txt DOCS/tech/encoding-tips.txt |
644 | %doc DOCS/tech/swscaler_filters.txt DOCS/tech/swscaler_methods.txt | |
645 | %doc DOCS/tech/colorspaces.txt | |
1a8df7bd | 646 | %attr(755,root,root) %{_bindir}/mencoder* |
0fb5a7ee | 647 | %endif |
11421384 | 648 | |
841cb995 | 649 | %if %{with doc} |
dc3c7d77 ER |
650 | %files doc |
651 | %doc DOCS/tech | |
841cb995 ER |
652 | # HTML and XML-generated docs |
653 | %doc DOCS/HTML/en | |
0ffd4cd0 | 654 | %lang(cs) %doc DOCS/HTML/cs |
aeb67db6 | 655 | %lang(de) %doc DOCS/HTML/de |
aee40e50 | 656 | %lang(es) %doc DOCS/HTML/es |
657 | %lang(fr) %doc DOCS/HTML/fr | |
8cda16b8 | 658 | %lang(hu) %doc DOCS/HTML/hu |
aee40e50 | 659 | %lang(pl) %doc DOCS/HTML/pl |
660 | %lang(ru) %doc DOCS/HTML/ru | |
841cb995 ER |
661 | #%lang(zh_CN) %doc DOCS/zh |
662 | %endif | |
dc3c7d77 ER |
663 | |
664 | %files common | |
665 | %defattr(644,root,root,755) | |
841cb995 | 666 | %doc AUTHORS README |
dc3c7d77 ER |
667 | %{?with_shared:%attr(755,root,root) %{_libdir}/libmplayer.so} |
668 | %if %{with win32} | |
669 | %doc etc/codecs.win32.conf | |
670 | %endif | |
11421384 | 671 | |
906bf13b JB |
672 | %dir %{_sysconfdir}/%{name} |
673 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf | |
2adea73e | 674 | %{_mandir}/man1/* |
59ba0205 | 675 | %lang(cs) %{_mandir}/cs/man1/* |
20e1052d | 676 | %lang(de) %{_mandir}/de/man1/* |
aee40e50 | 677 | %lang(es) %{_mandir}/es/man1/* |
2a9a2b75 | 678 | %lang(fr) %{_mandir}/fr/man1/* |
daef2f4a | 679 | %lang(hu) %{_mandir}/hu/man1/* |
8cda16b8 | 680 | %lang(it) %{_mandir}/it/man1/* |
2a6ed516 | 681 | %lang(pl) %{_mandir}/pl/man1/* |
841cb995 | 682 | #%lang(sv) %{_mandir}/sv/man1/* |
53f97285 | 683 | #%lang(zh_CN) %{_mandir}/zh_CN/man1/* |
24481cd2 | 684 | %{_desktopdir}/mplayer.desktop |
1087e996 | 685 | %{_pixmapsdir}/mplayer.png |
11421384 ER |
686 | %dir %{_datadir}/%{name} |
687 | %{_datadir}/%{name}/font* | |
59ce39fb ER |
688 | %dir %{_datadir}/%{name}/skins |
689 | %ghost %{_datadir}/%{name}/skins/default |