User: curvirgo Date: 05/12/12 00:56:02 Modified: /ja/www/documents/develop/ jabuild
Log: Add packaging mode, etc. File Changes: Directory: /ja/www/documents/develop/ ===================================== File [changed]: jabuild Url: http://ja.openoffice.org/source/browse/ja/www/documents/develop/jabuild?r1=1.1&r2=1.2 Delta lines: +177 -158 ----------------------- --- jabuild 11 Dec 2005 22:55:58 -0000 1.1 +++ jabuild 12 Dec 2005 08:55:58 -0000 1.2 @@ -1,6 +1,27 @@ #!/bin/bash # Encoding is UTF-8. (There is no BOM.) -[ x${DEBUG} = xTRUE ] && set -x +# Useful OpenOffice.org 2.0.x only. + +# ================================================== +# jabuild.functionããã³ã«ã¹ã¿ãã¤ãºè¨å®å¤ã®ãã¼ã +# ================================================== +if [ -f `dirname $0`/jabuild.function ]; then + . `dirname $0`/jabuild.function +else + echo "jabuild.function not found !!" + exit +fi +[ -f ./ooobuild.conf ] && . ./ooobuild.conf + +# ================================================== +# ã³ãã³ããã©ã¡ã¼ã¿ã®å¦ç +# ================================================== +ParameterProcessing $@ + +# ================================================== +# DEBUGMODEã®è¨å® +# ================================================== +[ x${DEBUGMODE} = xYes ] && set -x # ================================================== # ããã©ã«ãã®ãã«ãç°å¢è¨å® @@ -40,7 +61,7 @@ MOZ_WINTOOLS_LOCATE=${MOZ_WINTOOLS_LOCATE:-http://ftp.mozilla.org/pub/mozilla.org/mozilla/source} CONFIG_FLAGS="--with-lang=\"${LANGUAGES}\" --with-dict=ALL --with-images='hicontrast industrial crystal'" -BUILD_OPTION=${BUILD_OPTION:-"strip=true"} +BUILD_OPTION=${BUILD_OPTION:-"--all strip=true"} PACKAGE_FORMAT=${PACKAGE_FORMAT:-"rpm deb portable slackware"} CREATE_SDK=${CREATE_SDK:-Yes} CREATE_SOLVER=${CREATE_SOLVER:-Yes} @@ -61,18 +82,7 @@ RPM_DIR=${RPM_DIR:-RPMS} DEB_DIR=${DEB_DIR:-DEBS} PORTABLE_DIR=${PORTABLE_DIR:-linux-2.4-intel} - -# ================================================== -# jabuild.functionããã³ã«ã¹ã¿ãã¤ãºè¨å®å¤ã®ãã¼ã -# ================================================== -if [ -f ./jabuild.function ]; then - . ./jabuild.function -else - echo "jabuild.function not found !!" - exit -fi - -[ -f ./ooobuild.conf ] && . ./ooobuild.conf +SLACKWARE_DIR=${SLACKWARE_DIR:-linux-2.4-intel} export JAVA_HOME ANT_HOME @@ -98,7 +108,6 @@ else OOOUTPATH=unxlngi4 # gcc 3.3 fiLanguagePack -# CONFIG_FLAGS="${CONFIG_FLAGS} --prefix=${PREFIX} --enable-gcc3 --enable-gtk --enable-kde --enable-cups --enable-fontconfig --enable-libart --with-system-freetype --enable-openldap --enable-libsn -enable-pam-link --enable-xrender-link --with-system-xrender-headers" CONFIG_FLAGS="${CONFIG_FLAGS} --prefix=${PREFIX} --enable-gcc3 --enable-gtk --enable-kde --enable-cups --enable-fontconfig --enable-libart --enable-openldap --enable-libsn -enable-pam-link --enable-xrender-link" DEFAULT_PACKAGE=`GetDefaultPackage` CONFIG_FLAGS="${CONFIG_FLAGS} --with-package-format=${DEFAULT_PACKAGE}" @@ -164,21 +173,23 @@ # ================================================= CreateDirectory ${PKGOUTDIR} "Creating Package Out directory" +[ x${PACKMODE} = xYes ] || { + # ================================================= # GPCã®ãã¦ã³ãã¼ãã¨å±é # ================================================= -[ -f ${SRC_ROOT}/external/gpc/gpc.c -a -f ${SRC_ROOT}/external/gpc/gpc.h ] || { + [ -f ${SRC_ROOT}/external/gpc/gpc.c -a -f ${SRC_ROOT}/external/gpc/gpc.h ] || { PrintMessage "Download, unpack and copying GPC" DownloadFile ${GPC_LOCATE} ${GPC_ARCHIVE} unzip -o -d ${TEMP_DIR} ${TEMP_DIR}/${GPC_ARCHIVE} mv ${TEMP_DIR}/gpc231/* ${SRC_ROOT}/external/gpc/ rmdir ${TEMP_DIR}/gpc231 -} + } # ================================================= # Mozillaã½ã¼ã¹ãªã©ã®ãã¦ã³ãã¼ãã¨æå®ä½ç½®ã¸ã®ã³ãã¼ãããã³CONFIG_FLAGSã®è¨å® # ================================================= -if [ x${ENABLE_MOZILLA} = xYes ]; then + if [ x${ENABLE_MOZILLA} = xYes ]; then PrintMessage "Download mozilla source file" DownloadFile ${MOZILLA_SOURCE_LOCATE} ${MOZILLA_SOURCE_ARCHIVE} ${GNUCP} -v ${TEMP_DIR}/${MOZILLA_SOURCE_ARCHIVE} ${SRC_ROOT}/moz/download @@ -191,14 +202,14 @@ ${GNUCP} -v ${TEMP_DIR}/${MOZ_WINTOOLS_ARCHIVE} ${SRC_ROOT}/moz/download } CONFIG_FLAGS="${CONFIG_FLAGS} --enable-mozilla --enable-build-mozilla --with-mozilla-version=${MOZILLA_VERSION}" -else + else CONFIG_FLAGS="${CONFIG_FLAGS} --disable-mozilla" -fi + fi # ================================================= # Windowsä¸ã§ã®å®è¡æã«å¿ è¦ã¨ãªãDLLã®æå®ä½ç½®ã¸ã®ã³ãã¼(Visual C++ã¤ã³ã¹ãã¼ã«å ãã³ãã³ããµã¼ããã¹ã«ç»é²ããã¦ããå¿ è¦æã) # ================================================= -[ x${OOO_BUILD_SYSTEM} = xWin32Intel ] && { + [ x${OOO_BUILD_SYSTEM} = xWin32Intel ] && { VCP71DIR=${SRC_ROOT}/external/msvcp71 PrintMessage "Copying required Dynamic link libralies" CreatePackage InstallSet @@ -209,14 +220,14 @@ CreateDirectory ${VCP71DIR} install -v -m755 `which msvcp71.dll` ${VCP71DIR} install -v -m755 `which msvcr71.dll` ${VCP71DIR} -} + } # ================================================== # åå½èªç¨Wordbookãåå¨ããªãå ´åã«ã代æ¿ã¨ãã¦è±èªç¨ãã¡ã¤ã«ãåå½èªç¨ã®ãã£ã¬ã¯ããªã«ã³ãã¼ãã # For the detail, see issue #10718 # ================================================== -PrintMessage "Fixed Japanese original issues" -cd ${SRC_ROOT}/extras/source/wordbook/lang &> /dev/null && { + PrintMessage "Fixed Japanese original issues" + cd ${SRC_ROOT}/extras/source/wordbook/lang &> /dev/null && { for LNG in ${LANGUAGES} do [ -d ${LNG} ] || { @@ -225,39 +236,41 @@ } done cd ${SRC_ROOT} -} + } # ================================================== # [EMAIL PROTECTED] # ================================================== -[ x${REPLACE_VENDOR_NAME} = xYes ] && { + [ x${REPLACE_VENDOR_NAME} = xYes ] && { PrintMessage "Replace Vendor name" cd svx/source/intro &> /dev/null && { [ -e makefile.mk.original ] || { ${GNUCP} makefile.mk makefile.mk.original + PrintMessage "Replace VendorName : [EMAIL PROTECTED] -> ${BUILDER_NAME}" cat makefile.mk.original | eval sed 's/\$\(USER\)\$\(USERNAME\)/${BUILDER_NAME}/' > makefile.mk } cd ${SRC_ROOT} } -} + } # ================================================== # ã¹ãã©ãã·ã¥ã¤ã¡ã¼ã¸ã®ç½®æ # ================================================== -[ x${REPLACE_SPLASH} = xYes ] && { + [ x${REPLACE_SPLASH} = xYes ] && { PrintMessage "Replace splash images" ${GNUCP} -fv ${TEMP_DIR}/bmp/*.bmp ${SRC_ROOT}/svx/res ${GNUCP} -fv ${TEMP_DIR}/bmp/*.png ${SRC_ROOT}/svx/res ${GNUCP} -fv ${TEMP_DIR}/bmp/*.png ${SRC_ROOT}/svx/source/intro ${GNUCP} -fv ${TEMP_DIR}/bmp/openintro.bmp ${SRC_ROOT}/svx/res/ooointro.bmp ${GNUCP} -fv ${TEMP_DIR}/bmp/*.png ${SRC_ROOT}/default_images/svx/res -} + } # ================================================== # CCACHEã使ç¨ãã¦ãã«ãããããã«ç°å¢å¤æ°ã¸è¨å® # ================================================== -[ x${OOO_BUILD_SYSTEM} != xWin32Intel ] && { + [ x${OOO_BUILD_SYSTEM} != xWin32Intel ] && { [ x`which ccache` = x ] || { + PrintMessage "Enable gcc over CCACHE" if [ ${OOO_BUILD_SYSTEM} = SolarisSparc -o ${OOO_BUILD_SYSTEM} = SolarisIntel ]; then export CC="ccache cc" export CXX="CC" @@ -266,13 +279,13 @@ export CXX="ccache g++" fi } -} + } # ================================================== # ãã§ã«patchãã¡ã¤ã«ãé©ç¨æ¸ã¿ã確èªããæªé©ç¨ã®å ´åã¯ApplyPatchãã¡ã³ã¯ã·ã§ã³ãã³ã¼ã«ãã # ã¾ããpatché©ç¨ãããã¡ã¤ã«ã®ã¿å¾ããåé¤ã§ããããã«åé¤ç¨ã®ã¹ã¯ãªãããã¡ã¤ã«ã使ãã # ================================================== -[ x${ORIGINALPATCH} = xYes ] && { + [ x${ORIGINALPATCH} = xYes ] && { [ -e ${SRC_ROOT}/patch.log ] || { PrintMessage "Patching original patches" [ -e ${PATCH_DIR} ] && ApplyPatch ${PATCH_DIR} @@ -281,38 +294,42 @@ grep -i "patching file" ${SRC_ROOT}/patch.log | sed -e 's/patching file /rm -fv /' >> ${SRC_ROOT}/remove_patched_file.sh chmod 755 ${SRC_ROOT}/remove_patched_file.sh } -} + } # ================================================== # configure # ================================================== -Configure "${CONFIG_FLAGS}" + Configure "${CONFIG_FLAGS}" + +} # ================================================== # ãã«ãç°å¢è¨å®ã¹ã¯ãªããã®ãã¼ã # ================================================== LoadBuildEnvironment +[ x${PACKMODE} = xYes ] || { + # ================================================== # 忣ãã«ããã¼ã«dmakeã®ãã«ã # ================================================== -if [ -f ./bootstrap ]; then + if [ -f ./bootstrap ]; then PrintMessage "Bootstrapping." ./bootstrap || { PrintMessage "Bootstrap failed. Fix it!" exit } -else + else PrintMessage "Configure failed. Fix it!" exit -fi + fi # ================================================== # ãã¼ã«ã©ã¤ãºãã¼ã¿ç¨ãã¼ã«ã®ãã«ãã¨ãªãªã¸ãã«ãã¼ã«ã©ã¤ãºãã¼ã¿ã®ç»é² # ================================================== -[ x${MERGE_LOCALIZE_DATA} = xYes ] && { + [ x${MERGE_LOCALIZE_DATA} = xYes ] && { PrintMessage "Prepare localize tools." - BuildProject transex3 "--all ${BUILD_OPTION}" + BuildProject transex3 "${BUILD_OPTION}" PrintMessage "Merging localize data." for GSI in `echo ${TEMP_DIR}/sdf/*.sdf | sed '/\*/d'` do @@ -321,12 +338,12 @@ localize -m -x -l ${LNG} -f ${GSI} done done -} + } # ================================================== # LinuxIntel : è¤æ°ã®ããã±ã¼ã¸ã使ããå ´åã«ãããã©ã«ã以å¤ã®ã¡ãã¥ã¼ç»é²ç¨ããã±ã¼ã¸ã¯ä½æãããªãçºããã以å¤ã®ã¡ãã¥ã¼ç»é²ç¨ããã±ã¼ã¸ãåãã£ã¦ä½æãã # ================================================== -[ x${OOO_BUILD_SYSTEM} = xLinuxIntel ] && { + [ x${OOO_BUILD_SYSTEM} = xLinuxIntel ] && { MENU_CONFIG="${CONFIG_FLAGS}" PrintMessage "Prepare menus package." for PKG in ${PACKAGE_FORMAT} @@ -339,10 +356,10 @@ slackware) ;; *) - MENU_CONFIG=`echo "${CONFIG_FLAGS}" | eval sed 's/--with-package-format=${DEFAULT_PACKAGE}/-with-package-format=${PKG}/'` + MENU_CONFIG=`echo "${CONFIG_FLAGS}" | eval sed 's/--with-package-format=${DEFAULT_PACKAGE}/--with-package-format=${PKG}/'` Configure "${MENU_CONFIG}" LoadBuildEnvironment - BuildProject sysui "--all ${BUILD_OPTION}" + BuildProject sysui "${BUILD_OPTION}" ;; esac done @@ -350,16 +367,16 @@ Configure "${CONFIG_FLAGS}" LoadBuildEnvironment } -} + } # ================================================== # ãã«ãããã»ã¹ã®éå§ # ================================================== -BLD_OPTION="--all product=full" -MESSAGE="Serial Building ..." -PrintMessage "Start build process." -[ x${WITH_HTML} = xYes ] && BLD_OPTION="${BLD_OPTION} --html" -case ${OOO_BUILD_SYSTEM} in + BLD_OPTION="product=full" + MESSAGE="Serial Building ..." + PrintMessage "Start build process." + [ x${WITH_HTML} = xYes ] && BLD_OPTION="${BLD_OPTION} --html" + case ${OOO_BUILD_SYSTEM} in LinuxIntel) ParallelSetting [ $? = 0 ] && MESSAGE="Parallel Building ..." @@ -370,9 +387,11 @@ ParallelSetting [ $? = 0 ] && MESSAGE="Parallel Building ..." ;; -esac -PrintMessage "${MESSAGE}" -BuildProject instsetoo_native/util "${BLD_OPTION} ${BUILD_OPTION}" + esac + PrintMessage "${MESSAGE}" + BuildProject instsetoo_native/util "${BUILD_OPTION} ${BLD_OPTION}" + +} # ================================================== # SDK ããã±ã¼ã¸ã®ä½æ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
