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 @@
%define with_dvdplay 1
%define with_mozilla 0
%define with_mozilla 1
%define with_gtk 1
%define with_gnome 1
%define with_qt 0
......@@ -44,10 +44,18 @@
%define with_slp 1
## by default we build for MandrakeCooker
%define buildfor_rh80 0
%define buildfor_mdk82 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
%if %buildfor_mdk82 || %buildfor_mdk90 || %buildfor_rh80
%define libname lib%name%libmajor
......@@ -61,7 +69,15 @@
%define configure2_5x CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr
%define make %__make
%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.
%define with_ggi 0
%define with_dvb 0
%define with_slp 0
%define with_mozilla 0
# without
......@@ -142,6 +158,8 @@ Requires: vlc-plugin-a52
BuildRoot: %_tmppath/%name-%version-%release-root
# for redhat system, NO buildrequires. rh sux
%if !%buildfor_rh80
%if %with_mozilla
Buildrequires: mozilla-devel
......@@ -162,7 +180,6 @@ Buildrequires: libncurses5-devel
%if %with_wx
Buildrequires: wxGTK-devel
%if %with_lirc
Buildrequires: liblirc-devel
......@@ -199,6 +216,12 @@ Buildrequires: liba52dec-devel
%if %with_ffmpeg
Buildrequires: libffmpeg-devel
%if %with_dvdplay
BuildRequires: libdvdplay-devel
%if %with_dvb
BuildRequires: libdvbpsi-devel
%if %with_alsa
Buildrequires: libalsa2-devel
......@@ -214,6 +237,7 @@ Buildrequires: libarts-devel
Buildrequires: libopenslp-devel
%endif #no buildrequires for rh systems.
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.
Summary: A multimedia plugin for Mozilla, based on vlc
group: Video
Requires: %name = %version-%release
%{expand: %%define mozve %(rpm -q mozilla| sed 's/mozilla-\([0-9].*\)-.*$/\1/')}
Requires: mozilla = %mozve
%description -n mozilla-plugin-vlc
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
......@@ -481,7 +507,11 @@ the VLC media player.
# yves 0.4.0-1mdk
# 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)
%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#'
export QTDIR=%{_libdir}/qt3
# mandrake kernel specific
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}"
rm -f %buildroot
rm -fr %buildroot
%find_lang %name
install -d %buildroot/%_mandir/man1
......@@ -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
rm -f %pngdir/*
%if %buildfor_rh80
rm -fr %buildroot/%_menudir
rm -fr %buildroot/%_iconsdir
%if !%buildfor_rh80
rm -fr %buildroot
......@@ -817,10 +853,12 @@ rm -fr %buildroot
%dir %_libdir/vlc/visualization
%if !%buildfor_rh80
%files -n %libname-devel
......@@ -836,9 +874,7 @@ rm -fr %buildroot
%files -n mozilla-plugin-vlc
# FIXME: seems to be mozilla-version/plugin on Mandrake
#%dir %_libdir/mozilla
# intf plugins
......@@ -849,6 +885,7 @@ rm -fr %buildroot
%if !%buildfor_rh80
......@@ -858,6 +895,7 @@ rm -fr %buildroot
%postun -n gvlc
%if %with_gnome
%files -n gnome-vlc
......@@ -866,6 +904,7 @@ rm -fr %buildroot
%if !%buildfor_rh80
......@@ -875,6 +914,7 @@ rm -fr %buildroot
%postun -n gnome-vlc
%if %with_qt
%files -n qvlc
......@@ -882,6 +922,7 @@ rm -fr %buildroot
%if !%buildfor_rh80
......@@ -891,12 +932,14 @@ rm -fr %buildroot
%postun -n qvlc
%if %with_kde
%files -n kvlc
%if !%buildfor_rh80
......@@ -906,6 +949,7 @@ rm -fr %buildroot
%postun -n kvlc
%if %with_ncurses
%files plugin-ncurses
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment