[banshee] [build] added some scripts to build Tango



commit 8218d042deb8063df720160a9dbb718d0bf27652
Author: Aaron Bockover <abockover novell com>
Date:   Fri Oct 2 17:35:56 2009 -0400

    [build] added some scripts to build Tango
    
    Mono on OS X no longer includes Tango, so we need to build it and
    bundle it on our own. This will also be necessary for Windows.
    
    These scripts take care of building Tango and removing things.

 build/tango/README             |    5 +++++
 build/tango/build-icon-theme   |   35 +++++++++++++++++++++++++++++++++++
 build/tango/extract-icon-theme |   29 +++++++++++++++++++++++++++++
 3 files changed, 69 insertions(+), 0 deletions(-)
---
diff --git a/build/tango/README b/build/tango/README
new file mode 100644
index 0000000..f698529
--- /dev/null
+++ b/build/tango/README
@@ -0,0 +1,5 @@
+First run build-icon-theme - this will download and install the latest tango
+and install it into a private build root in this directory
+
+Next run extract-icon-theme to pull out and trim the icon theme into a
+directory that can be bundled directly with Banshee.
diff --git a/build/tango/build-icon-theme b/build/tango/build-icon-theme
new file mode 100755
index 0000000..0f9f383
--- /dev/null
+++ b/build/tango/build-icon-theme
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+PACKAGES="
+	icon-naming-utils-0.8.90
+	tango-icon-theme-0.8.90
+"
+
+BUILD_ROOT="$PWD/build-root"
+
+function run {
+	echo "---> $@"
+	$@ || exit 1
+}
+
+for package in $PACKAGES; do
+	run rm -rf $package $package.tar.gz
+	run wget http://tango.freedesktop.org/releases/$package.tar.gz
+	run tar zxvf $package.tar.gz
+	
+	run pushd $package
+	
+	CONFIGURE_ARGS="--prefix=$BUILD_ROOT"
+	[[ $package =~ ^tango ]] && \
+		CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-png-creation 
+			--disable-icon-framing"
+
+	PKG_CONFIG_PATH="${BUILD_ROOT}/share/pkgconfig:${PKG_CONFIG_PATH}" \
+		run ./configure $CONFIGURE_ARGS
+
+	run make
+	run make install
+
+	run popd
+
+done
diff --git a/build/tango/extract-icon-theme b/build/tango/extract-icon-theme
new file mode 100755
index 0000000..2c5db43
--- /dev/null
+++ b/build/tango/extract-icon-theme
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+BUILD_ROOT="$PWD/build-root"
+ICON_ROOT="$PWD/icon-root"
+
+function run {
+	echo "---> $@"
+	$@ || exit 1
+}
+
+run rm -rf "$ICON_ROOT"
+run cp -a "$BUILD_ROOT/share/icons" "$ICON_ROOT"
+run pushd "$ICON_ROOT"
+
+ORIGINAL_SIZE=$(du -s -B1 | cut -f1)
+echo "---> Original size = $(($ORIGINAL_SIZE / 1024 / 1024))M"
+
+# remove some sizes
+for s in 128 96 72 64; do
+	run rm -rf Tango/${s}x${s}
+done
+run rm -rf Tango/scalable
+
+# remove symlinks
+run find -type l -exec rm {} \;
+
+NEW_SIZE=$(du -s -B1 | cut -f1)
+echo "---> New size = $(($NEW_SIZE / 1024 / 1024))M"
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]