Compile icecast in the Unix-Like Environment: Difference between revisions

From TestingMediawiki
Jump to navigation Jump to search
mNo edit summary
m (Reverted edit of 192.44.60.146, changed back to last version by AndCycle)
 
(20 intermediate revisions by 4 users not shown)
Line 1: Line 1:
暫存:在 *nix 下編譯 icecast 麻瓜用教學 ( 作者 AndCycle )
這兒是說明如何在 *nix 下編譯 icecast 的麻瓜用 shellscript ,文件及 [[Shellscript]] 的編寫者為 [[User:AndCycle|AndCycle]] 。


<pre style="overflow:auto;width:80%;"><nowiki>
(註:整組編譯完的空間約需200MB e_e )
 
----
 
==Contents of Shellscript==
 
<pre><nowiki>
#!/bin/bash
#!/bin/bash


Line 10: Line 16:
cd install
cd install
installPath=`pwd`
installPath=`pwd`
cd ..
cd $testCompilePath


gragAndUntar ()
gragAndUntar ()
{
{
echo "grab $1"
if wget $1
if wget $1
then echo "grab $1"
then echo "Done"
else exit 1
else exit 1
fi
fi
if tar --extract --ungzip --file --verbose $2
echo "untar $1"
then echo "untar $1"
if tar --extract --ungzip --file $2
then echo "Done"
else exit 1
else exit 1
fi
fi
}
}


gragAndUntar "ftp://xmlsoft.org/libxml2-2.6.17.tar.gz" "libxml2-2.6.17.tar.gz"
gragAndUntar "http://curl.haxx.se/download/curl-7.14.1.tar.gz" "curl-7.14.1.tar.gz"
gragAndUntar "ftp://xmlsoft.org/libxslt-1.1.12.tar.gz" "libxslt-1.1.12.tar.gz"
gragAndUntar "ftp://xmlsoft.org/libxml2-2.6.22.tar.gz" "libxml2-2.6.22.tar.gz"
gragAndUntar "http://www.libsdl.org/release/SDL-1.0.8.tar.gz" "SDL-1.0.8.tar.gz"
gragAndUntar "ftp://xmlsoft.org/libxslt-1.1.15.tar.gz" "libxslt-1.1.15.tar.gz"
gragAndUntar "http://www.vorbis.com/files/1.0.1/unix/libogg-1.1.tar.gz" "libogg-1.1.tar.gz"
gragAndUntar "http://www.libsdl.org/release/SDL-1.2.9.tar.gz" "SDL-1.2.9.tar.gz"
gragAndUntar "http://www.vorbis.com/files/1.0.1/unix/libvorbis-1.0.1.tar.gz" "libvorbis-1.0.1.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/ogg/libogg-1.1.2.tar.gz" "libogg-1.1.2.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/theora/libtheora-1.0alpha4.tar.gz" "libtheora-1.0alpha4.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.1.tar.gz" "libvorbis-1.1.1.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/icecast/icecast-2.2.0.tar.gz" "icecast-2.2.0.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/theora/libtheora-1.0alpha5.tar.gz" "libtheora-1.0alpha5.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/icecast/icecast-2.3.1.tar.gz" "icecast-2.3.1.tar.gz"
gragAndUntar "http://www.oberhumer.com/opensource/ucl/download/ucl-1.03.tar.gz" "ucl-1.03.tar.gz"
gragAndUntar "http://upx.sourceforge.net/download/upx-1.25-src.tar.gz" "upx-1.25-src.tar.gz"


