j, 编译atk用到的脚本
export CFLAGS="$ARM_CFLAGS $CFLAGS"
export LDFLAGS="$ARM_LDFLAGS $LDCFLAGS"
export DEP_CFLAGS="-I$TARGET_PREFIX/usr/include/glib-2.0 -I$TARGET_PREFIX/usr/lib/glib-2.0/include"
export DEP_LIBS="-L$TARGET_PREFIX/usr/lib -lglib-2.0 -lgobject-2.0"
# Set the build system vars here
BD_SRC_DIR="${ARM_HOME}/softs/sources/gtkfb/atk-1.19.3"
BD_PACKAGE_NAME="atk-1.19.3"
BD_ROOT="/tmp/${BD_PACKAGE_NAME}"
BD_PREFIX="/usr"
BD_DEST_DIR="${ARM_HOME}/arm_pkgs/gtkfb/"
BD_CONFIG_OPTIONS="--host=arm-linux"
BD_MAKE_OPTIONS=
BD_MAKE_INSTALL_OPTIONS="DESTDIR=$BD_ROOT"
BD_MAKE_CLEAN_OPTIONS=
# Set the packages build parted
BD_PACKAGE_DEV_CONTENT="usr/lib/pkgconfig usr/lib/*.la usr/include"
BD_PACKAGE_DOC_CONTENT="usr/share/gtk-doc"
BD_PACKAGE_LOCALE_CONTENT="usr/share/locale"
BD_PACKAGE_BIN_CONTENT="usr/lib/*.so*"
# Set the strip variables
BD_STRIP_OPTIONS="--strip-debug"
BD_STRIP_CONTENT="usr/lib/*"
function bd_info() {
echo "#####################################################################"
echo "#$1"
echo "#####################################################################"
}
function check_error() {
if [ ! "$?" = "0" ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! Build error at: `date`"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
fi
}
# Check need vars
if [ -z "${BD_SRC_DIR}" ]; then
echo "Must set the \${BD_SRC_DIR}"
exit 1
elif [ -z "${BD_PACKAGE_NAME}" ]; then
echo "Must set the \${BD_PACKAGE_NAME}"
exit 1
elif [ -z "${BD_DEST_DIR}" ]; then
echo "Must set the \${BD_DEST_DIR}"
exit 1
elif [ -z "${BD_ROOT}" ]; then
echo "Must set the \${BD_ROOT}"
exit 1
elif [ -z "${BD_PACKAGE_DEV_CONTENT}" ] && [ -z
"${BD_PACKAGE_DOC_CONTENT}" ] && [ -z
"${BD_PACKAGE_BIN_CONTENT}" ]; then
echo "Must set one of the package conent of
\${BD_PACKAGE_DEV_CONTENT},\${BD_PACKAGE_DOC_CONTENT},
\${BD_PACKAGE_BIN_CONTENT}"
exit 1
fi
# Begin to configure if configure options length is not zero
cd $BD_SRC_DIR
if [ ! "${BD_CONFIG_OPTIONS}" = "NO-CONFIG" ]; then
bd_info "Begin to configure ..."
./configure --prefix=${BD_PREFIX} ${BD_CONFIG_OPTIONS}
check_error
fi
# Begin to make
if [ ! "${BD_MAKE_OPTIONS}" = "NO-MAKE" ]; then
bd_info "Begin to make ..."
make ${BD_MAKE_OPTIONS}
check_error
fi
# Begin to make install
rm -fr "${BD_ROOT}"
mkdir -p "${BD_ROOT}"
check_error
if [ ! "${BD_MAKE_INSTALL_OPTIONS}" = "NO-INSTALL" ]; then
bd_info "Begin to make install ..."
make $BD_MAKE_INSTALL_OPTIONS install
check_error
fi
# Begin to clean
if [ ! "${BD_MAKE_CLEAN_OPTIONS}" = "NO-CLEAN" ]; then
bd_info "Begin to make clean ..."
make $BD_MAKE_CLEAN_OPTIONS clean
check_error
fi
# Begin to package
bd_info "Begin to make package ..."
if [ ! -d ${BD_DEST_DIR} ]; then
mkdir -p ${BD_DEST_DIR}
check_error
fi
cd $BD_ROOT
pck_path_base="${BD_DEST_DIR}/${BD_PACKAGE_NAME}"
mkdir -p $pck_path_base
check_error
# Strip specialy symbols
if [ ! -z "$BD_STRIP_CONTENT" ]; then
echo "->Stip unneeded symbols..."
arm-linux-strip $BD_STRIP_OPTIONS $BD_STRIP_CONTENT
fi
if [ ! -z "$BD_PACKAGE_DEV_CONTENT" ]; then
echo "->Build the develop package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-dev_chenyq.arm.tgz ${BD_PACKAGE_DEV_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_DOC_CONTENT" ]; then
echo "->Build the document package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-doc_chenyq.arm.tgz ${BD_PACKAGE_DOC_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_LOCALE_CONTENT" ]; then
echo "->Build the locales package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-nls_chenyq.arm.tgz ${BD_PACKAGE_LOCALE_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_BIN_CONTENT" ]; then
echo "->Build the binary package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}_chenyq.arm.tgz ${BD_PACKAGE_BIN_CONTENT} -C / > /dev/null
check_error
fi
rm -fr ${BD_ROOT}
check_error
k, 编译glib用到的脚本
# Set the build system vars here
AC_CACHE="arm-linux.cache"
BD_SRC_DIR="${ARM_HOME}/softs/sources/gtkfb/glib-2.12.9"
BD_PACKAGE_NAME="glib-2.12.9"
BD_ROOT="/tmp/${BD_PACKAGE_NAME}"
BD_PREFIX="/usr"
BD_DEST_DIR="${ARM_HOME}/arm_pkgs/gtkfb/"
BD_CONFIG_OPTIONS="--host=arm-linux --cache-file=$AC_CACHE"
BD_MAKE_OPTIONS=
BD_MAKE_INSTALL_OPTIONS="DESTDIR=$BD_ROOT"
BD_MAKE_CLEAN_OPTIONS=
# Set the packages build parted
BD_PACKAGE_DEV_CONTENT="usr/share/aclocal usr/share/glib-2.0 usr/lib/*.la* usr/lib/pkgconfig usr/lib/glib-2.0 \
usr/bin usr/include"
BD_PACKAGE_DOC_CONTENT="usr/share/gtk-doc usr/share/man"
BD_PACKAGE_LOCALE_CONTENT="usr/share/locale"
BD_PACKAGE_BIN_CONTENT="usr/lib/*.so*"
function bd_info() {
echo "#####################################################################"
echo "#$1"
echo "#####################################################################"
}
function check_error() {
if [ ! "$?" = "0" ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! Build error at: `date`"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
fi
}
# Check need vars
if [ -z "${BD_SRC_DIR}" ]; then
echo "Must set the \${BD_SRC_DIR}"
exit 1
elif [ -z "${BD_PACKAGE_NAME}" ]; then
echo "Must set the \${BD_PACKAGE_NAME}"
exit 1
elif [ -z "${BD_DEST_DIR}" ]; then
echo "Must set the \${BD_DEST_DIR}"
exit 1
elif [ -z "${BD_ROOT}" ]; then
echo "Must set the \${BD_ROOT}"
exit 1
elif [ -z "${BD_PACKAGE_DEV_CONTENT}" ] && [ -z
"${BD_PACKAGE_DOC_CONTENT}" ] && [ -z
"${BD_PACKAGE_BIN_CONTENT}" ]; then
echo "Must set one of the package conent of
\${BD_PACKAGE_DEV_CONTENT},\${BD_PACKAGE_DOC_CONTENT},
\${BD_PACKAGE_BIN_CONTENT}"
exit 1
fi
# Begin to configure if configure options length is not zero
cd $BD_SRC_DIR
if [ ! "${BD_CONFIG_OPTIONS}" = "NO-CONFIG" ]; then
bd_info "Begin to configure ..."
#Fix some cross compile problem
echo ac_cv_type_long_long=yes > $AC_CACHE
echo glib_cv_stack_grows=no >> $AC_CACHE
echo glib_cv_uscore=no >> $AC_CACHE
echo ac_cv_func_posix_getpwuid_r=yes >> $AC_CACHE
./configure --prefix=${BD_PREFIX} ${BD_CONFIG_OPTIONS}
check_error
fi
# Begin to make
if [ ! "${BD_MAKE_OPTIONS}" = "NO-MAKE" ]; then
bd_info "Begin to make ..."
make ${BD_MAKE_OPTIONS}
check_error
fi
# Begin to make install
rm -fr "${BD_ROOT}"
mkdir -p "${BD_ROOT}"
check_error
if [ ! "${BD_MAKE_INSTALL_OPTIONS}" = "NO-INSTALL" ]; then
bd_info "Begin to make install ..."
make $BD_MAKE_INSTALL_OPTIONS install
check_error
fi
# Begin to clean
if [ ! "${BD_MAKE_CLEAN_OPTIONS}" = "NO-CLEAN" ]; then
bd_info "Begin to make clean ..."
make $BD_MAKE_CLEAN_OPTIONS clean
check_error
fi
# Begin to package
bd_info "Begin to make package ..."
if [ ! -d ${BD_DEST_DIR} ]; then
mkdir -p ${BD_DEST_DIR}
check_error
fi
cd $BD_ROOT
pck_path_base="${BD_DEST_DIR}/${BD_PACKAGE_NAME}"
mkdir -p $pck_path_base
check_error
if [ ! -z "$BD_PACKAGE_DEV_CONTENT" ]; then
echo "->Build the develop package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-dev_chenyq.arm.tgz ${BD_PACKAGE_DEV_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_DOC_CONTENT" ]; then
echo "->Build the document package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-doc_chenyq.arm.tgz ${BD_PACKAGE_DOC_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_LOCALE_CONTENT" ]; then
echo "->Build the locales package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-nls_chenyq.arm.tgz ${BD_PACKAGE_LOCALE_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_BIN_CONTENT" ]; then
echo "->Build the binary package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}_chenyq.arm.tgz ${BD_PACKAGE_BIN_CONTENT} -C / > /dev/null
check_error
fi
rm -fr ${BD_ROOT}
check_error
l, 编译cairo用到的脚本
export CFLAGS="$ARM_CFLAGS $CFLAGS"
export LDFLAGS="$ARM_LDFLAGS $LDFLAGS"
export PATH=$TARGET_PREFIX/usr/bin:$PATH
export png_CFLAGS="-I$TARGET_PREFIX/usr/include/libpng12"
export png_LIBS="-lpng12"
export directfb_CFLAGS="-D_REENTRANT -I$TARGET_PREFIX/usr/include/directfb"
export directfb_LIBS="-ldirectfb -lz -lfusion -ldirect -lpthread -ldl"
# Set the build system vars here
BD_SRC_DIR="${ARM_HOME}/softs/sources/gtkfb/cairo-1.4.6"
BD_PACKAGE_NAME="cairo-1.4.6"
BD_ROOT="/tmp/${BD_PACKAGE_NAME}"
BD_PREFIX="/usr"
BD_DEST_DIR="${ARM_HOME}/arm_pkgs/gtkfb"
BD_CONFIG_OPTIONS="--host=arm-linux --disable-xlib --disable-xlib-xrender --enable-directfb --without-x \
--enable-pdf --enable-ps --enable-svg"
BD_MAKE_OPTIONS=
BD_MAKE_INSTALL_OPTIONS="DESTDIR=$BD_ROOT"
BD_MAKE_CLEAN_OPTIONS=
# Set the packages build parted
BD_PACKAGE_DEV_CONTENT="usr/lib/*.la usr/lib/*.a* usr/lib/pkgconfig usr/include"
BD_PACKAGE_DOC_CONTENT="usr/share/gtk-doc"
BD_PACKAGE_LOCALE_CONTENT=
BD_PACKAGE_BIN_CONTENT="usr/lib/*.so*"
# Set the strip variables
BD_STRIP_OPTIONS="--strip-debug"
BD_STRIP_CONTENT="usr/lib/*"
function bd_info() {
echo "#####################################################################"
echo "#$1"
echo "#####################################################################"
}
function check_error() {
if [ ! "$?" = "0" ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! Build error at: `date`"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
fi
}
# Check need vars
if [ -z "${BD_SRC_DIR}" ]; then
echo "Must set the \${BD_SRC_DIR}"
exit 1
elif [ -z "${BD_PACKAGE_NAME}" ]; then
echo "Must set the \${BD_PACKAGE_NAME}"
exit 1
elif [ -z "${BD_DEST_DIR}" ]; then
echo "Must set the \${BD_DEST_DIR}"
exit 1
elif [ -z "${BD_ROOT}" ]; then
echo "Must set the \${BD_ROOT}"
exit 1
elif [ -z "${BD_PACKAGE_DEV_CONTENT}" ] && [ -z
"${BD_PACKAGE_DOC_CONTENT}" ] && [ -z
"${BD_PACKAGE_BIN_CONTENT}" ]; then
echo "Must set one of the package conent of
\${BD_PACKAGE_DEV_CONTENT},\${BD_PACKAGE_DOC_CONTENT},
\${BD_PACKAGE_BIN_CONTENT}"
exit 1
fi
# Begin to configure if configure options length is not zero
cd $BD_SRC_DIR
if [ ! "${BD_CONFIG_OPTIONS}" = "NO-CONFIG" ]; then
bd_info "Begin to configure ..."
./configure --prefix=${BD_PREFIX} ${BD_CONFIG_OPTIONS}
check_error
fi
# Begin to make
if [ ! "${BD_MAKE_OPTIONS}" = "NO-MAKE" ]; then
bd_info "Begin to make ..."
make ${BD_MAKE_OPTIONS}
check_error
fi
# Begin to make install
rm -fr "${BD_ROOT}"
mkdir -p "${BD_ROOT}"
check_error
if [ ! "${BD_MAKE_INSTALL_OPTIONS}" = "NO-INSTALL" ]; then
bd_info "Begin to make install ..."
make $BD_MAKE_INSTALL_OPTIONS install
check_error
fi
# Begin to clean
if [ ! "${BD_MAKE_CLEAN_OPTIONS}" = "NO-CLEAN" ]; then
bd_info "Begin to make clean ..."
make $BD_MAKE_CLEAN_OPTIONS clean
check_error
fi
# Begin to package
bd_info "Begin to make package ..."
if [ ! -d ${BD_DEST_DIR} ]; then
mkdir -p ${BD_DEST_DIR}
check_error
fi
cd $BD_ROOT
# Get package base directory path
pck_path_base="${BD_DEST_DIR}/${BD_PACKAGE_NAME}"
mkdir -p $pck_path_base
check_error
# Strip specialy symbols
if [ ! -z "$BD_STRIP_CONTENT" ]; then
echo "->Stip unneeded symbols..."
arm-linux-strip $BD_STRIP_OPTIONS $BD_STRIP_CONTENT
fi
# Compress and make packages
if [ ! -z "$BD_PACKAGE_DEV_CONTENT" ]; then
echo "->Build the develop package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-dev_chenyq.arm.tgz ${BD_PACKAGE_DEV_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_DOC_CONTENT" ]; then
echo "->Build the document package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-doc_chenyq.arm.tgz ${BD_PACKAGE_DOC_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_LOCALE_CONTENT" ]; then
echo "->Build the locales package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-nls_chenyq.arm.tgz ${BD_PACKAGE_LOCALE_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_BIN_CONTENT" ]; then
echo "->Build the binary package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}_chenyq.arm.tgz ${BD_PACKAGE_BIN_CONTENT} -C / > /dev/null
check_error
fi
rm -fr ${BD_ROOT}
check_error
m ,编译pango用到的脚本
export PATH=$TARGET_PREFIX/usr/bin:$PATH
export FONTCONFIG_CFLAGS="-I$TARGET_PREFIX/usr/include/fontconfig"
export FONTCONFIG_LIBS="-lfontconfig"
export CAIRO_CFLAGS="-D_REENTRANT -I$TARGET_PREFIX/usr/include/cairo
-I$TARGET_PREFIX/usr/include/directfb
-I$TARGET_PREFIX/usr/include/freetype2
-I$TARGET_PREFIX/usr/include/libpng12"
export CAIRO_LIBS="-lcairo"
export GLIB_CFLAGS="-I$TARGET_PREFIX/usr/include/glib-2.0 -I$TARGET_PREFIX/usr/lib/glib-2.0/include"
export GLIB_LIBS="-lglib-2.0 -lgmodule-2.0 -lgobject-2.0"
export CFLAGS="$ARM_CFLAGS $CFLAGS"
export LDFLAGS="$ARM_LDFLAGS -Wl,--rpath-link -Wl,$TARGET_PREFIX/usr/lib/ $LDFLAGS"
# Set the build system vars here
BD_SRC_DIR="${ARM_HOME}/softs/sources/gtkfb/pango-1.16.4"
BD_PACKAGE_NAME="pango-1.16.4"
BD_ROOT="/tmp/${BD_PACKAGE_NAME}"
BD_PREFIX="/usr"
BD_DEST_DIR="${ARM_HOME}/arm_pkgs/gtkfb"
BD_CONFIG_OPTIONS="--host=arm-linux --without-x --sysconfdir=/etc"
BD_MAKE_OPTIONS=
BD_MAKE_INSTALL_OPTIONS="DESTDIR=$BD_ROOT"
BD_MAKE_CLEAN_OPTIONS=
# Set the packages build parted
BD_PACKAGE_DEV_CONTENT="usr/lib/*.la usr/lib/*/*/modules/*.la usr/lib/pkgconfig usr/include"
BD_PACKAGE_DOC_CONTENT="usr/share/gtk-doc usr/man"
BD_PACKAGE_LOCALE_CONTENT=
BD_PACKAGE_BIN_CONTENT="usr/lib/*.so* usr/lib/*/*/modules/*.so* usr/bin"
# Set the strip variables
BD_STRIP_OPTIONS="--strip-debug"
BD_STRIP_CONTENT="usr/lib/*"
function bd_info() {
echo "#####################################################################"
echo "#$1"
echo "#####################################################################"
}
function check_error() {
if [ ! "$?" = "0" ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! Build error at: `date`"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
fi
}
# Check need vars
if [ -z "${BD_SRC_DIR}" ]; then
echo "Must set the \${BD_SRC_DIR}"
exit 1
elif [ -z "${BD_PACKAGE_NAME}" ]; then
echo "Must set the \${BD_PACKAGE_NAME}"
exit 1
elif [ -z "${BD_DEST_DIR}" ]; then
echo "Must set the \${BD_DEST_DIR}"
exit 1
elif [ -z "${BD_ROOT}" ]; then
echo "Must set the \${BD_ROOT}"
exit 1
elif [ -z "${BD_PACKAGE_DEV_CONTENT}" ] && [ -z
"${BD_PACKAGE_DOC_CONTENT}" ] && [ -z
"${BD_PACKAGE_BIN_CONTENT}" ]; then
echo "Must set one of the package conent of
\${BD_PACKAGE_DEV_CONTENT},\${BD_PACKAGE_DOC_CONTENT},
\${BD_PACKAGE_BIN_CONTENT}"
exit 1
fi
# Begin to configure if configure options length is not zero
cd $BD_SRC_DIR
if [ ! "${BD_CONFIG_OPTIONS}" = "NO-CONFIG" ]; then
bd_info "Begin to configure ..."
./configure --prefix=${BD_PREFIX} ${BD_CONFIG_OPTIONS}
check_error
fi
# Begin to make
if [ ! "${BD_MAKE_OPTIONS}" = "NO-MAKE" ]; then
bd_info "Begin to make ..."
make ${BD_MAKE_OPTIONS}
check_error
fi
# Begin to make install
rm -fr "${BD_ROOT}"
mkdir -p "${BD_ROOT}"
check_error
if [ ! "${BD_MAKE_INSTALL_OPTIONS}" = "NO-INSTALL" ]; then
bd_info "Begin to make install ..."
make $BD_MAKE_INSTALL_OPTIONS install
check_error
fi
# Begin to clean
if [ ! "${BD_MAKE_CLEAN_OPTIONS}" = "NO-CLEAN" ]; then
bd_info "Begin to make clean ..."
make $BD_MAKE_CLEAN_OPTIONS clean
check_error
fi
# Begin to package
bd_info "Begin to make package ..."
if [ ! -d ${BD_DEST_DIR} ]; then
mkdir -p ${BD_DEST_DIR}
check_error
fi
cd $BD_ROOT
# Get package base directory path
pck_path_base="${BD_DEST_DIR}/${BD_PACKAGE_NAME}"
mkdir -p $pck_path_base
check_error
# Strip specialy symbols
if [ ! -z "$BD_STRIP_CONTENT" ]; then
echo "->Stip unneeded symbols..."
arm-linux-strip $BD_STRIP_OPTIONS $BD_STRIP_CONTENT
fi
# Compress and make packages
if [ ! -z "$BD_PACKAGE_DEV_CONTENT" ]; then
echo "->Build the develop package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-dev_chenyq.arm.tgz ${BD_PACKAGE_DEV_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_DOC_CONTENT" ]; then
echo "->Build the document package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-doc_chenyq.arm.tgz ${BD_PACKAGE_DOC_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_LOCALE_CONTENT" ]; then
echo "->Build the locales package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-nls_chenyq.arm.tgz ${BD_PACKAGE_LOCALE_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_BIN_CONTENT" ]; then
echo "->Build the binary package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}_chenyq.arm.tgz ${BD_PACKAGE_BIN_CONTENT} -C / > /dev/null
check_error
fi
rm -fr ${BD_ROOT}
check_error
n, 编译gtk用到的脚本
export CFLAGS="$ARM_CFLAGS $CFLAGS"
export LDFLAGS="$ARM_LDFLAGS -Wl,--rpath-link -Wl,$TARGET_PREFIX/usr/lib/ $LDFLAGS"
export PATH="`pwd`/depends_apps:$TARGET_PREFIX/usr/bin:$PATH"
export PKG_CONFIG_PATH=$TARGET_PREFIX/usr/lib/pkgconfig:$PKG_CONFIG_PATH
# Set the build system vars here
AC_CACHE_FILE="arm-linux.cache"
BD_SRC_DIR="${ARM_HOME}/softs/sources/gtkfb/gtk+-2.10.13"
BD_PACKAGE_NAME="gtk+-2.10.13"
BD_ROOT="/tmp/${BD_PACKAGE_NAME}"
BD_PREFIX="/usr"
BD_DEST_DIR="${ARM_HOME}/arm_pkgs/gtkfb"
BD_CONFIG_OPTIONS="--host=arm-linux --with-gdktarget=directfb --without-x --disable-glibtest --cache-file=$AC_CACHE_FILE"
BD_MAKE_OPTIONS=
BD_MAKE_INSTALL_OPTIONS="DESTDIR=$BD_ROOT"
BD_MAKE_CLEAN_OPTIONS=
# Set the packages build parted
BD_PACKAGE_DEV_CONTENT="usr/share/aclocal usr/share/gtk-2.0 usr/lib/*.la usr/lib/*/*/*/*.la usr/lib/pkgconfig usr/include"
BD_PACKAGE_DOC_CONTENT="usr/share/gtk-doc usr/share/man"
BD_PACKAGE_LOCALE_CONTENT="usr/share/locale"
BD_PACKAGE_BIN_CONTENT="usr/share/themes usr/bin usr/lib/*.so* usr/lib/*/*/*/*.so*"
# Set the strip variables
BD_STRIP_OPTIONS="--strip-debug"
BD_STRIP_CONTENT="usr/bin/* usr/lib/* usr/lib/*/*/*/*"
function bd_info() {
echo "#####################################################################"
echo "#$1"
echo "#####################################################################"
}
function check_error() {
if [ ! "$?" = "0" ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! Build error at: `date`"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
fi
}
# Check need vars
if [ -z "${BD_SRC_DIR}" ]; then
echo "Must set the \${BD_SRC_DIR}"
exit 1
elif [ -z "${BD_PACKAGE_NAME}" ]; then
echo "Must set the \${BD_PACKAGE_NAME}"
exit 1
elif [ -z "${BD_DEST_DIR}" ]; then
echo "Must set the \${BD_DEST_DIR}"
exit 1
elif [ -z "${BD_ROOT}" ]; then
echo "Must set the \${BD_ROOT}"
exit 1
elif [ -z "${BD_PACKAGE_DEV_CONTENT}" ] && [ -z
"${BD_PACKAGE_DOC_CONTENT}" ] && [ -z
"${BD_PACKAGE_BIN_CONTENT}" ]; then
echo "Must set one of the package conent of
\${BD_PACKAGE_DEV_CONTENT},\${BD_PACKAGE_DOC_CONTENT},
\${BD_PACKAGE_BIN_CONTENT}"
exit 1
fi
# Begin to configure if configure options length is not zero
cd $BD_SRC_DIR
if [ ! "${BD_CONFIG_OPTIONS}" = "NO-CONFIG" ]; then
bd_info "Begin to configure ..."
# Fix some problems
echo ac_cv_path_CUPS_CONFIG=no > $AC_CACHE_FILE
./configure --prefix=${BD_PREFIX} ${BD_CONFIG_OPTIONS}
check_error
fi
# Begin to make
if [ ! "${BD_MAKE_OPTIONS}" = "NO-MAKE" ]; then
bd_info "Begin to make ..."
make ${BD_MAKE_OPTIONS}
check_error
fi
# Begin to make install
rm -fr "${BD_ROOT}"
mkdir -p "${BD_ROOT}"
check_error
if [ ! "${BD_MAKE_INSTALL_OPTIONS}" = "NO-INSTALL" ]; then
bd_info "Begin to make install ..."
make $BD_MAKE_INSTALL_OPTIONS install
check_error
fi
# Begin to clean
if [ ! "${BD_MAKE_CLEAN_OPTIONS}" = "NO-CLEAN" ]; then
bd_info "Begin to make clean ..."
make $BD_MAKE_CLEAN_OPTIONS clean
check_error
fi
# Begin to package
bd_info "Begin to make package ..."
if [ ! -d ${BD_DEST_DIR} ]; then
mkdir -p ${BD_DEST_DIR}
check_error
fi
cd $BD_ROOT
# Get package base directory path
pck_path_base="${BD_DEST_DIR}/${BD_PACKAGE_NAME}"
mkdir -p $pck_path_base
check_error
# Strip specialy symbols
if [ ! -z "$BD_STRIP_CONTENT" ]; then
echo "->Stip unneeded symbols..."
arm-linux-strip $BD_STRIP_OPTIONS $BD_STRIP_CONTENT
fi
# Compress and make packages
if [ ! -z "$BD_PACKAGE_DEV_CONTENT" ]; then
echo "->Build the develop package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-dev_chenyq.arm.tgz ${BD_PACKAGE_DEV_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_DOC_CONTENT" ]; then
echo "->Build the document package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-doc_chenyq.arm.tgz ${BD_PACKAGE_DOC_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_LOCALE_CONTENT" ]; then
echo "->Build the locales package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}-nls_chenyq.arm.tgz ${BD_PACKAGE_LOCALE_CONTENT} -C / > /dev/null
check_error
fi
if [ ! -z "$BD_PACKAGE_BIN_CONTENT" ]; then
echo "->Build the binary package..."
tar -czvf ${pck_path_base}/${BD_PACKAGE_NAME}_chenyq.arm.tgz ${BD_PACKAGE_BIN_CONTENT} -C / > /dev/null
check_error
fi
rm -fr ${BD_ROOT}
check_error
好了编译部发完了, 待续---------------------
阅读(560) | 评论(0) | 转发(0) |