SPECS: ffmpeg.spec - invent some gateway to pass allcodecs.c/allfo...
glen
glen at pld-linux.org
Tue Feb 19 01:01:56 CET 2008
Author: glen Date: Tue Feb 19 00:01:56 2008 GMT
Module: SPECS Tag: HEAD
---- Log message:
- invent some gateway to pass allcodecs.c/allformats.c info to mplayer; rel 2
---- Files affected:
SPECS:
ffmpeg.spec (1.156 -> 1.157)
---- Diffs:
================================================================
Index: SPECS/ffmpeg.spec
diff -u SPECS/ffmpeg.spec:1.156 SPECS/ffmpeg.spec:1.157
--- SPECS/ffmpeg.spec:1.156 Mon Feb 11 23:41:08 2008
+++ SPECS/ffmpeg.spec Tue Feb 19 01:01:50 2008
@@ -9,7 +9,7 @@
#
%define _snap 2008-01-31
%define snap %(echo %{_snap} | tr -d -)
-%define _rel 1
+%define _rel 2
Summary: Realtime audio/video encoder and streaming server
Summary(pl.UTF-8): Koder audio/wideo czasu rzeczywistego oraz serwer strumieni
Name: ffmpeg
@@ -205,6 +205,59 @@
%patch2 -p0
%endif
+# package the grep result for mplayer, the result formatted as mplayer/configure
+cat <<EOF > ffmpeg-config
+#! /bin/sh
+_libavdecoders_all="`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
+_libavencoders_all="`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
+_libavparsers_all="`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
+_libavbsfs_all="`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
+_libavdemuxers_all="`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`"
+_libavmuxers_all="`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`"
+_libavprotocols_all="`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`"
+EOF
+cat <<'EOF' >> ffmpeg-config
+
+case "$1" in
+--decoders)
+ echo $_libavdecoders_all
+ ;;
+--encoders)
+ echo $_libavencoders_all
+ ;;
+--parsers)
+ echo $_libavparsers_all
+ ;;
+--bsfs)
+ echo $_libavbsfs_all
+ ;;
+--demuxers)
+ echo $_libavdemuxers_all
+ ;;
+--muxers)
+ echo $_libavmuxers_all
+ ;;
+--protocols)
+ echo $_libavprotocols_all
+ ;;
+*)
+ cat <<USAGE
+Usage: $0 [OPTION]
+Options:
+ --decoders
+ --encoders
+ --parsers
+ --bsfs
+ --demuxers
+ --muxers
+ --protocols
+USAGE
+ exit 1;;
+esac
+
+exit 0
+EOF
+
%build
# notes:
# - it's not autoconf configure
@@ -264,6 +317,11 @@
install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
+# install as ffmpeg-avconfig to avoid with possible programs looking for
+# ffmpeg-config and expecting --libs output from it which is not implemented
+# simple to do (by querying pkgconfig), but why?
+install ffmpeg-config $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -326,6 +384,7 @@
%attr(755,root,root) %{_libdir}/libavutil.so
%attr(755,root,root) %{_libdir}/libpostproc.so
%attr(755,root,root) %{_libdir}/libswscale.so
+%attr(755,root,root) %{_bindir}/ffmpeg-avconfig
%{_includedir}/ffmpeg
%{_includedir}/postproc
%{_pkgconfigdir}/*.pc
@@ -361,6 +420,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.157 2008-02-19 00:01:50 glen
+- invent some gateway to pass allcodecs.c/allformats.c info to mplayer; rel 2
+
Revision 1.156 2008-02-11 22:41:08 qboosh
- a52bin patch, liba52 options and a52dec BR dropped - use native ac3 decoder
- AMR support needs --enable-nonfree (and produces non-distributable package)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/ffmpeg.spec?r1=1.156&r2=1.157&f=u
More information about the pld-cvs-commit
mailing list