+Requires: XFree86, desktop-file-utils
+%{!?_without_dvd:Requires: libdvdcss}
+%{!?_without_dvdread:Requires: libdvdread}
+%{!?_without_dvdplay:Requires: libdvdplay}
+#%%{!?_without_dvbpsi:Requires: libdvbpsi}
+#%%{!?_without_ogg:Requires: libogg}
+%{!?_without_mad:Requires: libmad}
+%{!?_without_ffmpeg:Requires: ffmpeg}
+#%%{!?_without_xvid:Requires: xvidcore}
+%{!?_without_a52:Requires: a52dec}
+#%%{?_with_dv:Requires: libdv}
+#%%{!?_without_flac:Requires: flac}
+#%%{!?_without_vorbis:Requires: libvorbis}
+#%%{!?_without_sdl:Requires: SDL}
+#%%{!?_without_aa:Requires: aalib}
+#%%{!?_without_esd:Requires: esound}
+#%%{!?_without_arts:Requires: arts}
+#%%{!?_without_alsa:Requires: alsa-lib}
+#%%{!?_without_gtk:Requires: gtk+}
+#%%{!?_without_gnome:Requires: gnome-libs}
+#%%{?_with_qt:Requires: qt}
+#%%{?_with_kde:Requires: kdelibs}
+#%%{?_with_ncurses:Requires: ncurses}
+#%%{!?_without_xosd:Requires: xosd}
+#%%{!?_without_lirc:Requires: lirc}
+#%%{?_with_mozilla:Requires: mozilla}
+
+%description
+VideoLAN Client (VLC) is a highly portable multimedia player for various
+audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, mp3, ogg, ...) as
+well as DVDs, VCDs, and various streaming protocols.
+
+Available rpmbuild rebuild options :
+--with dv mga qt kde ncurses
+--without dvd dvdread dvdplay dvbpsi v4l avi asf aac ogg rawdv mad ffmpeg xvid
+ mp4 a52 vorbis flac aa esd arts alsa gtk gnome xosd lsp lirc pth
+
+Options that would need not yet existing add-on packages :
+--with faad tremor tarkin theora svgalib ggi glide wxwindows
+
+
+%package devel
+Summary: Header files and static library from the Videolan Client.
+Group: Development/Libraries
+Requires: %{name} = %{version}
+
+%description devel
+VideoLAN Client (VLC) is a highly portable multimedia player for various
+audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, mp3, ogg, ...) as
+well as DVDs, VCDs, and various streaming protocols.
+
+Install this package if you need to build Videolan Client plugins or intend
+to link statically to it.
+
+
+%prep
+%setup -q -n vlc-%{version}
+
+%build
+%configure \
+ --enable-release \
+ %{?_without_dvd:--disable-dvd} \
+ %{!?_without_dvdread:--enable-dvdread} \
+ %{!?_without_dvdplay:--enable-dvdplay} \
+ %{!?_without_dvbpsi:--enable-dvbpsi} \
+ %{!?_without_v4l:--enable-v4l} \
+ --enable-vcd \
+ %{?_without_avi:--disable-avi} \
+ %{?_without_asf:--disable-asf} \
+ %{?_without_aac:--disable-aac} \
+ %{?_without_ogg:--disable-ogg} \
+ %{?_without_rawdv:--disable-rawdv} \
+ %{!?_without_mad:--enable-mad} \
+ %{!?_without_ffmpeg:--enable-ffmpeg --with-ffmpeg=%{_prefix}} \
+ %{?_with_faad:--enable-faad} \
+ %{!?_without_xvid:--enable-xvid} \
+ %{?_without_mp4:--disable-mp4} \
+ %{?_without_a52:--disable-a52} \
+ %{?_without_cinepak:--disable-cinepak} \
+ %{?_with_dv:--enable-dv} \
+ %{!?_without_flac:--enable-flac} \
+ %{?_without_vorbis:--disable-vorbis} \
+ %{?_with_tremor:--enable-tremor} \
+ %{?_with_tarkin:--enable-tarkin} \
+ %{?_with_theora:--enable-theora} \
+ --enable-x11 \
+ --enable-xvideo \
+ %{?_without_sdl:--disable-sdl} \
+ --disable-qte \
+ --disable-directx \
+ --enable-fb \
+ %{?_with_mga:--enable-mga} \
+ %{?_with_svgalib:--enable-svgalib} \
+ %{?_with_ggi:--enable-ggi} \
+ %{?_with_glide:--enable-glide} \
+ %{!?_without_aa:--enable-aa} \
+ --without-wingdi \
+ --enable-oss \
+ %{!?_without_esd:--enable-esd} \
+ %{!?_without_arts:--enable-arts} \
+ %{!?_without_alsa:--enable-alsa} \
+ --disable-waveout \
+ %{!?_without_gtk:--enable-gtk} \
+ --disable-familiar \
+ %{!?_without_gnome:--enable-gnome} \
+ %{!?_with_wxwindows:--disable-wxwindows} \
+ %{?_with_qt:--enable-qt} \
+ %{?_with_kde:--enable-kde} \
+ --disable-opie \
+ --disable-macosx \
+ --disable-qnx \
+ --disable-intfwin \
+ %{?_with_ncurses:--enable-ncurses} \
+ %{!?_without_xosd:--enable-xosd} \
+ %{?_without_slp:--disable-slp} \
+ %{!?_without_lirc:--enable-lirc} \
+ %{!?_without_pth:--enable-pth} \
+ --disable-st \
+ %{?_with_mozilla:--enable-mozilla} \
+ --disable-testsuite \
+ --enable-plugins
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+%makeinstall
+find %{buildroot}%{_libdir}/vlc -name "*.so" | xargs strip
+%find_lang vlc
+
+cat > %{name}.desktop << EOF
+[Desktop Entry]
+Name=VideoLAN Client
+Comment=%{summary}
+Icon=%{_datadir}/vlc/vlc48x48.png
+Exec=vlc
+Terminal=0
+Type=Application
+EOF
+
+mkdir -p %{buildroot}%{_datadir}/applications
+desktop-file-install --vendor %{desktop_vendor} --delete-original \
+ --dir %{buildroot}%{_datadir}/applications \
+ --add-category X-Red-Hat-Extra \
+ --add-category Application \
+ --add-category AudioVideo \
+ %{name}.desktop
+
+%post
+ln /dev/cdrom /dev/dvd -sf
+
+%postun
+rm -f /dev/dvd
+
+%clean
+rm -rf %{buildroot}
+
+%files -f vlc.lang
+%defattr(-, root, root)
+%doc AUTHORS COPYING ChangeLog MAINTAINERS README THANKS
+%doc doc/fortunes.txt doc/web-streaming.html
+%{_bindir}/*vlc
+%{_libdir}/vlc
+%{_datadir}/applications/%{desktop_vendor}-%{name}.desktop
+%{_datadir}/vlc
+
+%files devel
+%defattr(-, root, root)
+%doc HACKING
+%{_bindir}/vlc-config
+%{_includedir}/vlc
+%{_libdir}/libvlc.a