makeInstall ()
makeInstall ()
{
{
echo "working in $1"
if cd $1
if cd $1
then echo "working in $1"
then echo "Done"
else exit 1
else exit 1
fi
fi
echo "configure $1"
if ./configure $2
if ./configure $2
then echo "configured $1"
then echo "Done"
else exit 1
else exit 1
fi
fi
if [ -z "$3" ]
echo "make $1"
if [ "$3" ]
then
then
if make $3
if make $3
then echo "maked $1"
then echo "Done"
else exit 1
else exit 1
fi
fi
else
else
if make
if make
then echo "maked $1"
then echo "Done"
else exit 1
else exit 1
fi
fi
fi
fi
echo "make installe $1"
if make install
if make install
then echo "make installed $1"
then echo "Done"
else exit 1
else exit 1
fi
fi
Line 61: Line 76:
}
}


makeInstall "libxml2-2.6.17" "--prefix=$installPath"
makeInstall "curl-7.14.1" "--prefix=$installPath"
makeInstall "libxslt-1.1.12" "--prefix=$installPath --with-libxml-prefix=$installPath"
makeInstall "libxml2-2.6.22" "--prefix=$installPath"
makeInstall "libxslt-1.1.15" "--prefix=$installPath --with-libxml-prefix=$installPath"
makeInstall "SDL-1.2.9" "--prefix=$installPath"
makeInstall "libogg-1.1.2" "--prefix=$installPath"
makeInstall "libvorbis-1.1.1" "--prefix=$installPath --with-ogg=$installPath --disable-oggtest"
makeInstall "libtheora-1.0alpha5" "--prefix=$installPath --with-ogg=$installPath --with-vorbis=$installPath --with-sdl-prefix=$installPath --disable-oggtest --disable-vorbistest --disable-sdltest"
 
#icecast need blablabla-config executable
cd libxslt-1.1.15
chmod +x xslt-config
cd $testCompilePath
cd curl-7.14.1
chmod +x curl-config
cd $testCompilePath


#SDL don't like make -j 4
makeInstall "icecast-2.3.1" "--prefix=$installPath --with-xslt-config=$testCompilePath/libxslt-1.1.15/xslt-config --with-curl-config=$testCompilePath/curl-7.14.1/curl-config --with-vorbis=$installPath --with-theora=$installPath" "static"
makeInstall "SDL-1.0.8" "--prefix=$installPath"


makeInstall "libogg-1.1" "--prefix=$installPath"
cp $installPath/bin/icecast $testCompilePath
makeInstall "libvorbis-1.0.1" "--prefix=$installPath --with-ogg=$installPath --disable-oggtest"
makeInstall "libtheora-1.0alpha4" "--prefix=$installPath --with-ogg=$installPath --with-vorbis=$installPath --with-sdl-prefix=$installPath --disable-oggtest --disable-vorbistest --disable-sdltest"


#icecast need xslt-config executable
makeInstall "ucl-1.03" "--prefix=$installPath"
cd libxslt-1.1.12
cd ucl-1.03
chmod +x xslt-config
export UCLDIR=`pwd`
cd $testCompilePath
cd upx-1.25
cd src
make
chmod 755 upx
./upx -9 $testCompilePath/icecast
cd $testCompilePath
cd $testCompilePath
makeInstall "icecast-2.2.0" "--prefix=$installPath --with-xslt-config=$testCompilePath/libxslt-1.1.12/xslt-config --with-vorbis=$installPath --with-theora=$installPath" "static"


