SPECS: dshowserver.spec - build 32bit binary in x8664 (using multilib) - fo...

sparky sparky at pld-linux.org
Mon Nov 3 13:20:12 CET 2008


Author: sparky                       Date: Mon Nov  3 12:20:12 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- build 32bit binary in x8664 (using multilib)
- forcing static on x8664 is pointless
- use config.mak file instead of command line

---- Files affected:
SPECS:
   dshowserver.spec (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SPECS/dshowserver.spec
diff -u SPECS/dshowserver.spec:1.6 SPECS/dshowserver.spec:1.7
--- SPECS/dshowserver.spec:1.6	Mon Nov  3 10:50:18 2008
+++ SPECS/dshowserver.spec	Mon Nov  3 13:20:07 2008
@@ -3,10 +3,6 @@
 %bcond_with	static	# static package for use with x86_64 systems
 #
 
-%ifarch %{x8664}
-%define		with_static	1
-%endif
-
 %define		svn			82
 %define		rel			0.1
 Summary:	Win32 CoreAVC H.264 codec helper
@@ -21,11 +17,22 @@
 Patch0:		%{name}-codecspath.patch
 Patch1:		%{name}-optflags.patch
 URL:		http://code.google.com/p/coreavc-for-linux/
+%ifarch %{x8664}
+BuildRequires:	gcc-multilib
+%{?with_static:BuildRequires:     glibc-static(i686)}
+%else
 %{?with_static:BuildRequires:     glibc-static}
+%endif
 BuildRequires:	rpmbuild(macros) >= 1.453
 BuildRequires:	sed >= 4.0
+ExclusiveArch:	%{ix86} %{x8664}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		x8664_flags	-m32
+%define		specflags_x86_64 %{x8664_flags}
+%define		specflags_amd64	%{x8664_flags}
+%define		specflags_ia32e	%{x8664_flags}
+
 %description
 CoreAVC is a proprietary Windows codec for H.264 video decoding. It is
 much faster than any currently available open-source codecs. Being
@@ -70,10 +77,19 @@
 %endif
 
 %build
-%{__make} -C dshowserver \
-	CC="%{__cc}" \
-	OPTFLAGS="%{rpmcflags}" \
-	%{?with_static:STATIC=1}
+cat << 'EOF' > config.mak
+override CC = %{__cc}
+override OPTFLAGS = %{rpmcflags}
+override LDFLAGS = %{rpmldflags}
+
+%{?with_static:STATIC = 1}
+
+AR = ar
+RANLIB = ranlib
+OBJDIR = ../objs
+EOF
+
+%{__make} -C dshowserver
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -100,6 +116,11 @@
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 $Log$
+Revision 1.7  2008/11/03 12:20:07  sparky
+- build 32bit binary in x8664 (using multilib)
+- forcing static on x8664 is pointless
+- use config.mak file instead of command line
+
 Revision 1.6  2008/11/03 09:50:18  glen
 - don't use svn rev as version
 - macros cleanup, possible gcc 3.3 buildfixes
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/dshowserver.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list