forked from mirrors/nixpkgs
iLBC codec. Extract directly from rfc
svn path=/nixpkgs/trunk/; revision=27374
This commit is contained in:
parent
92db687bf4
commit
8c12f7f6e9
11
pkgs/development/libraries/ilbc/CMakeLists.txt
Normal file
11
pkgs/development/libraries/ilbc/CMakeLists.txt
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
project(ilbc)
|
||||||
|
|
||||||
|
file(GLOB ilbc_SRCS *.c)
|
||||||
|
file(GLOB ilbc_HDRS *.h)
|
||||||
|
|
||||||
|
add_library(ilbc SHARED ${ilbc_SRCS})
|
||||||
|
|
||||||
|
install(TARGETS ilbc DESTINATION lib)
|
||||||
|
install(FILES ${ilbc_HDRS} DESTINATION include/ilbc)
|
|
@ -1,16 +1,26 @@
|
||||||
{ stdenv, msilbc }:
|
{ stdenv, fetchurl, gawk, cmake }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
name = "ilbc-rfc3951";
|
name = "ilbc-rfc3951";
|
||||||
|
|
||||||
# I'm too lazy to extract .c source from rfc3951. So, I'm using autotools stuff
|
script = fetchurl {
|
||||||
# from linphone project
|
url = http://ilbcfreeware.org/documentation/extract-cfile.awk;
|
||||||
src = stdenv.mkDerivation {
|
sha256 = "155izy7p7azak1h6bgafvh84b1605zyw14k2s4pyl5nd4saap5c6";
|
||||||
name = "ilbc-rfc3951.tar.gz";
|
|
||||||
src = msilbc.src;
|
|
||||||
outputHashAlgo = "sha256";
|
|
||||||
outputHash = "0f6scsp72bz2ifscd8c0x57ipcxi2i4a9b4nwlnwx7a7a0hrazhj";
|
|
||||||
phases = "unpackPhase installPhase";
|
|
||||||
installPhase = "cp ilbc-rfc3951.tar.gz \${out}";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
rfc3951 = fetchurl {
|
||||||
|
url = http://www.ietf.org/rfc/rfc3951.txt;
|
||||||
|
sha256 = "0zf4mvi3jzx6zjrfl2rbhl2m68pzbzpf1vbdmn7dqbfpcb67jpdy";
|
||||||
|
};
|
||||||
|
|
||||||
|
cmakeLists = ./CMakeLists.txt;
|
||||||
|
buildNativeInputs = [ cmake ];
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
mkdir -v ${name}
|
||||||
|
cd ${name}
|
||||||
|
${gawk}/bin/gawk -f ${script} ${rfc3951}
|
||||||
|
cp -v ${cmakeLists} CMakeLists.txt
|
||||||
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue