User: curvirgo
Date: 06/05/01 23:47:20

Modified:
 /ja/www/documents/develop/
  jabuild.function

Log:
 add shortname convert routine

File Changes:

Directory: /ja/www/documents/develop/
=====================================

File [changed]: jabuild.function
Url: 
http://ja.openoffice.org/source/browse/ja/www/documents/develop/jabuild.function?r1=1.7&r2=1.8
Delta lines:  +107 -77
----------------------
--- jabuild.function    12 Feb 2006 13:05:22 -0000      1.7
+++ jabuild.function    2 May 2006 06:47:17 -0000       1.8
@@ -11,10 +11,13 @@
 
 OPTION:
        --debug                         Debug mode
+        --devel                            Development build
        --download=[CVS TAG]            Download from CVS Repository and Build
-       --from=[Project]                Restart from specified project
-       --pack                          Packaging only
+        --from=[Project]                   Restart from specified project 
(Serial-Build only)
        --help                          Print this help
+        --html                             Output build processing html file 
(Invalid when a safe mode.)
+        --pack                             Packaging only
+        --safe                             Use safety build command
 EOF
   exit
 }
@@ -27,12 +30,12 @@
   for opt in $@
   do
     case ${opt} in
-      --curvirgo)
-        CURVIRGO_BUILD=Yes
-        ;;
       --debug)
         DEBUGMODE=Yes
         ;;
+      --devel)
+        DEVELMODE=Yes
+        ;;
       --download=*)
         TAG=`echo ${opt} | sed 's/--download=//'`
         [ x${TAG} = x ] && {
@@ -49,11 +52,17 @@
         }
         RESTART_BUILD=Yes
         ;;
+      --help)
+        PrintHelp
+        ;;
+      --html)
+        WITH_HTML=Yes
+        ;;
       --pack)
         PACKMODE=Yes
         ;;
-      --help)
-        PrintHelp
+      --safe)
+        SAFEMODE=Yes
         ;;
       *)
         PrintHelp
@@ -114,17 +123,13 @@
   local TAG=${1}
   local CVSROOT=:pserver:[EMAIL PROTECTED]:/cvs
   [ x`basename ${PWD}` = x${TAG} ] || {
-    mkdir -p -v ${TAG}
+    CreateDirectory ${TAG} "Create CVS-TAG Directory : Name is < ${TAG} >"
     cd ${TAG}
   }
+  PrintMessage "Download Source File from anoncvs Repository"
   cvs checkout -r ${TAG} OpenOffice
   if [ $? = 0 ]; then
     SRC_ROOT=`pwd`
-    [ x${CURVIRGO_BUILD} = xYes ] && {
-      ln -sf ../buildtools/temp
-      ln -sf ../buildtools/jabuild
-      ln -sf ../buildtools/jabuild.function
-    }
   else
     PrintMessage "source file (TAG=${TAG}) : Download (from CVS Repository) 
failed !!"
     exit
@@ -149,6 +154,21 @@
 }
 
 # ==================================================
+# 
Windowsでのロングファイル名をショートファイル名に変換し表示する(Unix表記)
+# ==================================================
+ConvertShortUnixName ()
+{
+  local FILENAME=${1}
+  shift
+  for n in $@
+  do
+    FILENAME="${FILENAME} ${n}"
+  done
+  FILENAME=`cygpath -ws "${FILENAME}"`
+  cygpath -u ${FILENAME}
+}
+
+# ==================================================
 # 
Linuxのディストリビューションを確認しデフォルトパッケージ名を表示する
 # ==================================================
 GetDefaultPackage ()
@@ -245,8 +265,10 @@
   cd ${RPM_DIR} &> /dev/null && {
     case ${PACKAGE_TYPE} in
       InstallSet)
+        [ x`echo ./desktop-integration/*.deb | sed '/\*/d'` = x ] || {
         PrintMessage "Delete deb_package desktop-integration file"
         rm -fv ./desktop-integration/*.deb
+        }
         ;;
       LanguagePack)
         rm -f *.sh
@@ -271,14 +293,11 @@
   local PACKAGE_TYPE=${1}
   cd ${PORTABLE_DIR} &> /dev/null && {
     [ x${PACKAGE_TYPE} = xInstallSet ] && {
-      local COUNT=`grep -in 'requires openoffice.org-core02' 
openoffice.org-core01.install | sed 's/:/ /' | awk '{print $1}'`
-      let COUNT=COUNT-1
-      head -n ${COUNT} openoffice.org-core01.install >  ${TEMP_DIR}/tempfile
-      COUNT=`grep -in 'Backing up old versions' openoffice.org-core01.install 
| sed 's/:/ /' | awk '{print $1}'`
-      tail +${COUNT} openoffice.org-core01.install >>  ${TEMP_DIR}/tempfile
-      mv -f ${TEMP_DIR}/tempfile openoffice.org-core01.install
+      PrintMessage "Dependency-Check fixed ..."
+      cat openoffice.org-core01.install | sed '/^#%requires/,/^fi/d' > 
openoffice.org-core01.install.fixed
+      mv -fv $openoffice.org-core01.install.fixed openoffice.org-core01.install
     }
-    rm -f *.tar.gz
+    rm -fv *.tar.gz
     cd ..
   }
 }
@@ -289,24 +308,22 @@
 AddhocFix_slackware ()
 {
   cd ${SLACKWARE_DIR} && {
-    for file in `echo * | sed '/\*/d'`
-    do
-      [ -d ${file} ] && rm -fr ${file}
-    done
-    mkdir -p tempdir
     for file in `echo *.tgz | sed '/\*/d'`
     do
-      PrintMessage "Unpacking installation set [ File : ${file}]"
-      tar zxf ${file} -Ctempdir && rm -f ${file}
+      local EXTENSION=`echo ${file} | awk -F- '{print 
$(NF-2)"-"$(NF-1)"-"$(NF)}'`
+      local BASENAME=`basename ${file} -${EXTENSION}`
+      [ -d ${BASENAME} ] || tar jxvf ${file} -C${BASENAME}
       PrintMessage "Replace Packager Name : [EMAIL PROTECTED] -> 
${BUILDER_NAME}"
-      cat tempdir/install/slack-desc | eval sed 's/[EMAIL 
PROTECTED]/${BUILDER_NAME}/' > slack-desc
-      mv -f slack-desc tempdir/install
+      cat ${BASENAME}/install/slack-desc | eval sed 's/[EMAIL 
PROTECTED]/${BUILDER_NAME}/' > slack-desc.${EXTENSION}
+      mv -fv slack-desc.${EXTENSION} ${BASENAME}/install/slack-desc
+      cd ${BASENAME} && {
+        local COMPRESSION=`cat 
${SRC_ROOT}/instsetoo_native/util/openoffice.lst | sed '/^OpenOffice$/,/^}$/!d' 
| grep -i compression | awk '{print $2}'`
       PrintMessage "Repacking installation set [ File : ${file}]"
-      local FILENAME=`basename ${file} .tgz`
-      cd tempdir && tar cf ../${FILENAME}.tar . && cd .. && gzip -9 
${FILENAME}.tar && mv ${FILENAME}.tar.gz ${FILENAME}.tgz
-      rm -fr tempdir/*
+        tar cvf - ./* | gzip -${COMPRESSION} - > ../${file}
+        cd ..
+        rm -fr ${BASENAME}
+      }
     done
-    rm -fr tempdir
     cd ..
   }
 }
@@ -322,6 +339,9 @@
     openoffice)
       PrintMessage "Create package. [Type : InstallSet] [Format : 
${PACKAGE_FORMAT}]"
       ;;
+    openofficedev)
+      PrintMessage "Create package. [Type : InstallSet (for Development)] 
[Format : ${PACKAGE_FORMAT}]"
+      ;;
     ooolanguagepack)
       PrintMessage "Create package. [Type : LanguagePack] [Format : 
${PACKAGE_FORMAT}]"
       ;;
@@ -368,36 +388,50 @@
 {
   local PACKAGE_FORMAT=${1}
   PrintMessage "Rebuild DesktopIntegration [Format : ${PACKAGE_FORMAT}]"
-  PKGFORMAT=${PACKAGE_FORMAT} BuildProject sysui
+  cd ${SRC_ROOT}/sysui
+  PKGFORMAT=${PACKAGE_FORMAT} build.pl || {
+    PrintMessage "Can't build ${PROJECT}, fix the bug above."
+    exit
+  }
+  deliver.pl
+  cd ${SRC_ROOT}
 }
 
 # ==================================================
-# LinuxIntel : 
複数のパッケージを作成する場合は、それぞれのパッケージを構築し直してからインストールセット及びランゲージパックを作成する
+# 
複数のパッケージを作成する場合は、それぞれのパッケージを構築し直してからインストールセット及びランゲージパックを作成する
+# Developmentパック作成時もここで構築し直す
 # ==================================================
 CreatePackage ()
 {
-  local PACKAGE_TYPE=${1}
+  local PKG_TYPE=${1}
   local PACKAGE_FORMAT=${2}
-  case ${PACKAGE_TYPE} in
+  case ${PKG_TYPE} in
     InstallSet)
+      if [ x${DEVELMODE} = xYes ]; then
+        local 
PKG_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/OpenOffice_Dev"
+        local PKG_NAME="OOo-Dev_${VERSION}_${OOO_BUILD_SYSTEM}_install"
+        local PACKAGE_TYPE=openofficedev
+      else
       local PKG_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/OpenOffice"
       local PKG_NAME="OOo_${VERSION}_${OOO_BUILD_SYSTEM}_install"
-      RebuildPackage openoffice ${PACKAGE_FORMAT}
+        local PACKAGE_TYPE=openoffice
+      fi
       ;;
     LanguagePack)
       local 
PKG_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/OpenOffice_languagepack"
       local PKG_NAME="OOo_${VERSION}_${OOO_BUILD_SYSTEM}_langpack"
-      RebuildPackage ooolanguagepack ${PACKAGE_FORMAT}
+      local PACKAGE_TYPE=ooolanguagepack
       ;;
     *)
       PrintMessage "Unknown package option !!"
       exit
       ;;
   esac
+  RebuildPackage ${PACKAGE_TYPE} ${PACKAGE_FORMAT}
   for LANGUAGE in ${LANGUAGES}
   do
     local PACKAGE_NAME="${PKG_NAME}_${LANGUAGE}_${BUILDER_NAME}"
-    PrintMessage "Packaging [Type : ${PACKAGE_TYPE}] [Language : ${LANGUAGE}] 
[Format : ${PACKAGE_FORMAT}]"
+    PrintMessage "Packaging [Type : ${PKG_TYPE}] [Language : ${LANGUAGE}] 
[Format : ${PACKAGE_FORMAT}]"
     case ${OOO_BUILD_SYSTEM} in
       LinuxIntel)
         local PACKAGE_DIR="${PKG_DIR}/${PACKAGE_FORMAT}/install/${LANGUAGE}"
@@ -405,10 +439,10 @@
         cd ${PACKAGE_DIR} &> /dev/null && {
           case ${PACKAGE_FORMAT} in
             portable)
-              AddhocFix_portable ${PACKAGE_TYPE}
+              AddhocFix_portable ${PKG_TYPE}
               ;;
             rpm)
-              AddhocFix_rpm ${PACKAGE_TYPE}
+              AddhocFix_rpm ${PKG_TYPE}
               ;;
             slackware)
               AddhocFix_slackware
@@ -423,16 +457,16 @@
         local PACKAGE_DIR="${PKG_DIR}/msi/install/${LANGUAGE}"
         local PACKAGE_CMD="zip -r ${PKGOUTDIR}/${PACKAGE_NAME}.zip *"
         cd ${PACKAGE_DIR}_download &> /dev/null && {
-          ${GNUCP} -vp *_${LANGUAGE}.exe ${PKGOUTDIR}/${PACKAGE_NAME}.exe
+          ${GNUCP} -vp *.exe ${PKGOUTDIR}/${PACKAGE_NAME}.exe
           cd ${SRC_ROOT}
         }
         ;;
       *)
         local PACKAGE_DIR="${PKG_DIR}/*/install/${LANGUAGE}"
-        local PACKAGE_CMD="tar zcvf ${PKGOUTDIR}/${PACKAGE_NAME}.tar.gz *"
+        local PACKAGE_CMD="tar cvf - * | gzip - > 
${PKGOUTDIR}/${PACKAGE_NAME}.tar.gz"
         ;;
     esac
-    Package "${PACKAGE_DIR}" "${PACKAGE_CMD}" "${PACKAGE_TYPE}"
+    Package "${PACKAGE_DIR}" "${PACKAGE_CMD}" "${PKG_TYPE}"
   done
 }
 
@@ -444,23 +478,23 @@
 {
   local LANGUAGE=${1}
   local 
PACKAGE_NAME="OOo_${VERSION}_${OOO_BUILD_SYSTEM}_sdk_${LANGUAGE}_${BUILDER_NAME}"
-  local 
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/OpenOffice_SDK/*/install/${LANGUAGE}"
-  local PACKAGE_CMD="tar zcvf ${PKGOUTDIR}/${PACKAGE_NAME}.tar.gz *"
   PrintMessage "Packaging SDK [Language : ${LANGUAGE} ]"
   case ${OOO_BUILD_SYSTEM} in
     LinuxIntel)
-      
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/OpenOffice_SDK/rpm/install/${LANGUAGE}"
-      PACKAGE_CMD="tar jcvf 
${PKGOUTDIR}/${PACKAGE_NAME}_${DEFAULT_PACKAGE}.tar.bz2 *"
+      local 
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/OpenOffice_SDK/rpm/install/${LANGUAGE}"
+      local PACKAGE_CMD="tar jcvf 
${PKGOUTDIR}/${PACKAGE_NAME}_${DEFAULT_PACKAGE}.tar.bz2 *"
       ;;
     Win32Intel)
-      
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/OpenOffice_SDK/msi/install/${LANGUAGE}"
-      PACKAGE_CMD="zip -r ${PKGOUTDIR}/${PACKAGE_NAME}.zip *"
+      local 
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/OpenOffice_SDK/msi/install/${LANGUAGE}"
+      local PACKAGE_CMD="zip -r ${PKGOUTDIR}/${PACKAGE_NAME}.zip *"
       cd ${PACKAGE_DIR}_download &> /dev/null && {
         ${GNUCP} -vp *.exe ${PKGOUTDIR}/${PACKAGE_NAME}.exe
         cd ${SRC_ROOT}
       }
       ;;
     *)
+      local 
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/OpenOffice_SDK/*/install/${LANGUAGE}"
+      local PACKAGE_CMD="tar cvf - * | gzip - > 
${PKGOUTDIR}/${PACKAGE_NAME}.tar.gz"
       ;;
   esac
   Package "${PACKAGE_DIR}" "${PACKAGE_CMD}" SDK
@@ -480,7 +514,7 @@
       zip -r -9 
${PKGOUTDIR}/OOo_${VERSION}_${OOO_BUILD_SYSTEM}_solver_${BUILDER_NAME}.zip 
solver
       ;;
    *)
-      tar zcvf 
${PKGOUTDIR}/OOo_${VERSION}_${OOO_BUILD_SYSTEM}_solver_${BUILDER_NAME}.tar.gz 
solver
+      tar cvf - solver | gzip - > 
${PKGOUTDIR}/OOo_${VERSION}_${OOO_BUILD_SYSTEM}_solver_${BUILDER_NAME}.tar.gz
       ;;
   esac
 }
@@ -490,27 +524,26 @@
 # ==================================================
 PackageURE ()
 {
-  local URE_LINE_START=`grep -in "^ure" 
${SRC_ROOT}/instsetoo_native/util/openoffice.lst | sed 's/:/ /' | awk '{print 
$1}'`
-  local URE_LINE_END=`tail +${URE_LINE_START} 
${SRC_ROOT}/instsetoo_native/util/openoffice.lst | grep -in "^}" | tr '\n' ' ' 
| sed 's/:/ /g' | awk '{print $1}'`
+  local URE_LINE_START=`grep -n "^URE" 
${SRC_ROOT}/instsetoo_native/util/openoffice.lst | awk -F: '{print $1}'`
   local URE_VERSION=`tail +${URE_LINE_START} 
${SRC_ROOT}/instsetoo_native/util/openoffice.lst | grep -i 'package.*sion' | tr 
'\n' ' ' | awk '{print $2"-"$4}'`
   local 
PACKAGE_NAME="URE_${URE_VERSION}_${OOO_BUILD_SYSTEM}_install_${BUILDER_NAME}"
-  local 
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/URE/*/install/en-US"
-  local PACKAGE_CMD="tar zcvf ${PACKAGE_NAME}.tar.gz *"
   PrintMessage "Copy to PKGOUTDIR Pack UnoRuntime Environment"
   case ${OOO_BUILD_SYSTEM} in
     LinuxIntel)
-      
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/URE/rpm/install/en-US"
-      PACKAGE_CMD="tar jcvf ${PKGOUTDIR}/${PACKAGE_NAME}.tar.bz2 RPMS"
+      local 
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/URE/rpm/install/en-US"
+      local PACKAGE_CMD="tar jcvf ${PKGOUTDIR}/${PACKAGE_NAME}.tar.bz2 RPMS"
       ;;
     Win32Intel)
-      
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/URE/msi/install/en-US"
-      PACKAGE_CMD="zip -r ${PKGOUTDIR}/${PACKAGE_NAME}.zip *"
+      local 
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/URE/msi/install/en-US"
+      local PACKAGE_CMD="zip -r ${PKGOUTDIR}/${PACKAGE_NAME}.zip *"
       cd ${PACKAGE_DIR}_download &> /dev/null && {
         ${GNUCP} -vp *_en-US.exe ${PKGOUTDIR}/${PACKAGE_NAME}.exe
         cd ${SRC_ROOT}
       }
       ;;
     *)
+      local 
PACKAGE_DIR="${SRC_ROOT}/instsetoo_native/${OOOUTPATH}.pro/URE/*/install/en-US"
+      local PACKAGE_CMD="tar cvf - * | gzip - > 
${PKGOUTDIR}/${PACKAGE_NAME}.tar.gz"
       ;;
   esac
   Package "${PACKAGE_DIR}" "${PACKAGE_CMD}" "Uno Runtime Environment"
@@ -527,7 +560,7 @@
   for FILENAME in `echo 
*_install_${LANGUAGE}_${BUILDER_NAME}_${PACKAGE_FORMAT}.tar.bz2 | sed -e 
's/\.tar\.bz2//' -e '/\*/d'`
   do
     PrintMessage "Divide Package [Language = ${LANGUAGE}] : [Package = 
${PACKAGE_FORMAT}]"
-    [ -d ${PKGOUTDIR}/${PACKAGE_FORMAT} ] || mkdir -vp 
${PKGOUTDIR}/${PACKAGE_FORMAT}
+    [ -d ${PKGOUTDIR}/${PACKAGE_FORMAT} ] || mkdir -p 
${PKGOUTDIR}/${PACKAGE_FORMAT}
     cd ${PKGOUTDIR}/${PACKAGE_FORMAT}
     PrintMessage "UNPACKING FILENAME = ${FILENAME}.tar.bz2"
     tar jxvf ../${FILENAME}.tar.bz2
@@ -545,16 +578,13 @@
         DIRECTORY=${SLACKWARE_DIR}
         ;;
     esac
-    PrintMessage "Moving Core Files"
-    [ -d ${PKGOUTDIR}/${PACKAGE_FORMAT}/core/${DIRECTORY} ] || mkdir -vp 
${PKGOUTDIR}/${PACKAGE_FORMAT}/core/${DIRECTORY}
-    mv -v ${PKGOUTDIR}/${PACKAGE_FORMAT}/${DIRECTORY}/*core* 
${PKGOUTDIR}/${PACKAGE_FORMAT}/core/${DIRECTORY}
-    PrintMessage "Packaging Filename = ${FILENAME}_other.tar.bz2"
-    tar jcvf ${PKGOUTDIR}/${FILENAME}_other.tar.bz2 `echo * | sed 's/core//'`
-    cd ${PKGOUTDIR}/${PACKAGE_FORMAT}/core
     PrintMessage "Packaging Filename = ${FILENAME}_core.tar.bz2"
-    tar jcvf ${PKGOUTDIR}/${FILENAME}_core.tar.bz2 ${DIRECTORY}
+    tar jcvf ${PKGOUTDIR}/${FILENAME}_core.tar.bz2 ${DIRECTORY}/*core*
+    rm -f ${DIRECTORY}/*core*
+    PrintMessage "Packaging Filename = ${FILENAME}_other.tar.bz2"
+    tar jcvf ${PKGOUTDIR}/${FILENAME}_other.tar.bz2 *
     cd ${PKGOUTDIR}
-    rm -fvr ${PKGOUTDIR}/${PACKAGE_FORMAT}
+    rm -fr ${PKGOUTDIR}/${PACKAGE_FORMAT}
   done
   cd ${SRC_ROOT}
 }




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

メールによる返信