summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcompiz-fusion-git-build110
-rw-r--r--compiz-fusion-git-config60
-rwxr-xr-xcompiz-fusion-git-functions21
-rwxr-xr-xcompiz-fusion-git-retrieve96
-rw-r--r--dummy0
5 files changed, 287 insertions, 0 deletions
diff --git a/compiz-fusion-git-build b/compiz-fusion-git-build
new file mode 100755
index 0000000..ce1347a
--- /dev/null
+++ b/compiz-fusion-git-build
@@ -0,0 +1,110 @@
+#!/bin/bash
+# Compiz Fusion Git Build Script
+
+### DO NOT EDIT BELOW THIS LINE ###
+
+source $(dirname ${0})/compiz-fusion-git-functions
+source $(dirname ${0})/compiz-fusion-git-config
+
+# Calculate the packages we will be building
+
+COMPIZ=$(remove_unwanted_packages ${COMPIZ[*]})
+FUSION=$(remove_unwanted_packages ${FUSION[*]})
+MISC=$(remove_unwanted_packages ${MISC[*]})
+LIBS=$(remove_unwanted_packages ${LIBS[*]})
+CONFIG=$(remove_unwanted_packages ${CONFIG[*]})
+DECORATORS=$(remove_unwanted_packages ${DECORATORS[*]})
+PLUGIN_CONTAINERS=$(remove_unwanted_packages ${PLUGIN_CONTAINERS[*]})
+PLUGINS=$(remove_unwanted_packages ${PLUGINS[*]})
+
+ALL="${COMPIZ} ${FUSION} ${MISC} ${LIBS} ${CONFIG} ${DECORATORS} ${PLUGIN_CONTAINERS} ${PLUGINS}"
+
+## Build Process
+
+# We need a dir so that we can track the files installed
+if [[ ! -d $GIT_LOCATION/.file_list ]]; then
+ mkdir -p $GIT_LOCATION/.file_list
+fi
+
+cd $GIT_LOCATION
+
+function build() {
+ for x in "$@"
+ do
+ # We're in $ALL, we're building this package
+ if [[ $(echo $ALL | grep -o $x) == $x ]]; then
+ ALL=$(echo $ALL | sed "s/$x//") # Remove $x from $ALL
+ if [[ ! -e $x ]]; then
+ die '*** ERROR: Package has not been checked out: '${x}''
+ fi
+
+ echo "==> Building: '$x'"
+
+ # Cleanup
+ $BUILD_SUDO rm -rf .${x}_install .${x}_build
+
+ # Create a tmp dir, so we don't screw up the checkout
+ cp -a $x .${x}_build
+ cd .${x}_build
+
+ BUILD_ARGS=""
+ if [[ $x == "compiz" ]]; then
+ BUILD_ARGS=${BUILD_COMPIZ_ARGS}
+ fi
+
+ if [[ -e autogen.sh ]]; then
+ # Run autogen.sh and make
+ echo "./autogen.sh --prefix=${BUILD_PREFIX}"
+ ./autogen.sh --prefix=${BUILD_PREFIX} ${BUILD_ARGS} || die '*** ERROR: Package failed to run autogen.sh: '${x}''
+
+ # We don't have autogen.sh, if we don't have a makefile, we can't build, this is a psuedo else
+ elif [[ ! -e Makefile ]]; then
+ die '*** ERROR: Package does not have a proper build system: '${x}''
+ fi
+
+ # Run make
+ make || die '*** ERROR: Package failed to run make: '$x''
+
+ # Run make install, and install to a tmp location
+ # Not working, real DESTDIR should be DESTDIR="${GIT_LOCATION}/.${x}_install"
+ $BUILD_SUDO make install || die '*** ERROR: Package failed to run make install: '${x}''
+
+ cd ../
+
+# # Remove old installation
+# if [[ -e .file_list/$x ]]; then
+# $BUILD_SUDO rm -rf $(<.file_list/$x)
+# fi
+#
+# # Create list of new files
+# rm -f .file_list/$x
+#
+# cd .${x}_install
+# find -depth -type d -empty -delete
+# tar cvf /dev/null * | sort | sed 's/^/\//' > ../.file_list/$x
+#
+# # Install
+# for y in *
+# do
+# # We are copying from the tmp install to /
+# $BUILD_SUDO cp -a ${y} /${y}
+# doneDESTDIR="${GIT_LOCATION}/.${x}_install
+# cd ../
+#
+ # Cleanup
+ $BUILD_SUDO rm -rf .${x}_install .${x}_build
+ else
+ echo '* Warning: Package is not supposed to be built, but build was called for it '${x}''
+ fi
+ done
+}
+
+# Build some packages in order, or else it will fail to build
+build "compiz" "bcop" "libcompizconfig" "compizconfig-python" "ccsm"
+
+# Build the rest - The previous packages were removed from $ALL
+build ${ALL}
+
+echo "Compiz Fusion has been built"
+exit 0
+
diff --git a/compiz-fusion-git-config b/compiz-fusion-git-config
new file mode 100644
index 0000000..2709c15
--- /dev/null
+++ b/compiz-fusion-git-config
@@ -0,0 +1,60 @@
+#!/bin/bash
+# Compiz Fusion Git Retrieval/Build Script Configuration
+
+## Git Configuration
+# If you are a user, you can leave these fields alone. If you are a dev, change user to dev
+GIT_USER=(user)
+
+# Please select the destination of the checkout
+# Ex.: GIT_LOCATION="/home/user/compiz-fusion" will create /home/user/compiz-fusion/<package>
+# for each package. (Default is autodetection for /home/user)
+GIT_LOCATION="$(echo $HOME)/compiz-fusion"
+
+## Build Configuration
+# Select the prefix for building. This controls the "prefix" of where the files are installed to
+# Ex.: BUILD_PREFIX="/usr/local"
+BUILD_PREFIX="/usr/local"
+
+# Determines if make install should be called with sudo
+# If it isn't, you must be root or BUILD_PREFIX must be writable by the current user
+# Ex.: BUILD_SUDO="sudo" or BUILD_SUDO=""
+BUILD_SUDO="sudo"
+
+# Passes arguments to compiz's autogen.sh script
+# If you do not know what this means, you can skip it
+BUILD_COMPIZ_ARGS=""
+
+## Package Selection
+# You can stop the checkout of an app, by adding a ! infront of the package name
+# Ex.: Change CATEGORY=(ccsm libcompizconfig) to CATEGORY=(ccsm !libcompizconfig)
+
+# Compiz
+COMPIZ=(compiz)
+
+# Compiz Fusion
+FUSION=(!i18n)
+
+# Compiz Fusion Miscellaneous Apps
+MISC=(!makefile !yags)
+
+# Compiz Fusion Libraries
+LIBS=(bcop)
+
+# Compiz Fusion Configuration Apps and Bindings
+CONFIG=(ccsm compizconfig-backend-gconf compizconfig-backend-kconfig
+ compizconfig-python libcompizconfig)
+
+# Compiz Fusion Window Decorators
+DECORATORS=(emerald emerald-themes)
+
+# Compiz Fusion Plugins (Containers) - Groups of Plugins
+PLUGIN_CONTAINERS=(plugins-extra plugins-main plugins-unsupported !plugins-wip)
+
+# Compiz Fusion Plugins (Individuals) - Individual Plugins
+PLUGINS=(!addhelper !animation !atlantis !bench !compiz-scheme !crashhandler
+ !cubereflex !expo !extrawm !fadedesktop !fakeargb !firepaint !gears
+ !goto-viewport !group !jpeg !mblur !mswitch !neg !opacify !put !reflex
+ !resizeinfo !ring !scaleaddon !scalefilter !screencasting !showdesktop
+ !snap !snow !splash !text !thumbnail !tile !trailfocus !viewport-switcher
+ !vpswitch !wall !wallpaper !winrules)
+
diff --git a/compiz-fusion-git-functions b/compiz-fusion-git-functions
new file mode 100755
index 0000000..ffa8cc7
--- /dev/null
+++ b/compiz-fusion-git-functions
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Compiz Fusion Git Retrieval/Build Script Functions
+
+function die() {
+ echo -e ${1}
+ exit 1
+}
+
+function remove_unwanted_packages() {
+ packages=""
+
+ for x in "$@"
+ do
+ # Remove packages with ! infront
+ if [[ "${x}" = "${x#!}" ]]; then
+ packages="${packages} ${x}"
+ fi
+ done
+
+ echo $packages # Return the package names
+}
diff --git a/compiz-fusion-git-retrieve b/compiz-fusion-git-retrieve
new file mode 100755
index 0000000..9f36a1b
--- /dev/null
+++ b/compiz-fusion-git-retrieve
@@ -0,0 +1,96 @@
+#!/bin/bash
+# Compiz Fusion Git Retrieval Script
+
+### DO NOT EDIT BELOW THIS LINE ###
+
+source $(dirname ${0})/compiz-fusion-git-functions
+source $(dirname ${0})/compiz-fusion-git-config
+
+function get_repo() {
+ git_path="${1}" # The path to the package upstream
+
+ shift 1 # Remove git_path from "$@"
+ packages="$@" # Remove the path from packages
+
+ for package in $packages
+ do
+ echo "==> Git Cloning/Pulling '${package}': "
+
+ if [[ ! -d $package ]]; then
+ git clone ${GIT_URI}${git_path}/${package} || die "\n*** ERROR: Failed to complete 'git clone ${GIT_URI}/${package}'"
+ else
+ cd $package
+ git pull || die "\n*** ERROR: Failed to complete 'git pull ${package}'"
+ cd ../
+ fi
+
+ echo ""
+ done
+}
+
+if [[ "${GIT_USER#!}" == "dev" ]]; then
+ # Developers
+ GIT_URI="git+ssh://git.opencompositing.org/git"
+else
+ # Users
+ GIT_URI="git://anongit.opencompositing.org"
+fi
+
+# Check for git
+if [[ ! -x $(which git) ]]; then
+ echo "You must have GIT installed to use this script."
+
+ # Detect what command to install git with. All debian derivitives must come before ubuntu
+
+ if [[ -e /etc/arch-release ]]; then
+ echo "To install GIT, please run 'pacman -S git'"
+
+ elif [[ -e /etc/lsb-release && -n $(cat /etc/lsb-release | grep Ubuntu) ]]; then
+ echo "To install GIT, please run 'sudo apt-get install git-core"
+ echo "If you have installed 'git' before 'git-core',"
+ echo "Please run 'sudo update-alternatives --config git' and select the correct"
+ echo "git package"
+
+ elif [[ -e /etc/debian_version ]]; then
+ echo "To install GIT, please run 'apt-get install git-core'"
+
+ elif [[ -e /etc/gentoo-release ]]; then
+ echo "To install GIT, please run 'emerge git'"
+
+ fi
+
+ exit 1
+fi
+
+# Calculate the packages we will be retrieving
+
+COMPIZ=$(remove_unwanted_packages ${COMPIZ[*]})
+FUSION=$(remove_unwanted_packages ${FUSION[*]})
+MISC=$(remove_unwanted_packages ${MISC[*]})
+LIBS=$(remove_unwanted_packages ${LIBS[*]})
+CONFIG=$(remove_unwanted_packages ${CONFIG[*]})
+DECORATORS=$(remove_unwanted_packages ${DECORATORS[*]})
+PLUGIN_CONTAINERS=$(remove_unwanted_packages ${PLUGIN_CONTAINERS[*]})
+PLUGINS=$(remove_unwanted_packages ${PLUGINS[*]})
+
+# Create the location dir if it doesn't exist
+if [[ ! -e $GIT_LOCATION ]]; then
+ mkdir -p $GIT_LOCATION
+fi
+
+# Checkout Process
+
+cd $GIT_LOCATION
+
+get_repo "" $COMPIZ # Compiz doesn't have a path
+get_repo "/fusion" $FUSION
+get_repo "/fusion/misc" $MISC
+get_repo "/fusion/libraries" $LIBS
+get_repo "/fusion/compizconfig" $CONFIG
+get_repo "/fusion/decorators" $DECORATORS
+get_repo "/fusion" $PLUGIN_CONTAINERS
+get_repo "/fusion/plugins" $PLUGINS
+
+echo "Compiz Fusion has been cloned/pulled"
+exit 0
+
diff --git a/dummy b/dummy
deleted file mode 100644
index e69de29..0000000
--- a/dummy
+++ /dev/null