cp $installPath/bin/icecast ../
mkdir build
cd ..
cd build
rm -R -f $testCompilePath
cp --recursive $installPath/share/icecast/* ./
mv $testCompilePath/icecast ./
echo "we have done all the need in testCompile/build directory."
 


</nowiki></pre>
</nowiki></pre>
{{Menu:Category|Radio|Computer|AndCycle}}

Latest revision as of 04:00, 28 February 2006

這兒是說明如何在 *nix 下編譯 icecast 的麻瓜用 shellscript ,文件及 Shellscript 的編寫者為 AndCycle

(註:整組編譯完的空間約需200MB e_e )


Contents of Shellscript

#!/bin/bash

mkdir testCompile
cd testCompile
testCompilePath=`pwd`
mkdir install
cd install
installPath=`pwd`
cd $testCompilePath

gragAndUntar ()
{
	echo "grab $1"
	if wget $1
	then echo "Done"
	else exit 1
	fi
	echo "untar $1"
	if tar --extract --ungzip --file $2
	then echo "Done"
	else exit 1
	fi
}

gragAndUntar "http://curl.haxx.se/download/curl-7.14.1.tar.gz" "curl-7.14.1.tar.gz"
gragAndUntar "ftp://xmlsoft.org/libxml2-2.6.22.tar.gz" "libxml2-2.6.22.tar.gz"
gragAndUntar "ftp://xmlsoft.org/libxslt-1.1.15.tar.gz" "libxslt-1.1.15.tar.gz"
gragAndUntar "http://www.libsdl.org/release/SDL-1.2.9.tar.gz" "SDL-1.2.9.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/ogg/libogg-1.1.2.tar.gz" "libogg-1.1.2.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.1.tar.gz" "libvorbis-1.1.1.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/theora/libtheora-1.0alpha5.tar.gz" "libtheora-1.0alpha5.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/icecast/icecast-2.3.1.tar.gz" "icecast-2.3.1.tar.gz"
gragAndUntar "http://www.oberhumer.com/opensource/ucl/download/ucl-1.03.tar.gz" "ucl-1.03.tar.gz"
gragAndUntar "http://upx.sourceforge.net/download/upx-1.25-src.tar.gz" "upx-1.25-src.tar.gz"

makeInstall ()
{
	echo "working in $1"
	if cd $1
	then echo "Done"
	else exit 1
	fi
	echo "configure $1"
	if ./configure $2
	then echo "Done"
	else exit 1
	fi
	echo "make $1"
	if [ "$3" ]
	then
		if make $3
		then echo "Done"
		else exit 1
		fi
	else
		if make
		then echo "Done"
		else exit 1
		fi
	fi
	echo "make installe $1"
	if make install
	then echo "Done"
	else exit 1
	fi
	cd $testCompilePath
}

makeInstall "curl-7.14.1" "--prefix=$installPath"
makeInstall "libxml2-2.6.22" "--prefix=$installPath"
makeInstall "libxslt-1.1.15" "--prefix=$installPath --with-libxml-prefix=$installPath"
makeInstall "SDL-1.2.9" "--prefix=$installPath"
makeInstall "libogg-1.1.2" "--prefix=$installPath"
makeInstall "libvorbis-1.1.1" "--prefix=$installPath --with-ogg=$installPath --disable-oggtest"
makeInstall "libtheora-1.0alpha5" "--prefix=$installPath --with-ogg=$installPath --with-vorbis=$installPath --with-sdl-prefix=$installPath --disable-oggtest --disable-vorbistest --disable-sdltest"

#icecast need blablabla-config executable
cd libxslt-1.1.15
chmod +x xslt-config
cd $testCompilePath
cd curl-7.14.1
chmod +x curl-config
cd $testCompilePath

makeInstall "icecast-2.3.1" "--prefix=$installPath --with-xslt-config=$testCompilePath/libxslt-1.1.15/xslt-config --with-curl-config=$testCompilePath/curl-7.14.1/curl-config --with-vorbis=$installPath --with-theora=$installPath" "static"

cp $installPath/bin/icecast $testCompilePath

makeInstall "ucl-1.03" "--prefix=$installPath"
cd ucl-1.03
export UCLDIR=`pwd`
cd $testCompilePath
cd upx-1.25
cd src
make
chmod 755 upx
./upx -9 $testCompilePath/icecast
cd $testCompilePath

mkdir build
cd build
cp --recursive $installPath/share/icecast/* ./
mv $testCompilePath/icecast ./
echo "we have done all the need in testCompile/build directory."




  • Top Page: Radio, Computer,
  • Next Page: , Previous Page:
  • Main article Author or Maintainer for this page: AndCycle
  • Other Author(s) or Maintainer(s):