wok rev 10942

asterisk: store ilbc sources in src cache
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Aug 29 18:16:24 2011 +0200 (2011-08-29)
parents 9d1bc27242eb
children a18a8903a08d
files asterisk/receipt asterisk/stuff/extract-cfile.awk
line diff
     1.1 --- a/asterisk/receipt	Mon Aug 29 16:41:35 2011 +0200
     1.2 +++ b/asterisk/receipt	Mon Aug 29 18:16:24 2011 +0200
     1.3 @@ -32,8 +32,11 @@
     1.4  	busybox sed -i 's|lua5.1/||' pbx/pbx_lua.c
     1.5  	grep -rsl '^#define AST_PBX_MAX_STACK' * | xargs busybox sed -i \
     1.6  		's/define AST_PBX_MAX_STACK.*/define AST_PBX_MAX_STACK 1024/'
     1.7 -	sed -i 's/| sed .*>/>/' contrib/scripts/get_ilbc_source.sh
     1.8 -	echo '' | contrib/scripts/get_ilbc_source.sh
     1.9 +	[ -s $SOURCES_REPOSITORY/rfc3951.txt ] ||
    1.10 +		wget -P $SOURCES_REPOSITORY http://www.ietf.org/rfc/rfc3951.txt
    1.11 +	cp $SOURCES_REPOSITORY/rfc3951.txt codecs/ilbc
    1.12 +	[ -f codecs/ilbc/iLBC_define.h ] ||
    1.13 +		(cd codecs/ilbc && awk -f $stuff/extract-cfile.awk rfc3951.txt)
    1.14  	busybox sed -i '/codec_ilbc/{ns/no/yes/}' menuselect-tree
    1.15  	./configure \
    1.16  		--prefix=/usr \
    1.17 @@ -57,7 +60,7 @@
    1.18  	cp -a $_pkg/usr/bin $fs/usr
    1.19  	cp -a $_pkg/usr/lib $fs/usr
    1.20  	cp -a $_pkg/usr/sbin $fs/usr
    1.21 -	cp -a $stuff/* $fs
    1.22 +	cp -a $stuff/*/ $fs
    1.23  }
    1.24  
    1.25  # Rules to configure package
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/asterisk/stuff/extract-cfile.awk	Mon Aug 29 18:16:24 2011 +0200
     2.3 @@ -0,0 +1,25 @@
     2.4 +BEGIN { srcname = "nothing"; }
     2.5 +{ if (/^A\.[0-9][0-9]*\.* *[a-zA-Z][a-zA-Z_0-9]*\.[ch]/) {
     2.6 +    if (srcname != "nothing")
     2.7 +      close(srcname);
     2.8 +    srcname = $2;
     2.9 +    printf("creating source file %s\n", srcname);
    2.10 +  }else if (srcname != "nothing") {
    2.11 +    if (/Andersen,* *et* *al\./) 
    2.12 +      printf("skipping %s\n", $0);
    2.13 +    else if (//)
    2.14 +      printf("skipping2 %s\n", $0);
    2.15 +    else if (/Internet Low Bit Rate Codec *December 2004/)
    2.16 +      printf("skipping3 %s\n", $0);
    2.17 +    else if (/Authors' *Addresses/){
    2.18 +      close(srcname);
    2.19 +      exit;}
    2.20 +    else
    2.21 +      print $0 &gt;&gt; srcname;
    2.22 +  }
    2.23 +}
    2.24 +END {
    2.25 +  printf("ending file %s\n", srcname);
    2.26 +  close(srcname);
    2.27 +}
    2.28 +</pre></div></body></html>
    2.29 \ No newline at end of file