]>
Commit | Line | Data |
---|---|---|
5e37db9a | 1 | # TODO: |
8a72e936 | 2 | # - nut support (http://www.nut.hu/ - currently down, but see svn.mplayerhq.hu/nut/) |
b8145877 | 3 | # - update for lzo 2 |
841cb995 | 4 | # - try to use external lrmi and few other libs: |
4d75c49f | 5 | # http://www.cyberlink.com/english/products/powercinema/pcm-linux/license/mplayer-10_copyright.htm |
bef18474 ER |
6 | # - segfaults on amd64: |
7 | # mencoder -oac pcm -af dummy -ovc raw -vf format=yv12 -of ogg -mc 0 -quiet -o /tmp/out1 l.avi | |
8 | # avi: RIFF (little-endian) data, AVI, 480 x 360, 25.00 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz) | |
5e37db9a | 9 | # |
94cb018b | 10 | # Conditional build: |
8cc223f8 | 11 | %bcond_with directfb # with DirectFB video output |
8cc223f8 JB |
12 | %bcond_with dxr3 # enable use of DXR3/H+ hardware MPEG decoder |
13 | %bcond_with ggi # with ggi video output | |
8cc223f8 JB |
14 | %bcond_with nas # with NAS audio output |
15 | %bcond_with svga # with svgalib video output | |
01a889a4 | 16 | %bcond_without osd # with osd menu support |
93ab9715 | 17 | %bcond_without altivec # without altivec support |
d6014b54 | 18 | %bcond_without x264 # without x264 support |
2af58a38 | 19 | %bcond_with xmms # with XMMS inputplugin support |
8cc223f8 | 20 | %bcond_without aalib # without aalib video output |
e5b91f83 | 21 | %bcond_without jack # without JACKD support |
8cc223f8 JB |
22 | %bcond_without alsa # without ALSA audio output |
23 | %bcond_without arts # without arts audio output | |
dd153a0d | 24 | %bcond_without caca # without libcaca video output |
3c3fdfcc | 25 | %bcond_without cdparanoia # without cdparanoia support |
32272421 | 26 | %bcond_without dvdnav # without dvdnav support |
3c3fdfcc JB |
27 | %bcond_without enca # disable using ENCA charset oracle library |
28 | %bcond_without esd # disable EsounD sound support | |
29 | %bcond_without faad # disable FAAD2 (AAC) support | |
30 | %bcond_without gif # disable GIF support | |
8d7378f8 | 31 | %bcond_without gui # without GTK+ GUI |
8cc223f8 | 32 | %bcond_without joystick # disable joystick support |
3c3fdfcc | 33 | %bcond_without libdts # disable libdts support |
a4298e0c | 34 | %bcond_without libdv # disable libdv en/decoding support |
8cc223f8 | 35 | %bcond_without lirc # without lirc support |
841cb995 ER |
36 | %bcond_with live # without LIVE555 libraries |
37 | %bcond_without lzo # with LZO support (requires lzo 2.x) | |
8cc223f8 | 38 | %bcond_without mad # without mad (audio MPEG) support |
7d814b48 | 39 | %bcond_without pulseaudio # without pulseaudio output |
8cc223f8 JB |
40 | %bcond_without quicktime # without binary quicktime dll support |
41 | %bcond_without real # without Real* 8/9 codecs support | |
42 | %bcond_without runtime # disable runtime cpu detection, just detect CPU | |
11421384 ER |
43 | # in compile time (advertised by mplayer authors as working faster); in this case |
44 | # mplayer may not work on machine other then where it was compiled | |
45 | %bcond_without select # disable audio select() support (for example required this option ALSA or Vortex2 driver) | |
a4298e0c | 46 | %bcond_without smb # disable Samba (SMB) input support |
de0c2d91 | 47 | %bcond_without theora # without theora support |
8cc223f8 | 48 | %bcond_without win32 # without win32 codecs support |
1087e996 | 49 | %bcond_without vidix # disable vidix |
3b930ad6 | 50 | %bcond_without vorbis # without Ogg-Vorbis audio support |
3c3fdfcc | 51 | %bcond_without xvid # disable XviD codec |
2af58a38 | 52 | %bcond_without mencoder # disable mencoder (a/v encoder) compilation |
906bf13b | 53 | %bcond_without sdl # disable SDL |
aab7d90d | 54 | %bcond_without doc # don't build docs (slow) |
59a38ff4 | 55 | %bcond_with shared # experimental libmplayer.so support |
439df4dd | 56 | %bcond_with amr # enable 3GPP Adaptive Multi Rate (AMR) speech codec support |
0256d486 | 57 | %bcond_without gnomess # disable controling gnome screensaver |
759ef2d3 ER |
58 | %bcond_without ssse3 # sse3 optimizations (needs binutils >= 2.16.92) |
59 | %bcond_with system_ffmpeg # use ffmpeg-devel, rather bundled sources (likely needs ffmpeg from same svn revision than mplayer) | |
2dfabf36 | 60 | |
94cb018b JB |
61 | %ifnarch %{ix86} |
62 | %undefine with_win32 | |
7a82c266 | 63 | %undefine with_quicktime |
1087e996 | 64 | %undefine with_vidix |
94cb018b JB |
65 | %endif |
66 | ||
38c74592 | 67 | %ifnarch %{ix86} %{x8664} ppc ppc64 |
906bf13b JB |
68 | %undefine with_runtime |
69 | %endif | |
1a8df7bd | 70 | |
71 | %if %{_lib} == "lib64" | |
422903c7 | 72 | %define _suf 64 |
1a8df7bd | 73 | %else |
422903c7 | 74 | %define _suf 32 |
1a8df7bd | 75 | %endif |
76 | ||
879e9f7b | 77 | %define subver rc2 |
759ef2d3 | 78 | %define svnver 27725 |
a42988a0 | 79 | %define rel 17 |
135255b8 | 80 | |
906bf13b | 81 | Summary: MPlayer - THE Movie Player for UN*X |
eeb91a66 ER |
82 | Summary(de.UTF-8): MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player |
83 | Summary(es.UTF-8): Otro reproductor de películas | |
84 | Summary(ko.UTF-8): 리눅스용 미디어플레이어 | |
85 | Summary(pl.UTF-8): Odtwarzacz filmów dla systemów uniksowych | |
86 | Summary(pt_BR.UTF-8): Reprodutor de filmes | |
2adea73e | 87 | Name: mplayer |
9cb1ef87 | 88 | Version: 1.0 |
71d2d72a | 89 | Release: 5.%{subver}_svn%{svnver}.%{rel} |
1f85fd72 ER |
90 | # DO NOT increase epoch unless it's really neccessary! |
91 | # especially such changes like pre7->pre7try2, increase Release instead! | |
92 | # PS: $ rpmvercmp pre7try2 pre7 | |
93 | # pre7try2 > pre7 | |
59476b48 | 94 | Epoch: 3 |
bc426a7f | 95 | License: GPL |
906bf13b | 96 | Group: Applications/Multimedia |
759ef2d3 ER |
97 | Source0: http://distfiles.gentoo.org/distfiles/mplayer-%{version}_%{subver}_p%{svnver}.tar.bz2 |
98 | # Source0-md5: d89e86d9183d1a52a7a754d9a3c74724 | |
031c3c7c | 99 | Source3: ftp://ftp1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 |
0a38bda8 | 100 | # Source3-md5: 7b47904a925cf58ea546ca15f3df160c |
e601cd91 | 101 | Source5: g%{name}.desktop |
623ea2d1 | 102 | Source6: ftp://ftp2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 |
0a38bda8 | 103 | # Source6-md5: 1ecd31d17b51f16332b1fcc7da36b312 |
11b89ef7 | 104 | Source7: %{name}.png |
24481cd2 | 105 | Source8: %{name}.desktop |
dfd680ce | 106 | # http://www.on2.com/gpl/mplayer/ |
5db8daec ER |
107 | Source9: http://support.on2.com/gpl/mplayer/2008-11-25-mencoder-on2flixenglinux.tar.bz2 |
108 | # Source9-md5: 7dd9c22d9d7207c0b42fa530b4f3fc5d | |
aee40e50 | 109 | Patch1: %{name}-cp1250-fontdesc.patch |
e63fb437 ER |
110 | #Patch2: %{name}-codec.patch |
111 | #Patch3: %{name}-home_etc.patch | |
aee40e50 | 112 | Patch4: %{name}-350.patch |
113 | Patch5: %{name}-configure.patch | |
f10ca1d7 PG |
114 | # outdated via ffmpeg? |
115 | Patch6: %{name}-system-amr.patch | |
8cc223f8 | 116 | Patch8: %{name}-altivec.patch |
e63fb437 ER |
117 | #Patch10: %{name}-pcmsplit.patch |
118 | #Patch13: %{name}-mythtv.patch | |
11421384 | 119 | Patch14: %{name}-shared.patch |
30e3739f | 120 | #http://www.openchrome.org/snapshots/mplayer/ |
e63fb437 | 121 | #Patch15: %{name}-xvmc.patch |
c7699e1b | 122 | Patch17: %{name}-auto-expand.patch |
f10ca1d7 | 123 | # update |
e63fb437 | 124 | #Patch18: %{name}-gnome-screensaver.patch |
dfd680ce | 125 | Patch19: %{name}-on2flix.patch |
841cb995 | 126 | Patch22: %{name}-ffmpeg.patch |
2b6e0df5 | 127 | Patch24: %{name}-fontconfig_sub.patch |
38c74592 | 128 | Patch26: %{name}-check-byteswap.patch |
b8c20641 | 129 | Patch27: %{name}-release_directfb.patch |
c5b97685 | 130 | URL: http://www.mplayerhq.hu/ |
33c4efab | 131 | %{?with_directfb:BuildRequires: DirectFB-devel} |
aeb67db6 | 132 | BuildRequires: OpenAL-devel |
b458005d | 133 | BuildRequires: OpenGL-devel |
11421384 | 134 | %{?with_sdl:BuildRequires: SDL-devel >= 1.1.7} |
dd6c659c JB |
135 | %{?with_aalib:BuildRequires: aalib-devel} |
136 | %{?with_alsa:BuildRequires: alsa-lib-devel} | |
e4268e0b JB |
137 | %if %{with amr} |
138 | BuildRequires: amrnb-devel | |
4d75c49f | 139 | BuildRequires: amrwb-devel >= 5.3.0 |
e4268e0b | 140 | %endif |
dd6c659c | 141 | %{?with_arts:BuildRequires: artsc-devel} |
841cb995 | 142 | %{?with_ssse3:BuildRequires: binutils >= 3:2.16.92} |
3c3fdfcc | 143 | %{?with_cdparanoia:BuildRequires: cdparanoia-III-devel} |
aab7d90d | 144 | %{?with_doc:BuildRequires: docbook-style-xsl} |
d4e18ae5 | 145 | %{?with_doc:BuildRequires: docbook-dtd412-xml} |
dd6c659c | 146 | %{?with_dxr3:BuildRequires: em8300-devel} |
3c3fdfcc JB |
147 | %{?with_enca:BuildRequires: enca-devel} |
148 | %{?with_esd:BuildRequires: esound-devel} | |
30e3739f | 149 | BuildRequires: faac-devel |
3c3fdfcc | 150 | %{?with_faad:BuildRequires: faad2-devel >= 2.0} |
759ef2d3 | 151 | %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-4.20081024.3} |
d23c171d | 152 | BuildRequires: freetype-devel |
30e3739f | 153 | BuildRequires: fribidi-devel |
1087e996 | 154 | %{?with_vidix:BuildRequires: vidix-devel} |
8cc223f8 JB |
155 | %ifarch ppc |
156 | %{?with_altivec:BuildRequires: gcc >= 5:3.3.2-3} | |
157 | %endif | |
3c3fdfcc | 158 | %{?with_gif:BuildRequires: giflib-devel} |
dd6c659c | 159 | %if %{with gui} |
aeb67db6 | 160 | BuildRequires: gtk+2-devel |
dd6c659c | 161 | %endif |
1087e996 | 162 | %{?with_gnomess:BuildRequires: dbus-glib-devel} |
d336e259 | 163 | %{?with_jack:BuildRequires: jack-audio-connection-kit-devel} |
422903c7 | 164 | %{?with_jack:%requires_eq jack-audio-connection-kit-libs} |
a8a0c1d1 | 165 | BuildRequires: lame-libs-devel |
dd6c659c | 166 | %{?with_caca:BuildRequires: libcaca-devel} |
49aed190 | 167 | %{?with_libdts:BuildRequires: libdts-devel} |
a4298e0c | 168 | %{?with_libdv:BuildRequires: libdv-devel} |
759ef2d3 | 169 | %{?with_dvdnav:BuildRequires: libdvdnav-devel >= 4.1.3} |
dd6c659c | 170 | %{?with_ggi:BuildRequires: libggi-devel} |
af480c75 | 171 | BuildRequires: libjpeg-devel |
dd6c659c | 172 | %{?with_mad:BuildRequires: libmad-devel} |
30e3739f | 173 | BuildRequires: libmpcdec-devel >= 1.2.1 |
af480c75 | 174 | BuildRequires: libpng-devel |
a4298e0c | 175 | %{?with_smb:BuildRequires: libsmbclient-devel} |
de0c2d91 | 176 | %{?with_theora:BuildRequires: libtheora-devel} |
1130ecb8 | 177 | # tremor is used by default, internal as we don't have system one |
281ac7d0 | 178 | #%{?with_vorbis:BuildRequires: libvorbis-devel} |
3e33b534 | 179 | %{?with_x264:BuildRequires: libx264-devel >= 0.1.2-1.20081023_2245.1} |
ceb01d0e | 180 | BuildRequires: libxslt-progs |
dd6c659c JB |
181 | %{?with_lirc:BuildRequires: lirc-devel} |
182 | %{?with_live:BuildRequires: live} | |
841cb995 | 183 | %{?with_lzo:BuildRequires: lzo-devel >= 2.0} |
dd6c659c | 184 | %{?with_nas:BuildRequires: nas-devel} |
b458005d | 185 | BuildRequires: ncurses-devel |
e9d22b19 | 186 | BuildRequires: pkgconfig |
86bc294f | 187 | %{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9} |
aeb67db6 | 188 | BuildRequires: speex-devel >= 1.1 |
dd6c659c JB |
189 | %{?with_svga:BuildRequires: svgalib-devel} |
190 | %{?with_xmms:BuildRequires: xmms-libs} | |
627a7a97 ER |
191 | BuildRequires: xorg-lib-libX11-devel |
192 | BuildRequires: xorg-lib-libXext-devel | |
193 | BuildRequires: xorg-lib-libXinerama-devel | |
194 | BuildRequires: xorg-lib-libXv-devel | |
195 | BuildRequires: xorg-lib-libXvMC-devel | |
196 | BuildRequires: xorg-lib-libXxf86dga-devel | |
197 | BuildRequires: xorg-lib-libXxf86vm-devel | |
3c3fdfcc | 198 | %{?with_xvid:BuildRequires: xvid-devel >= 1:0.9.0} |
c2eb8d00 | 199 | BuildRequires: zlib-devel |
4d75c49f | 200 | Requires: %{name}-common = %{epoch}:%{version}-%{release} |
b458005d | 201 | Requires: OpenGL |
0f2a502d | 202 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
2adea73e | 203 | |
a8e3a9a7 | 204 | %define _noautoreqdep libGL.so.1 libGLU.so.1 |
bb27cfbd | 205 | %define specflags_ia32 -fomit-frame-pointer |
198487b4 | 206 | %if %{with altivec} |
adfd0023 | 207 | %define specflags_ppc -maltivec |
20a66bdb | 208 | %endif |
2adea73e AM |
209 | |
210 | %description | |
c902f7c6 | 211 | Movie player. Supported input formats: VCD (VideoCD), MPEG1/2, RIFF |
212 | AVI, ASF 1.0, Quicktime. Supported audio codecs: PCM (uncompressed), | |
6db4b1ea | 213 | MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Supported video codecs: |
214 | MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. Supported output | |
c902f7c6 | 215 | devices: Matrox G200/G400 hardware, Matrox G200/G400 overlay, X11 |
216 | optionally with SHM extension, X11 using overlays with the Xvideo | |
217 | extension, OpenGL renderer, Matrox G400 YUV support on framebuffer | |
218 | Voodoo2/3 hardware, SDL v1.1.7 driver etc. | |
2adea73e | 219 | |
8b146837 | 220 | If you want to use win32 codecs install w32codec package. |
4228a246 | 221 | |
e011d408 | 222 | %description -l de.UTF-8 |
deba608c | 223 | MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player. |
224 | Kennzeichnend ist die herausragende Format- und | |
e011d408 | 225 | Plattform-Kompatibilität. |
deba608c | 226 | |
e011d408 JR |
227 | Es unterstützt eine Vielzahl von Video und Audio-Codecs, darunter auch |
228 | plattformexklusive, wodurch etwa Windows Media auch außerhalb von | |
229 | Windows wiedergegeben werden kann. Darüber hinaus unterstützt er DVB. | |
230 | Eine besondere Fehlertoleranz ermöglicht es dem mehrfach | |
deba608c | 231 | ausgezeichneten Player, auch defekte Dateien abzuspielen. Eine weitere |
e011d408 JR |
232 | Stärke ist dabei der Wegfall jeglicher Installation, so dass bereits |
233 | installierte Codecs nicht mit MPlayer kollidieren können. | |
deba608c | 234 | |
e011d408 | 235 | %description -l es.UTF-8 |
c902f7c6 | 236 | Reproductor video. Formatos de entrada soportados: VCD (VideoCD), |
237 | MPEG1/2, RIFF AVI, ASF 1.0, Quicktime. Codecs de audio soportados: PCM | |
238 | (uncompressed), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Codecs | |
239 | de video soportados: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. | |
240 | Dispositivos de salida soportados: Matrox G200/G400 hardware, Matrox | |
e011d408 JR |
241 | G200/G400 overlay, X11 optionalmente con la extensión SHM, X11 usando |
242 | overlays con la extensión Xvideo, plasmador OpenGL, soporte de Matrox | |
c902f7c6 | 243 | G400 YUV en hardware de framebuffer de Voodoo2/3, controlador SDL |
244 | v1.1.7 etc. | |
33c4efab | 245 | |
8b146837 | 246 | Si quiere usar codecs Win32, instale el paquete w32codec. |
33c4efab | 247 | |
e011d408 JR |
248 | %description -l ko.UTF-8 |
249 | MPlayer는 리눅스용 무비플레이어입니다. 대부분의 mpeg, avi 그리고 asf | |
250 | 파일을 재생합니다. VCD, DVD, 심 지어 DivX까지 볼 수 있습니다. | |
251 | MPlayer의 또 다른 큰 특징은 출력 드라이버가 다양하다는 것입니다. X11, | |
252 | Xv, DGA, OpenGL, SVGAlib, fbdev와 작동하며, SDL이나 | |
253 | (Matrox/3dfx/Sis등의) 특정 카드에 종속된 로우레 벨 드라이버들도 사용할 | |
254 | 수 있습니다. 대부분의 출력 드라이버들은 소프트웨어 혹은 하드웨어적인 | |
255 | 크기조절 (scaling)을 지원하므로, 전체화면으로 영상을 감상할 수 | |
256 | 있습니다. 뿐만아니라, 한국어, 영어, 헝가리어, 체코어, 러시아어등의 | |
257 | 부드러운(antialiased) 자막폰트도 사용할 수 있습니다. | |
af480c75 | 258 | |
e011d408 JR |
259 | %description -l pl.UTF-8 |
260 | Odtwarzacz wideo. Wspierane formaty wejściowe: VCD (VideoCD), MPEG1/2, | |
c902f7c6 | 261 | RIFF AVI, ASF 1.0, Quicktime. Wspierane kodeki audio: PCM |
262 | (nieskompresowane), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. | |
263 | Wspierane kodeki wideo: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. | |
e011d408 | 264 | Wspierane urządzenia wyjściowe: Matrox G200/G400, X11 opcjonalnie z |
c902f7c6 | 265 | rozszerzeniem SHM, X11 z rozszerzeniem Xvideo, renderer OpenGL, Matrox |
e011d408 | 266 | G400 używając framebuffera, Voodoo2/3, SDL v1.1.7 itp. |
2adea73e | 267 | |
e011d408 | 268 | Jeśli chcesz używać kodeków win32, zainstaluj pakiet w32codec. |
4228a246 | 269 | |
e011d408 JR |
270 | %description -l pt_BR.UTF-8 |
271 | MPlayer é um reprodutor de filmes que suporta vários codecs de vídeo e | |
272 | áudio. Diferentes mecanismos de reprodução podem também ser | |
2abc285c | 273 | escolhidos, incluindo SDL, SVGALib, frame buffer, aalib, X11 e outros. |
274 | ||
11421384 ER |
275 | %package -n gmplayer |
276 | Summary: MPlayer with GTK+ GUI interface | |
eeb91a66 | 277 | Summary(pl.UTF-8): MPlayer z graficznym interfejsem GTK+ |
11421384 | 278 | Group: X11/Applications/Multimedia |
11421384 | 279 | Requires: %{name}-common = %{epoch}:%{version}-%{release} |
deba608c | 280 | Requires: %{name}-skin |
11421384 ER |
281 | |
282 | %description -n gmplayer | |
283 | MPlayer with GUI GTK+ interface. | |
284 | ||
e011d408 | 285 | %description -n gmplayer -l pl.UTF-8 |
906bf13b JB |
286 | MPlayer z graficznym interfejsem GTK+. |
287 | ||
11421384 | 288 | %package common |
906bf13b | 289 | Summary: Configuration files and documentation for MPlayer |
eeb91a66 | 290 | Summary(pl.UTF-8): Pliki konfiguracyjne i dokumentacja dla MPlayera |
11421384 | 291 | Group: Applications/Multimedia |
1087e996 | 292 | Obsoletes: mplayer-vidix |
11421384 ER |
293 | |
294 | %description common | |
906bf13b JB |
295 | Configuration files, man page and HTML documentation for MPlayer. |
296 | ||
e011d408 | 297 | %description common -l pl.UTF-8 |
906bf13b | 298 | Pliki konfiguracyjne, strona manuala i dokumentacja HTML dla MPlayera. |
11421384 ER |
299 | |
300 | %package -n mencoder | |
906bf13b | 301 | Summary: MEncoder - a movie encoder for Linux |
eeb91a66 | 302 | Summary(pl.UTF-8): MEncoder - koder filmów dla Linuksa |
11421384 ER |
303 | Group: Applications/Multimedia |
304 | Requires: %{name}-common = %{epoch}:%{version}-%{release} | |
305 | ||
306 | %description -n mencoder | |
906bf13b JB |
307 | MEncoder is a movie encoder for Linux and is a part of the MPlayer |
308 | package. | |
309 | ||
e011d408 JR |
310 | %description -n mencoder -l pl.UTF-8 |
311 | MEncoder to koder filmów dla Linuksa będący częścią pakietu MPlayer. | |
11421384 | 312 | |
2adea73e | 313 | %prep |
759ef2d3 | 314 | %setup -q -n mplayer-%{version}_%{subver}_p%{svnver} -a3 -a6 -a9 |
833dbe20 | 315 | cp -f etc/codecs.conf etc/codecs.win32.conf |
aee40e50 | 316 | %patch1 -p0 |
d1732085 ER |
317 | #%%patch2 -p1 -- still needed? |
318 | ##%%patch3 -p1 -- old home_etc behavior | |
aee40e50 | 319 | %patch4 -p1 |
dd6c659c | 320 | %patch5 -p1 |
d1732085 | 321 | #%%patch6 -p1 # - try ffmpeg |
2dfabf36 | 322 | %patch8 -p1 |
2b8c25a3 | 323 | #%%patch10 -p1 |
d1732085 | 324 | #%%patch13 -p1 # TODO |
11421384 ER |
325 | %if %{with shared} |
326 | %patch14 -p1 | |
327 | %endif | |
d1732085 | 328 | #%%patch15 -p0 # TODO |
c7699e1b | 329 | %patch17 -p1 |
0256d486 | 330 | %if %{with gnomess} |
d1732085 | 331 | #%%patch18 -p1 |
0992d783 | 332 | %endif |
59ba0205 | 333 | |
dfd680ce | 334 | # on2flix |
759ef2d3 ER |
335 | mv mencoder-on2flixenglinux{-*-*-*,} |
336 | cp -a mencoder-on2flixenglinux/patch/new_files/libmpdemux/* libmpdemux | |
337 | #rm -f mencoder-on2flixenglinux/patch/version.diff | |
dfd680ce | 338 | %patch19 -p1 |
759ef2d3 | 339 | for a in mencoder-on2flixenglinux/patch/*.diff; do |
dfd680ce ER |
340 | patch -p0 < $a |
341 | done | |
342 | ||
1f8d8779 | 343 | %{?with_system_ffmpeg:%patch22 -p1} |
2b6e0df5 | 344 | %patch24 -p0 |
38c74592 | 345 | %patch26 -p1 |
b8c20641 | 346 | %patch27 -p1 |
7c31e935 | 347 | |
52641151 PS |
348 | # recent dvdnav-config doesn't support --minilibs. |
349 | sed -i 's:--minilibs:--libs:g' configure | |
350 | ||
759ef2d3 | 351 | # Set version # |
5db8daec | 352 | echo %{svnver} > svn_snapshot_id |
759ef2d3 | 353 | |
d1732085 ER |
354 | sed -e '/Delete this default/d' etc/example.conf > etc/mplayer.conf |
355 | rm -f font-*/runme | |
356 | ||
1f8d8779 ER |
357 | %if %{with system_ffmpeg} |
358 | # using external ffmpeg, but mplayer adds these to includepath | |
359 | rm -rf libavcodec libavdevice libavformat libavutil libpostproc libswscale | |
360 | %endif | |
361 | ||
2adea73e | 362 | %build |
68dd28e8 | 363 | %if %{with shared} |
11421384 | 364 | CFLAGS="%{rpmcflags} -fPIC" |
68dd28e8 ER |
365 | %else |
366 | CFLAGS="%{rpmcflags}" | |
68dd28e8 | 367 | %endif |
4ed9dec4 | 368 | CC="%{__cc}" |
ce8a4f6d JB |
369 | LDFLAGS="%{rpmldflags}" |
370 | export CC CFLAGS LDFLAGS | |
11421384 ER |
371 | |
372 | build() { | |
373 | set -x | |
374 | ./configure \ | |
375 | %{?debug:--enable-debug=3} \ | |
dd6c659c JB |
376 | --prefix=%{_prefix} \ |
377 | --confdir=%{_sysconfdir}/mplayer \ | |
61a9057c | 378 | --with-extraincdir=%{_includedir}/xvid%{?with_directfb::%{_includedir}/directfb} \ |
d1732085 | 379 | --with-extralibdir=%{?_x_libraries}%{!?_x_libraries:%{_libdir}} \ |
1f8d8779 | 380 | %if %{with system_ffmpeg} |
841cb995 ER |
381 | --disable-libavutil_a \ |
382 | --disable-libavcodec_a \ | |
383 | --disable-libavformat_a \ | |
384 | --disable-libpostproc_a \ | |
385 | --enable-libavutil_so \ | |
386 | --enable-libavcodec_so \ | |
387 | --enable-libavformat_so \ | |
388 | --enable-libpostproc_so \ | |
1f8d8779 | 389 | %endif |
57f87bc2 | 390 | %ifnarch %{ix86} %{x8664} |
dd6c659c | 391 | --disable-mmx \ |
a14f4270 | 392 | --disable-mmxext \ |
dd6c659c | 393 | --disable-3dnow \ |
a14f4270 | 394 | --disable-3dnowext \ |
dd6c659c JB |
395 | --disable-sse \ |
396 | --disable-sse2 \ | |
397 | --disable-fastmemcpy \ | |
dfeec30a | 398 | %endif |
841cb995 | 399 | %{!?with_ssse3:--disable-ssse3} \ |
1837afdf | 400 | %ifarch ppc |
d1732085 | 401 | %{!?with_altivec:--disable-altivec} \ |
1837afdf | 402 | %endif |
d1732085 ER |
403 | %{!?with_amr:--disable-libamr_nb --disable-libamr_wb} \ |
404 | %{?with_amr:--enable-libamr_nb --enable-libamr_wb} \ | |
405 | %{?with_directfb:--enable-directfb} \ | |
406 | %{!?with_directfb:--disable-directfb} \ | |
407 | %{!?with_dxr3:--disable-dxr3} \ | |
408 | %{!?with_ggi:--disable-ggi} \ | |
409 | %{?with_live:--enable-live --with-extraincdir=/usr/include/liveMedia} \ | |
410 | %{!?with_live:--disable-live} \ | |
411 | %{!?with_lzo:--disable-liblzo} \ | |
412 | %{!?with_nas:--disable-nas} \ | |
413 | %{!?with_svga:--disable-svga} \ | |
414 | %{!?with_aalib:--disable-aa} \ | |
415 | %{!?with_jack:--disable-jack} \ | |
416 | %{!?with_alsa:--disable-alsa} \ | |
417 | %{?with_alsa:--enable-alsa --disable-select} \ | |
418 | %{!?with_arts:--disable-arts} \ | |
419 | %{!?with_caca:--disable-caca} \ | |
420 | %{!?with_cdparanoia:--disable-cdparanoia} \ | |
d1732085 ER |
421 | %{!?with_enca:--disable-enca} \ |
422 | %{!?with_esd:--disable-esd} \ | |
423 | %{!?with_faad:--disable-faad-external --disable-faad-internal} \ | |
424 | %{?with_faad:--disable-faad-internal} \ | |
425 | %{!?with_gif:--disable-gif} \ | |
426 | %{?with_joystick:--enable-joystick} \ | |
427 | %{!?with_libdv:--disable-libdv} \ | |
428 | %{!?with_libdts:--disable-libdts} \ | |
429 | --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \ | |
430 | %{!?with_mad:--disable-mad} \ | |
7d814b48 | 431 | %{!?with_pulseaudio:--disable-polyp} \ |
d1732085 ER |
432 | %{!?with_quicktime:--disable-qtx} \ |
433 | %{!?with_real:--disable-real} \ | |
434 | --%{?with_runtime:en}%{!?with_runtime:dis}able-runtime-cpudetection \ | |
435 | %{!?with_select:--disable-select} \ | |
436 | %{!?with_smb:--disable-smb} \ | |
437 | %{!?with_win32:--disable-win32dll} \ | |
438 | %{!?with_vorbis:--disable-vorbis} \ | |
439 | %{?with_osd:--enable-menu} \ | |
440 | %{!?with_theora:--disable-theora} \ | |
441 | %{!?with_x264:--disable-x264} \ | |
442 | %{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}} \ | |
443 | %{!?with_xvid:--disable-xvid} \ | |
759ef2d3 | 444 | %{!?with_vidix:--disable-vidix} \ |
d1732085 | 445 | %{!?with_mencoder:--disable-mencoder} \ |
841cb995 ER |
446 | --enable-dga1 \ |
447 | --enable-dga2 \ | |
759ef2d3 | 448 | --%{!?with_dvdnav:dis}%{?with_dvdnav:en}able-dvdnav \ |
dd6c659c JB |
449 | --enable-fbdev \ |
450 | --enable-gl \ | |
451 | --enable-mga \ | |
e7261209 KK |
452 | --enable-radio \ |
453 | --enable-radio-capture \ | |
11421384 | 454 | --%{?with_sdl:en}%{!?with_sdl:dis}able-sdl \ |
dd6c659c JB |
455 | --enable-tdfxfb \ |
456 | --enable-vm \ | |
457 | --enable-x11 \ | |
458 | --enable-xmga \ | |
459 | --enable-xv \ | |
460 | --enable-xvmc \ | |
3c3fdfcc | 461 | --enable-dynamic-plugins \ |
dd6c659c JB |
462 | --enable-largefiles \ |
463 | --language=all \ | |
841cb995 | 464 | --codecsdir=%{_libdir}/codecs \ |
3c3fdfcc | 465 | --with-xvmclib=XvMCW \ |
11421384 | 466 | "$@" |
eb52750a | 467 | |
11421384 ER |
468 | %{__make} |
469 | } | |
2adea73e | 470 | |
11421384 ER |
471 | %if %{with gui} |
472 | # build GUI version | |
841cb995 | 473 | build --enable-gui --disable-mencoder |
11421384 | 474 | mv -f mplayer gmplayer |
aeb67db6 | 475 | %{__make} distclean |
11421384 ER |
476 | %endif |
477 | ||
478 | # now build regular version | |
479 | build --disable-gui | |
480 | ||
aab7d90d | 481 | %if %{with doc} |
6eeeb8b4 | 482 | %{__make} -j1 -C DOCS/xml |
11421384 | 483 | %endif |
ceb01d0e | 484 | |
2adea73e AM |
485 | %install |
486 | rm -rf $RPM_BUILD_ROOT | |
e0e4b963 | 487 | install -d \ |
d23c171d | 488 | $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_sysconfdir}/mplayer} \ |
59ba0205 | 489 | $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,fr,hu,it,pl,sv,zh_CN,}/man1 \ |
dd20ae16 | 490 | $RPM_BUILD_ROOT%{_datadir}/mplayer/skins \ |
59ba0205 | 491 | $RPM_BUILD_ROOT%{_desktopdir} |
2adea73e | 492 | |
e0e4b963 | 493 | # default config files |
c455a752 | 494 | install etc/{codecs,mplayer%{?with_osd:,menu},input}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer |
e0e4b963 | 495 | |
496 | # executables | |
2af58a38 | 497 | %if %{with mencoder} |
1a8df7bd | 498 | install mencoder $RPM_BUILD_ROOT%{_bindir}/mencoder%{_suf} |
499 | ln -sf mencoder%{_suf} $RPM_BUILD_ROOT%{_bindir}/mencoder | |
2af58a38 | 500 | %endif |
1a8df7bd | 501 | install mplayer $RPM_BUILD_ROOT%{_bindir}/mplayer%{_suf} |
502 | ln -sf mplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/mplayer | |
11421384 | 503 | %if %{with gui} |
1a8df7bd | 504 | install gmplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer%{_suf} |
505 | ln -sf gmplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/gmplayer | |
11421384 | 506 | %endif |
e0e4b963 | 507 | |
508 | # fonts | |
9d62f689 | 509 | cp -r font-* $RPM_BUILD_ROOT%{_datadir}/mplayer |
6e933f9c | 510 | ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font |
e0e4b963 | 511 | |
11421384 | 512 | %if %{with gui} |
d1732085 | 513 | touch $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/default |
f0d8c47e | 514 | install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir} |
68dd28e8 | 515 | %endif |
24481cd2 | 516 | install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir} |
11b89ef7 | 517 | install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir} |
e0e4b963 | 518 | |
519 | # man pages | |
59ba0205 | 520 | install DOCS/man/cs/*.1 $RPM_BUILD_ROOT%{_mandir}/cs/man1 |
aee40e50 | 521 | install DOCS/man/de/*.1 $RPM_BUILD_ROOT%{_mandir}/de/man1 |
522 | install DOCS/man/en/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
523 | install DOCS/man/es/*.1 $RPM_BUILD_ROOT%{_mandir}/es/man1 | |
524 | install DOCS/man/fr/*.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1 | |
525 | install DOCS/man/hu/*.1 $RPM_BUILD_ROOT%{_mandir}/hu/man1 | |
8cda16b8 | 526 | install DOCS/man/it/*.1 $RPM_BUILD_ROOT%{_mandir}/it/man1 |
aee40e50 | 527 | install DOCS/man/pl/*.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1 |
841cb995 | 528 | #install DOCS/man/sv/*.1 $RPM_BUILD_ROOT%{_mandir}/sv/man1 |
e66a8169 | 529 | install DOCS/man/zh/*.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1 |
6db4b1ea | 530 | |
2adea73e AM |
531 | %clean |
532 | rm -rf $RPM_BUILD_ROOT | |
533 | ||
a69eaaef | 534 | %post -n gmplayer |
cd748ae6 | 535 | umask 022 |
cd748ae6 | 536 | [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||: |
537 | ||
a69eaaef | 538 | %postun -n gmplayer |
cd748ae6 | 539 | umask 022 |
75b3147a | 540 | [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||: |
2ea7d522 | 541 | |
2adea73e AM |
542 | %files |
543 | %defattr(644,root,root,755) | |
1a8df7bd | 544 | %attr(755,root,root) %{_bindir}/mplayer* |
11421384 ER |
545 | |
546 | %if %{with gui} | |
547 | %files -n gmplayer | |
548 | %defattr(644,root,root,755) | |
1a8df7bd | 549 | %attr(755,root,root) %{_bindir}/gmplayer* |
11421384 | 550 | %{_desktopdir}/gmplayer.desktop |
dd20ae16 | 551 | %dir %{_datadir}/%{name}/skins |
d1732085 | 552 | %ghost %{_datadir}/%{name}/skins/default |
11421384 ER |
553 | %endif |
554 | ||
0fb5a7ee | 555 | %if %{with mencoder} |
11421384 ER |
556 | %files -n mencoder |
557 | %defattr(644,root,root,755) | |
aeb67db6 | 558 | %doc DOCS/tech/encoding-guide.txt DOCS/tech/encoding-tips.txt |
559 | %doc DOCS/tech/swscaler_filters.txt DOCS/tech/swscaler_methods.txt | |
560 | %doc DOCS/tech/colorspaces.txt | |
1a8df7bd | 561 | %attr(755,root,root) %{_bindir}/mencoder* |
0fb5a7ee | 562 | %endif |
11421384 ER |
563 | |
564 | %files common | |
565 | %defattr(644,root,root,755) | |
11421384 ER |
566 | %doc DOCS/tech |
567 | %if %{with win32} | |
35ac5af9 | 568 | %doc etc/codecs.win32.conf |
11421384 | 569 | %endif |
841cb995 ER |
570 | %if %{with doc} |
571 | # HTML and XML-generated docs | |
572 | %doc DOCS/HTML/en | |
0ffd4cd0 | 573 | %lang(cs) %doc DOCS/HTML/cs |
aeb67db6 | 574 | %lang(de) %doc DOCS/HTML/de |
aee40e50 | 575 | %lang(es) %doc DOCS/HTML/es |
576 | %lang(fr) %doc DOCS/HTML/fr | |
8cda16b8 | 577 | %lang(hu) %doc DOCS/HTML/hu |
aee40e50 | 578 | %lang(pl) %doc DOCS/HTML/pl |
579 | %lang(ru) %doc DOCS/HTML/ru | |
841cb995 ER |
580 | #%lang(zh_CN) %doc DOCS/zh |
581 | %endif | |
582 | %doc AUTHORS README | |
11421384 | 583 | |
906bf13b JB |
584 | %dir %{_sysconfdir}/%{name} |
585 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf | |
2adea73e | 586 | %{_mandir}/man1/* |
59ba0205 | 587 | %lang(cs) %{_mandir}/cs/man1/* |
20e1052d | 588 | %lang(de) %{_mandir}/de/man1/* |
aee40e50 | 589 | %lang(es) %{_mandir}/es/man1/* |
2a9a2b75 | 590 | %lang(fr) %{_mandir}/fr/man1/* |
daef2f4a | 591 | %lang(hu) %{_mandir}/hu/man1/* |
8cda16b8 | 592 | %lang(it) %{_mandir}/it/man1/* |
2a6ed516 | 593 | %lang(pl) %{_mandir}/pl/man1/* |
841cb995 | 594 | #%lang(sv) %{_mandir}/sv/man1/* |
90413e82 | 595 | %lang(zh_CN) %{_mandir}/zh_CN/man1/* |
24481cd2 | 596 | %{_desktopdir}/mplayer.desktop |
1087e996 | 597 | %{_pixmapsdir}/mplayer.png |
11421384 ER |
598 | %dir %{_datadir}/%{name} |
599 | %{_datadir}/%{name}/font* |