makeccc

Solo deben pegar lo de abajo sin comillas en un archivo de texto y guardar como makeccc.

#!/bin/bash
# Compiz/Compcomm makeccc
# Copyright (c) 2007 Franz Rogar <franzrogar@gmail.com>
#
# Based on get-git script by Kristian Lyngstøl
# Copyright (c) 2007 Kristian Lyngstøl <kristian@bohemians.org>
#
# This script has been highly modificated by franzrogar. So quality
# of the original script has been modified. Any issue with present
# script must be asigned to franzrogar, who will report any issue to
# the original author if it can be reproduced with original script.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
#
# This script attempts to get all compcomm/compiz sources you need,
# build them and install them.

# Select packages you want compile/install from the following list:
# NOTES:
# 1 - Compiz will be installed by default, so no need to select it.
# 2 - Packages list order must follow the order you see them listed.
#
# compcomm : bcop, emerald, ccsm & configurators
# ccs-gconf : select if you want gconf backend (optional)
# ccs-kconfig : select if you want kconfig backend (optional)
# emerald : decorator with themes
#
PACKAGES="compcomm ccs-gconf"

# Select plugins you want compile/install from the following list:
#
# addhelper, animation, bench, crasshandler, expo, extrawm, fakedestop
# fakeargb, firepaint, group, jpeg, mblur, neg, opacity, put, reflex
# resizeinfo, ring, screencasting, showdesktop, snap, snow, splash
# text, thumbnail, tile, trailfocus, wall, winrules, zoom
#
# Plugins not selected by default due to they're work-in-progress or
# have known bugs that make them unsuable or unstable:
#
# 3d:
# compiz-scheme:
# screencasting: edit line #122 and change "roico" for your user name
#
CCPLUGINS="addhelper animation bench crashhandler expo extrawm fadedesktop fakeargb firepaint group jpeg mblur neg opacify put reflex resizeinfo ring showdesktop snap snow splash text thumbnail tile trailfocus wall winrules zoom"

# Compiz autogen.sh arguments. You may not need them.
# Select plugins you DO NOT want to install.
#
# gnome : deactivate gnome support and activate kde one (for KDE users)
# kde : deactivate kde support and activate gnome one (for Gnome and other DE users)
# inotify : deactivate inotify
# fuse : deactivate fuse
#
COMPIZREMOVE="kde"

# Compiz/CompComm install directory
# If you're not sure, keep it as it's.
#
PREFIX="/usr/local"

# Apply patches based on selected distribution
#
# ubuntu-feisty : Ubuntu Feisty Fawn 7.04
# kubuntu-feisty : KUbuntu Feisty Fawn 7.04
#
DISTRO="ubuntu-feisty"

###############################################
#
# YOU SHOULD NOT EDIT SCRIPT BEFORE THIS LINE
#
###############################################

###
# Initial configurations
###

# Packages selector
for q in $PACKAGES ; do
	if [ $q = "compcomm" ]; then
		ITEMS="$ITEMS compcomm/libraries/bcop"
		ITEMS="$ITEMS compcomm/compiz-configuration-system/libraries/ccs-lib"
		ITEMS="$ITEMS compcomm/compiz-configuration-system/bindings/ccs-python"
		ITEMS="$ITEMS compcomm/compiz-configuration-system/tools/ccsm"
		ITEMS="$ITEMS compcomm/compiz-configuration-system/tools/ccs-settings"
		ITEMS="$ITEMS users/kristian/compiz-scripts"
		ITEMS="$ITEMS compcomm/decorators/emerald"
		ITEMS="$ITEMS compcomm/decorators/emerald-themes"
	elif [ $q = "ccs-gconf" ]; then
		ITEMS="$ITEMS compcomm/compiz-configuration-system/libraries/ccs-backend-gconf"
	elif [ $q = "ccs-kconfig" ]; then
		ITEMS="$ITEMS compcomm/compiz-configuration-system/libraries/ccs-backend-kconfig"
	fi
done   

# CompComm plugins selector
for w in $CCPLUGINS ; do
	if [ $w = "zoom" ]; then
		ITEMS="$ITEMS users/kristian/$w"
	else
		ITEMS="$ITEMS compcomm/plugins/$w"
	fi
done

# Compiz autogen.sh arguments selector
for p in $COMPIZREMOVE ; do
	if [ $p = "gnome" ]; then
		COMPIZARGS="$COMPIZARGS --enable-kde --disable-gtk --enable-librsvg"
	elif [ $p = "kde" ]; then
		COMPIZARGS="$COMPIZARGS --enable-gtk --disable-kde --enable-librsvg"
	elif [ $p = "inotify" ]; then
		COMPIZARGS="$COMPIZARGS --disable-inotify"
	elif [ $p = "fuse" ]; then
		COMPIZARGS="$COMPIZARGS --disable-fuse"
	fi
done

# Repositories
REPO="git://annongit.opencompositing.org/"
COMPIZ="git://git.freedesktop.org/git/xorg/app/"

##
# Funciones necesarias para el correcto funcionamiento del script
##

# Check for git
if [ -z "$(which git-clone)" ]; then
	echo "You must have GIT installed in order to run this script. Install git-core package."
	exit 1;
fi

# If $1 directory is present, pull repo. If not, clone it.
function clone
{
	pkgName=`echo $1 | sed 's/.*\///g'`
	OLDPWD=$PWD
	if [ -d $pkgName ]; then
		cd $pkgName
		echo -e "\nUpdating $pkgName";
		git-pull > $OLDPWD/.logs/$pkgName.pull.log
		cd $OLDPWD
	else
		echo -e "\nCloning $pkgName";
		git-clone $2$1
	fi
}

# If autogen.sh exist, configure installation
function do_autogen
{
	if [ $1 = "compiz" ]; then
		AUTOGEN_OPTIONS="$COMPIZARGS"
	else
		AUTOGEN_OPTIONS=""
	fi

	OLDPWD=$PWD
	if [ -f $1/autogen.sh ]; then
		echo -e "\nConfiguring $1..."
		cd $1
		echo -e "\nExecuting autogen.sh --prefix=$PREFIX $AUTOGEN_OPTIONS in $1..."
		if [ -x configure ]; then
			rm -f configure
			rm -rf autom4te.cache
		fi
		if [ -e Makefile ]; then
			rm -f Makefile
		fi
		./autogen.sh --prefix=$PREFIX $AUTOGEN_OPTIONS > $OLDPWD/.logs/$1.autogen.log
		cd $OLDPWD
	fi
}

# Call make on each $1
function do_make
{
	OLDPWD=$PWD
	cd $1
	case "$2" in
		install)
			echo -e "\nInstalling $1..."
			echo -e "\nExecuting make"
			make > ../.logs/$1.make.log
			if [ -e autogen.sh ]; then
				echo -e "\nExecuting sudo make $2"
				sudo make $2 > $OLDPWD/.logs/$1.make.$2.log
			else
				echo -e "\nExecuting make $2"
				make $2 > $OLDPWD/.logs/$1.$2.log
			fi
			;;
		uninstall)
			echo -e "\nUninstalling $1..."
			if [ -e autogen.sh ]; then
				echo -e "Executing sudo make $2"
				sudo make $2 > $OLDPWD/.logs/$1.make.$2.log
			else
				echo -e "Executing make $2"
				make $2 > $OLDPWD/.logs/$1.$2.log
			fi
			echo -e "\nExecuting make clean"
			make clean > $OLDPWD/.logs/$1.make.clean.log
	esac
	cd $OLDPWD
}

# Create a clean logs folder for each time makeccc is executed
if [ -d .logs ]; then
	rm -rf .logs
fi
mkdir .logs

# makeccc action selector
case "$1" in
	clone)
		clear

		# Clone Compiz
		clone compiz $COMPIZ

		# Delete compiz-script folder because of fixes applied on this script
		rm -rf compiz-scripts

		# Clone CompComm
		for a in $ITEMS ; do
			clone $a $REPO
		done

		echo -e "\n"
		;;
	install)
		clear

		sudo echo "Welcome to Compiz/CompComm"

		# Distro specific fixes
		if [ $DISTRO = "ubuntu-feisty" ] || [ $DISTRO = "kubuntu-feisty" ]; then
			# bash fix
			sudo ln -sf /bin/bash /bin/sh
		fi

		# Configure and install Compiz
		do_autogen compiz
		do_make compiz $1

		# Configure and install CompComm
		for a in $ITEMS; do
			pkgName=`echo $a | sed 's/.*\///g'`
			if [ $pkgName = "screencasting" ]; then
				#do_make $pkgName/player $1
				#do_make $pkgName/rsc2raw $1
				#do_make $pkgName/plugin $1
				#NEED HACK ON LINE 122
#				ARCHIVE="$pkgName/plugin/screencasting.c"
#				sed -i -e 's/fopen("/home/roico/screencast.rsc"/fopen("/home/$USER/screencast.rsc"/g' $ARCHIVE;
				echo "yo"
			else
				do_autogen $pkgName
				do_make $pkgName $1
			fi
		done

		# Distro specific fixes
		if [ $DISTRO = "ubuntu-feisty" ] || [ $DISTRO = "kubuntu-feisty" ]; then
			# Undo bash fix
			sudo ln -sf /bin/dash /bin/sh

			# Fix for libccs library
			if [ ! -h /usr/lib/libccs.so.0 ]; then
				sudo ln -s /usr/local/lib/libccs.so.0 /usr/lib/libccs.so.0
			fi

			# Fix for cube sides number
			gconftool-2 --type int --set /app/compiz/general/screen0/options/hsize 4
		fi

		# Install and patch Kristian compiz wrapper
		ARCHIVE="compiz-scripts/manager/compiz-manager"
		sed -i -e 's/VERBOSE="no"/VERBOSE="yes"/g' $ARCHIVE
		sed -i -e 's/DELAY="5"/DELAY="1"/g' $ARCHIVE
		sudo cp $ARCHIVE /usr/bin/

		# Version notes
		echo -e "\nRun compiz-manager to load Compiz/CompComm."
		echo " "
		echo "Run ccs-settings o ccsm (preffered) to configure"
		echo "Compiz/Compcomm"
		;;
	uninstall)
		# Uninstall Compiz
		do_make compiz $1

		# Uninstall CompComm
		for a in $ITEMS; do
			b=`echo $a | sed 's/.*\///g'`
			if [ $b = "screencasting" ]; then
				sudo rm ~/.compiz/plugins/screencasting.so
				sudo rm ~/.compiz/metadata/screencasting.xml
			else
				do_make $b $1
			fi
		done

		# Uninstalling compiz-manager
		sudo rm /usr/bin/compiz-manager
		sudo rm -f ~/.config/compiz-managerrc
		sudo rm -rf ~/.compiz
		;;
	packages)
		if [ $DISTRO = "ubuntu-feisty" ]; then
			sudo aptitude install git gitweb automake intltool libtool libfuse-dev python-pyrex libxslt1-dev build-essential comerr-dev debhelper diffstat dpkg-dev enscript g++ g++-4.1 gawk hspell html2text intltool-debian libacl1-dev libart-2.0-dev libasound2-dev libaspell-dev libatk1.0-dev libattr1-dev libaudio-dev libaudiofile-dev libavahi-client-dev libavahi-common-dev libavahi-compat-libdnssd1 libavahi-glib-dev libbonobo2-dev libbonoboui2-dev libbz2-dev libcairo2-dev libcroco3-dev libcupsys2-dev libdbus-1-dev libdbus-glib-1-dev libesd0-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libgconf2-dev libgcrypt11-dev libgl1-mesa-dev libglade2-dev libglib2.0-dev libglu1-mesa-dev libgnome-desktop-dev libgnome-keyring-dev libgnome-window-settings-dev libgnome2-dev libgnomecanvas2-dev libgnomeui-dev libgnomevfs2-dev libgnutls-dev libgpg-error-dev libgsf-1-dev libgtk2.0-dev libice-dev libidl-dev libidn11-dev libjasper-1.701-dev libjpeg62-dev liblcms1-dev liblua50 liblua50-dev liblualib50 liblualib50-dev liblzo-dev libmetacity-dev libmng-dev libogg-dev libopencdk8-dev libopenexr-dev libopenexr2c2a liborbit2-dev libpango1.0-dev libpcre3 libpcre3-dev libpcrecpp0 libpng12-dev libpopt-dev librsvg2-dev libsasl2-dev libselinux1-dev libsepol1-dev libsm-dev libssl-dev libstartup-notification0-dev libstdc++6-4.1-dev libtasn1-3-dev libtiff4-dev libtiffxx0c2 libvorbis-dev libwnck-dev libx11-dev libxau-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxres-dev libxt-dev lua50 mesa-common-dev po-debconf poster psutils quilt x11proto-composite-dev x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-resource-dev x11proto-xext-dev x11proto-xinerama-dev xtrans-dev
		elif [ $DISTRO = "kubuntu-feisty" ]; then
			sudo aptitude install git gitweb automake intltool libtool libfuse-dev python-pyrex libxslt1-dev build-essential comerr-dev debhelper diffstat dpkg-dev enscript g++ g++-4.1 gawk hspell html2text intltool-debian libacl1-dev libart-2.0-dev libasound2-dev libaspell-dev libatk1.0-dev libattr1-dev libaudio-dev libaudiofile-dev libavahi-client-dev libavahi-common-dev libavahi-compat-libdnssd1 libavahi-glib-dev libbonobo2-dev libbonoboui2-dev libbz2-dev libcairo2-dev libcroco3-dev libcupsys2-dev libdbus-1-dev libdbus-glib-1-dev libesd0-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libgconf2-dev libgcrypt11-dev libgl1-mesa-dev libglade2-dev libglib2.0-dev libglu1-mesa-dev libgnome-desktop-dev libgnome-keyring-dev libgnome-window-settings-dev libgnome2-dev libgnomecanvas2-dev libgnomeui-dev libgnomevfs2-dev libgnutls-dev libgpg-error-dev libgsf-1-dev libgtk2.0-dev libice-dev libidl-dev libidn11-dev libjasper-1.701-dev libjpeg62-dev liblcms1-dev liblua50 liblua50-dev liblualib50 liblualib50-dev liblzo-dev libmetacity-dev libmng-dev libogg-dev libopencdk8-dev libopenexr-dev libopenexr2c2a liborbit2-dev libpango1.0-dev libpcre3 libpcre3-dev libpcrecpp0 libpng12-dev libpopt-dev librsvg2-dev libsasl2-dev libselinux1-dev libsepol1-dev libsm-dev libssl-dev libstartup-notification0-dev libstdc++6-4.1-dev libtasn1-3-dev libtiff4-dev libtiffxx0c2 libvorbis-dev libwnck-dev libx11-dev libxau-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxres-dev libxt-dev lua50 mesa-common-dev po-debconf poster psutils quilt x11proto-composite-dev x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-resource-dev x11proto-xext-dev x11proto-xinerama-dev xtrans-dev kate kcontrol kdebase-bin kdebase-data kdebase-dev kdebase-kio-plugins kdelibs-data kdelibs4-dev kdelibs4c2a kdeprint kdesdk-scripts kdesktop kfind khelpcenter kicker klipper kmenuedit konqueror konqueror-nsplugins konsole ksmserver ksplash ksysguard ksysguardd kwin gettext-kde libavahi-qt3-1 libavahi-qt3-dev libkadm55 libkonq4 libkrb5-dev libqt3-headers libqt3-mt libqt3-mt-dev qt3-dev-tools libdbus-qt-1-1c2 libdbus-qt-1-dev libarts1-dev libarts1c2a libartsc0 libartsc0-dev
		fi
		;;
	*)
		echo "Usage: $0 packages | clone | instal | uninstall"
		exit 1
esac

Luego prosigan los pasos para instalar Compiz Fusion!

Una respuesta

  1. [...] makeccc Posted by: hybrideath | 16th sep, 2007 [...]

Escribe un comentario