[CalendarServer-changes] [7564] CalendarServer/branches/users/glyph/deploybuild
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jun 7 17:00:39 PDT 2011
Revision: 7564
http://trac.macosforge.org/projects/calendarserver/changeset/7564
Author: glyph at apple.com
Date: 2011-06-07 17:00:39 -0700 (Tue, 07 Jun 2011)
Log Message:
-----------
Add a -b option to bundle dependencies.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/deploybuild/run
CalendarServer/branches/users/glyph/deploybuild/support/build.sh
Modified: CalendarServer/branches/users/glyph/deploybuild/run
===================================================================
--- CalendarServer/branches/users/glyph/deploybuild/run 2011-06-07 23:58:55 UTC (rev 7563)
+++ CalendarServer/branches/users/glyph/deploybuild/run 2011-06-08 00:00:39 UTC (rev 7564)
@@ -44,7 +44,7 @@
echo;
fi;
- echo "Usage: ${program} [-hvgsfnpdkrR] [-K key] [-iI dst] [-t type] [-S statsdirectory] [-P plugin]";
+ echo "Usage: ${program} [-hvgsfnpdkrR] [-K key] [-iIb dst] [-t type] [-S statsdirectory] [-P plugin]";
echo "Options:";
echo " -h Print this help and exit";
echo " -v Be verbose";
@@ -59,6 +59,7 @@
echo " -K Print value of configuration key and exit";
echo " -i Perform a system install into dst; implies -s";
echo " -I Perform a home install into dst; implies -s";
+ echo " -b Perform a bundled install (include all dependencies) into dst; implies -s";
echo " -t Select the server process type (Master, Slave or Combined) [${service_type}]";
echo " -S Write a pstats object for each process to the given directory when the server is stopped.";
echo " -P Select the twistd plugin name [${plugin_name}]";
@@ -74,7 +75,7 @@
# functions in build.sh.
parse_options () {
OPTIND=1;
- while getopts "ahvgsfnpdkrK:i:I:t:S:P:R:" option; do
+ while getopts "ahvgsfnpdkrK:i:I:b:t:S:P:R:" option; do
case "${option}" in
'?') usage; ;;
'h') usage -; exit 0; ;;
@@ -90,9 +91,32 @@
'S') profile="-p ${OPTARG}"; ;;
'g') do_get="true" ; do_setup="false"; do_run="false"; ;;
's') do_get="true" ; do_setup="true" ; do_run="false"; ;;
- 'p') do_get="false"; do_setup="false"; do_run="false"; print_path="true"; ;;
- 'i') do_get="true" ; do_setup="true" ; do_run="false"; install="${OPTARG}"; install_flag="--root="; ;;
- 'I') do_get="true" ; do_setup="true" ; do_run="false"; install="${wd}/build/dst"; install_flag="--root="; install_home="${OPTARG}"; ;;
+ 'p')
+ do_get="false"; do_setup="false"; do_run="false"; print_path="true";
+ ;;
+ 'i')
+ do_get="true";
+ do_setup="true";
+ do_run="false";
+ install="${OPTARG}";
+ install_flag="--root=";
+ ;;
+ 'I')
+ do_get="true";
+ do_setup="true";
+ do_run="false";
+ install="${wd}/build/dst";
+ install_flag="--root=";
+ install_home="${OPTARG}";
+ ;;
+ 'b')
+ do_bundle="true";
+ do_get="true";
+ do_setup="true";
+ do_run="false";
+ install="${OPTARG}";
+ install_flag="--root=";
+ ;;
'n') do_get="false" ; do_setup="false"; ;;
esac;
done;
Modified: CalendarServer/branches/users/glyph/deploybuild/support/build.sh
===================================================================
--- CalendarServer/branches/users/glyph/deploybuild/support/build.sh 2011-06-07 23:58:55 UTC (rev 7563)
+++ CalendarServer/branches/users/glyph/deploybuild/support/build.sh 2011-06-08 00:00:39 UTC (rev 7564)
@@ -41,6 +41,7 @@
do_get="true";
do_setup="true";
do_run="true";
+ do_bundle="false";
force_setup="false";
disable_setup="false";
print_path="false";
@@ -489,6 +490,8 @@
fi;
}
+# Run 'make' with the given command line, prepending a -j option appropriate to
+# the number of CPUs on the current machine, if that can be determined.
jmake () {
case "$(uname -s)" in
Darwin|Linux)
@@ -529,8 +532,19 @@
www_get ${f_hash} "${name}" "${srcdir}" "${uri}";
- local dstroot="${srcdir}/_root";
+ if "${do_bundle}"; then
+ local dstroot="${install}";
+ else
+ local dstroot="${srcdir}/_root";
+ fi;
+ export PATH="${PATH}:${dstroot}/bin";
+ export C_INCLUDE_PATH="${C_INCLUDE_PATH:-}:${dstroot}/include";
+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:${dstroot}/lib";
+ export CPPFLAGS="${CPPFLAGS:-} -I${dstroot}/include";
+ export LDFLAGS="${LDFLAGS:-} -L${dstroot}/lib";
+ export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH:-}:${dstroot}/lib";
+
if "${do_setup}" && (
"${force_setup}" || [ ! -d "${dstroot}" ]); then
echo "Building ${name}...";
@@ -539,13 +553,6 @@
jmake;
jmake install;
fi;
-
- export PATH="${PATH}:${dstroot}/bin";
- export C_INCLUDE_PATH="${C_INCLUDE_PATH:-}:${dstroot}/include";
- export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:${dstroot}/lib";
- export CPPFLAGS="${CPPFLAGS:-} -I${dstroot}/include";
- export LDFLAGS="${LDFLAGS:-} -L${dstroot}/lib";
- export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH:-}:${dstroot}/lib";
}
@@ -570,8 +577,7 @@
"http://monkey.org/~provos/${le}.tar.gz";
c_dependency -m "583441a25f937360624024f2881e5ea8" \
"memcached" "${mc}" \
- "http://memcached.googlecode.com/files/${mc}.tar.gz" \
- --with-libevent="${top}/${le}/_root";
+ "http://memcached.googlecode.com/files/${mc}.tar.gz";
fi;
if ! type postgres > /dev/null 2>&1; then
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110607/651935ae/attachment-0001.html>
More information about the calendarserver-changes
mailing list