Created
May 10, 2011 16:27
-
-
Save andis/964825 to your computer and use it in GitHub Desktop.
compile an mp3/alsa-enabled darkice in the current directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wd=$PWD | |
pf="$wd/local" | |
get () { | |
local url=$1 | |
local md5=$2 | |
local name=$3 | |
[ "$(md5sum $name)" = "$md5 $name" ] || curl -L $url -o $name | |
} | |
mm () { | |
local tn=${1} | |
local dn=${2} | |
local prefix=${3} | |
local co=$4 | |
local hook=${5} | |
tar -xzf $tn || tar -xjf $tn | |
pushd $dn | |
[ -n "${hook}" ] && sh -c "${hook}" | |
./configure --prefix=$prefix $co | |
make -j3 | |
make install | |
popd | |
} | |
get 'http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz/download' 8e9866ad6b570c6c95c8cba48060473f 'l.tar.gz' | |
get 'http://darkice.googlecode.com/files/darkice-1.0.tar.gz' 1804e63d42a9703d01fe378c9a77c473 'd.tar.gz' | |
get 'ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.24.1.tar.bz2' 7cc05f25e1d5b65da8fb3fdcd540f226 'a.tar.bz2' | |
mm l.tar.gz lame* $pf | |
mm a.tar.bz2 alsa* $pf | |
mm d.tar.gz darkice-* $pf "--with-lame-prefix=$pf --with-alsa-prefix=$pf" "sed -ie '1i #include <cstdio>' src/SerialUlaw.cpp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment