Skip to content

Instantly share code, notes, and snippets.

@un1versal
Last active January 2, 2016 14:09
Show Gist options
  • Save un1versal/8314911 to your computer and use it in GitHub Desktop.
Save un1versal/8314911 to your computer and use it in GitHub Desktop.
Git compile Script For Nvidia based systems like IONS with various Atom CPU's v1 is Nvidia GT9400 v2 is Nvidia GT210 v3 is Nvidia GT430 v4 is Nvidia GT520 v5 is Nvidia GT610 Any Nvidia GPU's base + any CPU type.
#!/bin/bash
###################################################################################
# ___ ___ __ #
# / _ \ / __\ / _\ # #
# / /_\/ / / \ \ # Git Compile Script #
# / /_\\_ / /____ _\ \ _ # Backup Your system before use! #
# \____(_) \____(_) \__/(_) # #
# #
###################################################################################
BUILD_DIR=/home/setup
GIT_DIR=xbmc
LIB_DIR=libnfs
NUMPARAMS=1
if [ $# -lt "$NUMPARAMS" ]
then
echo
echo "Usage: $0 <upgrade / update / libnfs>"
echo
echo "This Script uses https://github.com/xbmc/xbmc (Master official branch)"
echo "This Should be compatible With Ubuntu and variants like XBMCbuntu etc."
echo
echo " -- upgrade = full initial install (setup GIT, build environment (XBMC Master Git repo, compile and install XBMC over existing.)"
echo " -- update = update existing install XBMC GIT COMPILE to up-to-date revision"
echo " -- libnfs = install libnfs - Ubuntu >=12.04 libnfs 1.3.0 or newer is advised, this pulls libnfs-1.8.0.tar.gz source and compiles it."
echo
else
S1="upgrade"
S2="update"
S3="libnfs"
if [ $1 = $S1 ]
then
stop xbmc
apt-get update -y
apt-get install libvdpau-dev ccache autopoint libltdl-dev git-core build-essential gawk pmount libtool nasm yasm automake cmake gperf zip unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound2-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls-dev libxrandr-dev libxrender-dev libxslt1-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev mesa-utils libcdio-dev libsamplerate-dev libmpeg3-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs python-dev libyajl-dev libboost-thread-dev libplist-dev libusb-dev libudev-dev libtinyxml-dev libcap-dev curl swig default-jre libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libbluetooth-dev libbluray-dev libbluray1 libcurl4-gnutls-dev libcwiid-dev libcwiid1 libnfs-dev libpostproc-dev libswscale-dev libva-dev libva-egl1 libva-tpi1 libmp3lame-dev libxslt1-dev libnfs-dev -y -q
mkdir $BUILD_DIR
cd $BUILD_DIR
git clone git://github.com/xbmc/xbmc.git
cd $BUILD_DIR/$GITDIR/
make -C lib/taglib && make -C lib/taglib install ; ldconfig; depmod -a
./bootstrap && ./configure --prefix=/usr --enable-nfs --enable-vdpau --enable-libmp3lame --disable-vaapi --disable-airplay --disable-airtunes --disable-afpclient --disable-pulse --disable-crystalhd && make -j4 && make -C lib/addons/script.module.pil && make install prefix=/usr
start xbmc
else if [ $1 = $S2 ]
then
stop xbmc
cd $BUILD_DIR/$GITDIR/
git clean -xfd && git reset --hard && git pull --rebase origin master
make -C lib/taglib && make -C lib/taglib install ; ldconfig; depmod -a
./bootstrap && ./configure --prefix=/usr --enable-nfs --enable-vdpau --enable-libmp3lame --disable-vaapi --disable-airplay --disable-airtunes --disable-afpclient --disable-pulse --disable-crystalhd && make -j4 && make install prefix=/usr
start xbmc
else if [ $1 = $S3 ]
then
mkdir -p $BUILD_DIR/$LIB_DIR && cd $BUILD_DIR/$LIB_DIR
wget https://gist.github.com/uNiversaI/8350279/raw -O /home/setup/libnfs/Makefile
cd /home
make -C setup/libnfs && make -C setup/libnfs install
echo
echo "Compiled and installed libnfs-1.8.0 successfully!"
echo
else
echo
echo "Usage: $0 <upgrade / update / libnfs>"
echo
echo " -- upgrade = full initial install (setup GIT, build environment (XBMC Master Git repo, compile and install XBMC over existing.)"
echo " -- update = update existing install XBMC GIT COMPILE to up-to-date revision"
echo " -- libnfs = install libnfs - Ubuntu >=12.04 libnfs 1.3.0 or newer is advised, this pulls libnfs-1.8.0.tar.gz source and compiles it."
echo
fi
fi
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment