Commit 3a9f7aa4 authored by Yves Duret's avatar Yves Duret

- added missing buildrequires

- now autodetect on wich system we are:
  rpm --rebuild should work out of box on rh and previous mdk systems.
- NO buildrequires on rh-like system. rh does not have a devel policy
- more redhat stuff: NO menu (i do not know their "propriatory" menu system yet)
parent d213c15e
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
%define with_dvdplay 1 %define with_dvdplay 1
%define with_mozilla 0 %define with_mozilla 1
%define with_gtk 1 %define with_gtk 1
%define with_gnome 1 %define with_gnome 1
%define with_qt 0 %define with_qt 0
...@@ -44,10 +44,18 @@ ...@@ -44,10 +44,18 @@
%define with_slp 1 %define with_slp 1
## by default we build for MandrakeCooker
%define buildfor_rh80 0 %define buildfor_rh80 0
%define buildfor_mdk82 0 %define buildfor_mdk82 0
%define buildfor_mdk90 0 %define buildfor_mdk90 0
## but we try to figure out on wich system we are building
%{expand:%%define buildfor_mdk82 %(A=$(awk '{print $4}' /etc/mandrake-release); if [ "$A" = 8.2 ]; then echo 1; else echo 0; fi)}
%{expand:%%define buildfor_mdk90 %(A=$(awk '{print $4}' /etc/mandrake-release); if [ "$A" = 9.0 ]; then echo 1; else echo 0; fi)}
%{expand:%%define buildfor_mdk91 %(A=$(awk '{print $4}' /etc/mandrake-release); if [ "$A" = 9.1 ]; then echo 1; else echo 0; fi)}
# not a mandrake one.
%{expand:%%define buildfor_rh80 %([[ -e /etc/mandrake-release ]] && echo 1 || echo 0)}
# new macros # new macros
%if %buildfor_mdk82 || %buildfor_mdk90 || %buildfor_rh80 %if %buildfor_mdk82 || %buildfor_mdk90 || %buildfor_rh80
%define libname lib%name%libmajor %define libname lib%name%libmajor
...@@ -61,7 +69,15 @@ ...@@ -61,7 +69,15 @@
%define configure2_5x CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr %define configure2_5x CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr
%define make %__make %define make %__make
%define makeinstall_std %__make DESTDIR="$RPM_BUILD_ROOT" install %define makeinstall_std %__make DESTDIR="$RPM_BUILD_ROOT" install
%define _menudir /usr/lib/menu
%define _iconsdir /usr/share/icons
%define _liconsdir /usr/share/icons/large
%define _miconsdir /usr/share/icons/mini
# adjust define for Redhat. # adjust define for Redhat.
%define with_ggi 0
%define with_dvb 0
%define with_slp 0
%define with_mozilla 0
%endif %endif
# without # without
...@@ -142,6 +158,8 @@ Requires: vlc-plugin-a52 ...@@ -142,6 +158,8 @@ Requires: vlc-plugin-a52
BuildRoot: %_tmppath/%name-%version-%release-root BuildRoot: %_tmppath/%name-%version-%release-root
# for redhat system, NO buildrequires. rh sux
%if !%buildfor_rh80
%if %with_mozilla %if %with_mozilla
Buildrequires: mozilla-devel Buildrequires: mozilla-devel
%endif %endif
...@@ -162,7 +180,6 @@ Buildrequires: libncurses5-devel ...@@ -162,7 +180,6 @@ Buildrequires: libncurses5-devel
%if %with_wx %if %with_wx
Buildrequires: wxGTK-devel Buildrequires: wxGTK-devel
%endif %endif
%endif
%if %with_lirc %if %with_lirc
Buildrequires: liblirc-devel Buildrequires: liblirc-devel
%endif %endif
...@@ -199,6 +216,12 @@ Buildrequires: liba52dec-devel ...@@ -199,6 +216,12 @@ Buildrequires: liba52dec-devel
%if %with_ffmpeg %if %with_ffmpeg
Buildrequires: libffmpeg-devel Buildrequires: libffmpeg-devel
%endif %endif
%if %with_dvdplay
BuildRequires: libdvdplay-devel
%endif
%if %with_dvb
BuildRequires: libdvbpsi-devel
%endif
%if %with_alsa %if %with_alsa
Buildrequires: libalsa2-devel Buildrequires: libalsa2-devel
...@@ -214,6 +237,7 @@ Buildrequires: libarts-devel ...@@ -214,6 +237,7 @@ Buildrequires: libarts-devel
Buildrequires: libopenslp-devel Buildrequires: libopenslp-devel
%endif %endif
%endif #no buildrequires for rh systems.
%description %description
VideoLAN is an OpenSource streaming solution for every OS developed by VideoLAN is an OpenSource streaming solution for every OS developed by
...@@ -244,6 +268,8 @@ for the VLC media player, or standalone applications using features from VLC. ...@@ -244,6 +268,8 @@ for the VLC media player, or standalone applications using features from VLC.
Summary: A multimedia plugin for Mozilla, based on vlc Summary: A multimedia plugin for Mozilla, based on vlc
group: Video group: Video
Requires: %name = %version-%release Requires: %name = %version-%release
%{expand: %%define mozve %(rpm -q mozilla| sed 's/mozilla-\([0-9].*\)-.*$/\1/')}
Requires: mozilla = %mozve
%description -n mozilla-plugin-vlc %description -n mozilla-plugin-vlc
This plugin adds support for MPEG, MPEG2, DVD and DivX to your Mozilla This plugin adds support for MPEG, MPEG2, DVD and DivX to your Mozilla
browser. The decoding process is done by vlc and the output window is browser. The decoding process is done by vlc and the output window is
...@@ -481,7 +507,11 @@ the VLC media player. ...@@ -481,7 +507,11 @@ the VLC media player.
# yves 0.4.0-1mdk # yves 0.4.0-1mdk
# ffmpeg: static linking cause no official ffmpeg release with a stable ABI # ffmpeg: static linking cause no official ffmpeg release with a stable ABI
# ffmpeg:no plugin posible on ia64 due to the static linking (can not put .a in a .so) # ffmpeg:no plugin posible on ia64 due to the static linking (can not put .a in a .so)
%if %with_mozilla
%define moz_ver 1.3a
export XPIDL=/usr/lib/mozilla-%moz_ver/xpidl
perl -pi -e 's#-I/usr/share/idl/mozilla#-I/usr/share/idl/mozilla-1.3a#' Makefile.in
%endif
export QTDIR=%{_libdir}/qt3 export QTDIR=%{_libdir}/qt3
# mandrake kernel specific # mandrake kernel specific
export CPPFLAGS="${CPPFLAGS:--I/usr/src/linux/3rdparty/mod_dvb/include}" export CPPFLAGS="${CPPFLAGS:--I/usr/src/linux/3rdparty/mod_dvb/include}"
...@@ -582,7 +612,7 @@ export CPPFLAGS="${CPPFLAGS:--I/usr/src/linux/3rdparty/mod_dvb/include}" ...@@ -582,7 +612,7 @@ export CPPFLAGS="${CPPFLAGS:--I/usr/src/linux/3rdparty/mod_dvb/include}"
%make %make
%install %install
rm -f %buildroot rm -fr %buildroot
%makeinstall_std %makeinstall_std
%find_lang %name %find_lang %name
install -d %buildroot/%_mandir/man1 install -d %buildroot/%_mandir/man1
...@@ -647,11 +677,17 @@ install -m 644 %pngdir/qvlc48x48.png %buildroot/%_liconsdir/qvlc.png ...@@ -647,11 +677,17 @@ install -m 644 %pngdir/qvlc48x48.png %buildroot/%_liconsdir/qvlc.png
#rpm (>= 4.0.4-20mdk) now checks for installed (but unpackaged) files #rpm (>= 4.0.4-20mdk) now checks for installed (but unpackaged) files
rm -f %pngdir/* rm -f %pngdir/*
%if %buildfor_rh80
rm -fr %buildroot/%_menudir
rm -fr %buildroot/%_iconsdir
%endif
%if !%buildfor_rh80
%post %post
%update_menus %update_menus
%postun %postun
%clean_menus %clean_menus
%endif
%clean %clean
rm -fr %buildroot rm -fr %buildroot
...@@ -817,10 +853,12 @@ rm -fr %buildroot ...@@ -817,10 +853,12 @@ rm -fr %buildroot
%dir %_libdir/vlc/visualization %dir %_libdir/vlc/visualization
%_mandir/man1/vlc.* %_mandir/man1/vlc.*
%if !%buildfor_rh80
%_menudir/vlc %_menudir/vlc
%_miconsdir/vlc.png %_miconsdir/vlc.png
%_iconsdir/vlc.png %_iconsdir/vlc.png
%_liconsdir/vlc.png %_liconsdir/vlc.png
%endif
%files -n %libname-devel %files -n %libname-devel
%defattr(-,root,root) %defattr(-,root,root)
...@@ -836,9 +874,7 @@ rm -fr %buildroot ...@@ -836,9 +874,7 @@ rm -fr %buildroot
%files -n mozilla-plugin-vlc %files -n mozilla-plugin-vlc
%defattr(-,root,root) %defattr(-,root,root)
%doc README %doc README
# FIXME: seems to be mozilla-version/plugin on Mandrake %_libdir/mozilla/*/*
#%dir %_libdir/mozilla
%_libdir/mozilla*/*
%endif %endif
# intf plugins # intf plugins
...@@ -849,6 +885,7 @@ rm -fr %buildroot ...@@ -849,6 +885,7 @@ rm -fr %buildroot
%_libdir/vlc/misc/libgtk_main_plugin.so %_libdir/vlc/misc/libgtk_main_plugin.so
%_libdir/vlc/gui/libgtk_plugin.so %_libdir/vlc/gui/libgtk_plugin.so
%_bindir/gvlc %_bindir/gvlc
%if !%buildfor_rh80
%_menudir/gvlc %_menudir/gvlc
%_miconsdir/gvlc.png %_miconsdir/gvlc.png
%_iconsdir/gvlc.png %_iconsdir/gvlc.png
...@@ -858,6 +895,7 @@ rm -fr %buildroot ...@@ -858,6 +895,7 @@ rm -fr %buildroot
%postun -n gvlc %postun -n gvlc
%clean_menus %clean_menus
%endif %endif
%endif
%if %with_gnome %if %with_gnome
%files -n gnome-vlc %files -n gnome-vlc
...@@ -866,6 +904,7 @@ rm -fr %buildroot ...@@ -866,6 +904,7 @@ rm -fr %buildroot
%_libdir/vlc/misc/libgnome_main_plugin.so %_libdir/vlc/misc/libgnome_main_plugin.so
%_libdir/vlc/gui/libgnome_plugin.so %_libdir/vlc/gui/libgnome_plugin.so
%_bindir/gnome-vlc %_bindir/gnome-vlc
%if !%buildfor_rh80
%_menudir/gnome-vlc %_menudir/gnome-vlc
%_miconsdir/gnome-vlc.png %_miconsdir/gnome-vlc.png
%_iconsdir/gnome-vlc.png %_iconsdir/gnome-vlc.png
...@@ -875,6 +914,7 @@ rm -fr %buildroot ...@@ -875,6 +914,7 @@ rm -fr %buildroot
%postun -n gnome-vlc %postun -n gnome-vlc
%clean_menus %clean_menus
%endif %endif
%endif
%if %with_qt %if %with_qt
%files -n qvlc %files -n qvlc
...@@ -882,6 +922,7 @@ rm -fr %buildroot ...@@ -882,6 +922,7 @@ rm -fr %buildroot
%doc README %doc README
%_libdir/vlc/gui/libqt_plugin.so %_libdir/vlc/gui/libqt_plugin.so
%_bindir/qvlc %_bindir/qvlc
%if !%buildfor_rh80
%_menudir/qvlc %_menudir/qvlc
%_miconsdir/qvlc.png %_miconsdir/qvlc.png
%_iconsdir/qvlc.png %_iconsdir/qvlc.png
...@@ -891,12 +932,14 @@ rm -fr %buildroot ...@@ -891,12 +932,14 @@ rm -fr %buildroot
%postun -n qvlc %postun -n qvlc
%clean_menus %clean_menus
%endif %endif
%endif
%if %with_kde %if %with_kde
%files -n kvlc %files -n kvlc
%doc README %doc README
%_libdir/vlc/gui/libkde_plugin.so %_libdir/vlc/gui/libkde_plugin.so
%_bindir/kvlc %_bindir/kvlc
%if !%buildfor_rh80
%_menudir/kvlc %_menudir/kvlc
%_miconsdir/kvlc.png %_miconsdir/kvlc.png
%_iconsdir/kvlc.png %_iconsdir/kvlc.png
...@@ -906,6 +949,7 @@ rm -fr %buildroot ...@@ -906,6 +949,7 @@ rm -fr %buildroot
%postun -n kvlc %postun -n kvlc
%clean_menus %clean_menus
%endif %endif
%endif
%if %with_ncurses %if %with_ncurses
%files plugin-ncurses %files plugin-ncurses
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment