SPECS: mplayer.spec - separate gmplayer and mencoder to subpackage...

glen glen at pld-linux.org
Mon Sep 26 00:31:53 CEST 2005


Author: glen                         Date: Sun Sep 25 22:31:53 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- separate gmplayer and mencoder to subpackages, -common package created for sharing common portions
- skin dropped, as those are available from mplayer-skins.spec

---- Files affected:
SPECS:
   mplayer.spec (1.300 -> 1.301) 

---- Diffs:

================================================================
Index: SPECS/mplayer.spec
diff -u SPECS/mplayer.spec:1.300 SPECS/mplayer.spec:1.301
--- SPECS/mplayer.spec:1.300	Fri Sep 16 12:37:25 2005
+++ SPECS/mplayer.spec	Mon Sep 26 00:31:47 2005
@@ -6,20 +6,14 @@
 #
 # Conditional build:
 %bcond_with	directfb	# with DirectFB video output
-%bcond_with	divx4linux	# with divx4linux a/v support (binaries, instead
-				#  of included OpenDivx)
-
+%bcond_with	divx4linux	# with divx4linux a/v support (binaries, instead of included OpenDivx)
 %bcond_with	dxr3		# enable use of DXR3/H+ hardware MPEG decoder
 %bcond_with	ggi		# with ggi video output
 %bcond_with	nas		# with NAS audio output
 %bcond_with	svga		# with svgalib video output
 %bcond_with	osd		# with osd menu support
-
-%bcond_with	altivec		# with altivec support (won't run w/o altivec
-				# due to instruction used in CPU detection(?))
-
+%bcond_with	altivec		# with altivec support (won't run w/o altivec due to instruction used in CPU detection(?))
 %bcond_with	xmms		# with XMMS inputplugin support
-
 %bcond_without	aalib		# without aalib video output
 %bcond_without	jack		# without JACKD support
 %bcond_without	alsa		# without ALSA audio output
@@ -36,21 +30,20 @@
 %bcond_without	quicktime	# without binary quicktime dll support
 %bcond_without	real		# without Real* 8/9 codecs support
 %bcond_without	runtime		# disable runtime cpu detection, just detect CPU
-				#  in compile time (advertised by mplayer
-				#  authors as working faster); in this case
-				#  mplayer may not work on machine other then
-				#  where it was compiled
-%bcond_without	select		# disable audio select() support (for example
-				# required this option ALSA or Vortex2 driver)
+				#  in compile time (advertised by mplayer authors as working faster); in this case
+				#  mplayer may not work on machine other then where it was compiled
+%bcond_without	select		# disable audio select() support (for example required this option ALSA or Vortex2 driver)
 %bcond_without	smb		# disable Samba (SMB) input support
 %bcond_without	theora		# without theora support
 %bcond_without	win32		# without win32 codecs support
 %bcond_without	vorbis		# without Ogg-Vorbis audio support
 %bcond_without	mencoder	# disable mencoder (a/v encoder) compilation
 %bcond_without	libdts		# disable libdts support
-
+%bcond_without	sdl			# disable SDL
+%bcond_without	docs		# don't build docs (slow)
 %bcond_with	gtk2		# EXPERIMENTAL support for GTK+ version 2
 %bcond_with	xlibs
+%bcond_with	shared	# experimental libmplayer.so support
 
 %ifnarch %{ix86}
 %undefine	with_win32
@@ -65,14 +58,19 @@
 
 %define		pre		pre7try2
 
-Summary:	Yet another movie player
+%ifarch %{x8664}
+%undefine	with_runtime
+%endif
+
+Summary:	MPlayer is THE Movie Player for UN*X.
 Summary(es):	Otro reproductor de películas
 Summary(ko):	¸Ž´Ş˝şżë šĚľđžîÇášŔĚžî
 Summary(pl):	Jeszcze jeden odtwarzacz filmów
 Summary(pt_BR):	Reprodutor de filmes
 Name:		mplayer
 Version:	1.0
-Release:	2.%{pre}.3
+%define	_rel 3.11
+Release:	2.%{pre}.%{_rel}
 # DO NOT increase epoch unless it's really neccessary!
 # especially such changes like pre7->pre7try2, increase Release instead!
 # PS: $ rpmvercmp pre7try2 pre7
@@ -90,8 +88,6 @@
 %endif
 Source3:	ftp://ftp1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
 # Source3-md5:	7b47904a925cf58ea546ca15f3df160c
-Source4:	ftp://ftp2.mplayerhq.hu/MPlayer/Skin/Blue-1.4.tar.bz2
-# Source4-md5:	05dd8e4f11a715c9e5d2abf1cdeb907c
 Source5:	g%{name}.desktop
 Source6:	ftp://ftp2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
 # Source6-md5:	1ecd31d17b51f16332b1fcc7da36b312
@@ -111,10 +107,11 @@
 Patch11:	%{name}-bio2jack.patch
 Patch12:	%{name}-x86_64-detection.patch
 Patch13:	%{name}-mythtv.patch
+Patch14:	%{name}-shared.patch
 URL:		http://www.mplayerhq.hu/
 %{?with_directfb:BuildRequires:	DirectFB-devel}
 BuildRequires:	OpenGL-devel
-BuildRequires:	SDL-devel >= 1.1.7
+%{?with_sdl:BuildRequires:	SDL-devel >= 1.1.7}
 %if %{with xlibs}
 BuildRequires:	libXv-devel
 %else
@@ -163,6 +160,7 @@
 %{?with_xmms:BuildRequires:	xmms-libs}
 BuildRequires:	xvid-devel >= 1:0.9.0
 BuildRequires:	zlib-devel
+Requires:	%{name}-common = %{epoch}:%{version}-%{release}
 Requires(post,postun):	/sbin/ldconfig
 Requires:	OpenGL
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -226,6 +224,32 @@
 áudio. Diferentes mecanismos de reproduçăo podem também ser
 escolhidos, incluindo SDL, SVGALib, frame buffer, aalib, X11 e outros.
 
+%package -n gmplayer
+Summary:	MPlayer with GTK+ GUI interface
+Group:		X11/Applications/Multimedia
+Provides:	%{name} = %{epoch}:%{version}-%{release}
+Requires:	%{name}-skin
+Requires:	%{name}-common = %{epoch}:%{version}-%{release}
+
+%description -n gmplayer
+MPlayer with GUI GTK+ interface.
+
+%package common
+Summary:	Configuration files and documentation for mplayer.
+Group:		Applications/Multimedia
+Requires:	%{name} = %{epoch}:%{version}-%{release}
+
+%description common
+Configuration files, man page and HTML documentation for mplayer.
+
+%package -n mencoder
+Summary:	MEncoder is a movie encoder for LINUX.
+Group:		Applications/Multimedia
+Requires:	%{name}-common = %{epoch}:%{version}-%{release}
+
+%description -n mencoder
+MEncoder a movie encoder for LINUX and is a part of the MPlayer package.
+
 %prep
 %if %{snapshot}
 %setup -q -n %{name}-%{snap} -a 1 -a 3 -a 6
@@ -250,6 +274,9 @@
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
+%if %{with shared}
+%patch14 -p1
+%endif
 
 # kill evil file, hackery not needed with llh
 echo > osdep/kerneltwosix.h
@@ -257,10 +284,15 @@
 find . -type d -name CVS -print | xargs rm -rf
 
 %build
-CFLAGS="%{rpmcflags}"
+CFLAGS="%{rpmcflags} -fPIC"
+LDFLAGS="%{rpmldflags} -wl,--as-needed"
 CC="%{__cc}"
 export CC CFLAGS
-./configure \
+
+build() {
+set -x
+	./configure \
+	%{?debug:--enable-debug=3} \
 	--prefix=%{_prefix} \
 	--confdir=%{_sysconfdir}/mplayer \
 	--with-x11incdir=%{_prefix}/X11R6/include \
@@ -284,7 +316,7 @@
 %{?with_divx4linux:--with-extraincdir=/usr/include/divx} \
 %{!?with_dxr3:--disable-dxr3} \
 %{!?with_ggi:--disable-ggi} \
-%{?with_live:--enable-live --with-livelibdir=%{_libdir}/liveMedia --with-extraincdir=/usr/include/liveMedia } \
+%{?with_live:--enable-live --with-livelibdir=%{_libdir}/liveMedia --with-extraincdir=/usr/include/liveMedia} \
 %{!?with_live:--disable-live} \
 %{!?with_nas:--disable-nas} \
 %{!?with_svga:--disable-svga} \
@@ -295,7 +327,6 @@
 %{!?with_arts:--disable-arts} \
 %{!?with_caca:--disable-caca} \
 %{!?with_dshow:--disable-dshow} \
-%{?with_gui:--enable-gui} \
 %{?with_joystick:--enable-joystick} \
 %{!?with_libdv:--disable-libdv} \
 %{!?with_libdts:--disable-libdts} \
@@ -304,8 +335,7 @@
 %{!?with_polyp:--disable-polyp} \
 %{!?with_quicktime:--disable-qtx} \
 %{!?with_real:--disable-real} \
-%{!?with_runtime:--disable-runtime-cpudetection} \
-%{?with_runtime:--enable-runtime-cpudetection} \
+--%{?with_runtime:en}%{!?with_runtime:dis}able-runtime-cpudetection \
 %{!?with_select:--disable-select} \
 %{!?with_smb:--disable-smb} \
 %{!?with_win32:--disable-win32} \
@@ -319,7 +349,7 @@
 	--enable-fbdev \
 	--enable-gl \
 	--enable-mga \
-	--enable-sdl \
+	--%{?with_sdl:en}%{!?with_sdl:dis}able-sdl \
 	--enable-tdfxfb \
 	--enable-vm \
 	--enable-x11 \
@@ -330,11 +360,25 @@
 	--enable-largefiles \
 	--language=all \
 	--with-codecsdir=%{_libdir}/codecs \
-	--enable-dynamic-plugins
+	--enable-dynamic-plugins \
+	"$@"
+
+	%{__make}
+}
 
-%{__make}
+%if %{with gui}
+# build GUI version
+build --enable-gui
+mv -f mplayer gmplayer
+%{__make} clean
+%endif
 
+# now build regular version
+build --disable-gui
+
+%if %{with docs}
 %{__make} -j1 -C DOCS/xml
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -345,7 +389,7 @@
 	$RPM_BUILD_ROOT%{_desktopdir}
 
 # default config files
-awk '/Delete this default/{a++};{if(!a){print}}' etc/example.conf > etc/mplayer.conf
+sed -e '/Delete this default/d' etc/example.conf > etc/mplayer.conf
 install etc/{codecs,mplayer%{?with_osd:,menu},input}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer
 
 # executables
@@ -353,24 +397,25 @@
 install mencoder $RPM_BUILD_ROOT%{_bindir}
 %endif
 install mplayer $RPM_BUILD_ROOT%{_bindir}
-ln -sf mplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer
+%if %{with gui}
+install gmplayer $RPM_BUILD_ROOT%{_bindir}
+%endif
 
 # fonts
 rm -f font-*/runme
 cp -r font-* $RPM_BUILD_ROOT%{_datadir}/mplayer
 ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font
 
-# skin
-bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_datadir}/mplayer/Skin
-mv $RPM_BUILD_ROOT%{_datadir}/mplayer/Skin/Blue $RPM_BUILD_ROOT%{_datadir}/mplayer/Skin/default
-rm -rf $RPM_BUILD_ROOT%{_datadir}/mplayer/Skin/*/CVS
-
 # libraries
 %ifarch %{ix86}
 install libdha/libdha.so.1.0 $RPM_BUILD_ROOT%{_libdir}
 install vidix/drivers/*.so $RPM_BUILD_ROOT%{_libdir}/mplayer/vidix
 %endif
 
+%if %{with gui}
+ln -s Blue $RPM_BUILD_ROOT%{_datadir}/%{name}/Skin/default
+%endif
+
 # X-files
 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
 install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir}
@@ -403,7 +448,35 @@
 
 %files
 %defattr(644,root,root,755)
-%doc DOCS/HTML/en/*.html DOCS/tech %{?with_win32:etc/codecs.win32.conf}
+%attr(755,root,root) %{_bindir}/mplayer
+
+%if %{with gui}
+%files -n gmplayer
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/gmplayer
+%{_desktopdir}/gmplayer.desktop
+%dir %{_datadir}/%{name}/Skin
+%ghost %{_datadir}/%{name}/Skin/default
+%endif
+
+%files -n mencoder
+%defattr(644,root,root,755)
+%doc DOCS/tech/encoding-tips.txt DOCS/tech/swscaler_filters.txt
+%doc DOCS/tech/swscaler_methods.txt DOCS/tech/colorspaces.txt
+%attr(755,root,root) %{_bindir}/mencoder
+
+%files common
+%defattr(644,root,root,755)
+# some useful tech docs
+%doc DOCS/tech/hwac3.txt DOCS/tech/mpsub.sub DOCS/tech/slave.txt
+%doc DOCS/tech/subcp.txt
+
+# HTML and XML-generated docs
+%doc DOCS/HTML/en
+%doc DOCS/tech
+%if %{with win32}
+%doc etc/codecs.win32.conf}
+%endif
 %lang(de) %doc DOCS/de
 %lang(es) %doc DOCS/HTML/es
 %lang(fr) %doc DOCS/HTML/fr
@@ -413,14 +486,13 @@
 %lang(ru) %doc DOCS/HTML/ru
 %lang(zh_CN) %doc DOCS/zh
 %doc README AUTHORS ChangeLog
-%attr(755,root,root) %{_bindir}/*
+
 %ifarch %{ix86}
 %attr(755,root,root) %{_libdir}/libdha.so.*.*
 %attr(755,root,root) %{_libdir}/mplayer
 %endif
-%{_datadir}/mplayer
 %dir %{_sysconfdir}/mplayer
-%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mplayer/*.conf
+%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}/*.conf
 %{_mandir}/man1/*
 %lang(cs) %{_mandir}/cs/man1/*
 %lang(de) %{_mandir}/de/man1/*
@@ -431,11 +503,10 @@
 %lang(pl) %{_mandir}/pl/man1/*
 %lang(sv) %{_mandir}/sv/man1/*
 %lang(zh_CN) %{_mandir}/zh_CN/man1/*
-%if %{with gui}
-%{_desktopdir}/gmplayer.desktop
-%endif
 %{_desktopdir}/mplayer.desktop
 %{_pixmapsdir}/*
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/font*
 
 %define	date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -443,6 +514,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.301  2005/09/25 22:31:47  glen
+- separate gmplayer and mencoder to subpackages, -common package created for sharing common portions
+- skin dropped, as those are available from mplayer-skins.spec
+
 Revision 1.300  2005/09/16 10:37:25  arekm
 - rel 3
 
@@ -452,7 +527,7 @@
 Revision 1.298  2005/09/10 16:09:07  blues
 - release 2 - enable mmx*/sse*/3dnow* on amd64 too... it has these
   extensions for sure. Maybe it's good to disable run-time-detection on
-  that arch? These extensions are always avaible...
+  that arch? These extensions are always available...
   STBR anyway
 
 Revision 1.297  2005/09/08 01:38:35  glen
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/mplayer.spec?r1=1.300&r2=1.301&f=u




More information about the pld-cvs-commit mailing list