#
# TODO: only lzo 1.x is supported
+# - cleanup 3GPP AMR stuff (we probably do not need amr nb fixed point
+# source)
+# - make mplayer play .3gp mobile phone movies (ffplay plays them, but
+# mplayer do not see libavcodec amr_nb provided codec - probably some
+# mplayer conf will do the job)
+# - revert amr bcond when done
#
# Conditional build:
%bcond_without imlib2 # don't build imlib2 vhook module
%bcond_without autoreqdep # don't care about package name deps generated by rpm
+%bcond_with amr # build with 3GPP Adaptive Multi Rate (AMR) speech codec
#
%define snap 20060129
%define _rel 8.7
Source1: ffserver.init
Source2: ffserver.sysconfig
Source3: ffserver.conf
+%if %{with amr}
+# AMR WB FLOAT
+#Source4: http://www.3gpp.org/ftp/Specs/latest/Rel-6/26_series/26204-600.zip
+#Source4: http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip
+Source4: http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26204-530.zip
+# Source4-md5: 988060bdb18b5d64b8bd82c3507d2420
+# AMR NB FIXED POINT
+#Source5: http://www.3gpp.org/ftp/Specs/latest/Rel-6/26_series/26073-600.zip
+Source5: http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-530.zip
+# Source5-md5: 705f6993fbf890e92eb7a331e7c716d1
+# AMR NB FLOAT
+#Source6: http://www.3gpp.org/ftp/Specs/latest/Rel-6/26_series/26104-610.zip
+Source6: http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-540.zip
+# Source6-md5: 4dcbeb2bc28bf86e7131fe4cae3e0dec
+%endif
+
Patch0: %{name}-libtool.patch
Patch1: %{name}-libdir.patch
Patch2: %{name}-gcc4.patch
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%if %{with amr}
+cd libavcodec
+mkdir amrwb_float
+mkdir amr
+mkdir amr_float
+# put 26204-xxx.zip into libavcodec/amrwb_float
+cd amrwb_float
+unzip -j %{SOURCE4}
+unzip -j 26204-530_ANSI-C_source_code.zip
+# put 26073-xxx.zip into libavcodec/amr
+cd ../amr
+unzip -j %{SOURCE5}
+unzip -j 26073-530_ANSI_C_source_code.zip
+# put 26104-xxx.zip into libavcodec/amr_float
+cd ../amr_float
+unzip -j %{SOURCE6}
+unzip -j 26104-540_ANSI_C_source_code.zip
+cd ../..
+%endif
%build
# notes:
%endif
%ifarch i386 i486
--disable-mmx \
+%endif
+%if %{with amr}
+ --enable-amr_nb \
+ --enable-amr_wb \
%endif
--cc="%{__cc}" \
--extra-cflags="%{rpmcflags}" \