]> err.no Git - sope/commitdiff
fixed some pkg build issues
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 27 Sep 2005 22:16:06 +0000 (22:16 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 27 Sep 2005 22:16:06 +0000 (22:16 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1134 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

maintenance/ChangeLog
maintenance/make-osxmpkg.sh
maintenance/make-osxpkg.sh

index ac59352c0eb3d77595567854d4ae4e96a24dcb9a..432952190b54d55fd0caff34a72774d3edc39db8 100644 (file)
@@ -1,3 +1,7 @@
+2005-09-28  Helge Hess  <helge.hess@opengroupware.org>
+
+       * make-osxpkg.sh, make-osxmpkg.sh: fixed some pkg build issues
+
 2005-08-21  Helge Hess  <helge.hess@opengroupware.org>
 
        * added files required to build an OSX package
index 1d42893c5ec5a71e582bd0ddf0042ddd6b75406b..529fac7cd5ec9b163e6e544e024a0f46ae71925f 100755 (executable)
@@ -31,6 +31,15 @@ SUDO="sudo"
 RM_R="rm -r"
 
 
+# ****************************** options ******************************
+
+# if we set this to 'yes', we get no 'upgrade' button on "reinstalls"
+PKG_IS_RELOCATABLE=no
+
+# RootAuthorization / AdminAuthorization
+PKG_AUTHORIZATION=RootAuthorization
+
+
 # ****************************** usage ********************************
 
 function usage() {
@@ -136,15 +145,26 @@ function genInfoPList() {
   plistWriteDate   >>$F IFPkgBuildDate "`date -u +%Y-%m-%dT%H:%M:%SZ`"
   plistWriteString >>$F IFPkgBuildVersion                 "${PKG_VERSION}"
   #plistWriteBool   >>$F IFPkgFlagAllowBackRev             true
-  plistWriteString >>$F IFPkgFlagAuthorizationAction      AdminAuthorization
+
+  # allowed: AdminAuthorization, RootAuthorization, ??
+  plistWriteString >>$F IFPkgFlagAuthorizationAction      ${PKG_AUTHORIZATION}
+  
   plistWriteString >>$F IFPkgFlagBackgroundAlignment      topright
   plistWriteString >>$F IFPkgFlagBackgroundScaling        none
   plistWriteString >>$F IFPkgFlagDefaultLocation          /
   #plistWriteBool   >>$F IFPkgFlagFollowLinks              true
+
   #plistWriteBool   >>$F IFPkgFlagInstallFat               true
+
   #plistWriteBool   >>$F IFPkgFlagIsRequired               false
   #plistWriteBool   >>$F IFPkgFlagOverwritePermissions     false
-  plistWriteBool   >>$F IFPkgFlagRelocatable              true
+
+  if test "x${PKG_IS_RELOCATABLE}" = "xyes"; then
+    plistWriteBool   >>$F IFPkgFlagRelocatable            true
+  else
+    plistWriteBool   >>$F IFPkgFlagRelocatable            false
+  fi
+  
   plistWriteString >>$F IFPkgFlagRestartAction            NoRestart
   plistWriteBool   >>$F IFPkgFlagRootVolumeOnly           false
   plistWriteBool   >>$F IFPkgFlagUpdateInstalledLanguages false
@@ -236,10 +256,23 @@ function genInfoFile() {
   echo >>$F "OverwritePermissions  NO"  # TODO: consolidate
   echo >>$F "UseUserMask           NO"  # TODO: consolidate
   echo >>$F "RootVolumeOnly        NO"  # TODO: consolidate
-  echo >>$F "NeedsAuthorization    YES" # TODO: consolidate
+
+  if test "x${PKG_AUTHORIZATION}" = "x"; then
+    echo >>$F "NeedsAuthorization    NO"
+  else
+    # need to check Admin/Root?
+    echo >>$F "NeedsAuthorization    YES"
+  fi
+  
   echo >>$F "DefaultLocation       /"   # TODO: consolidate
-  echo >>$F "Relocatable           YES" # TODO: consolidate
-  echo >>$F "Install Fat           YES" # TODO: consolidate
+  
+  if test "x${PKG_IS_RELOCATABLE}" = "xyes"; then
+    echo >>$F "Relocatable           YES"
+  else
+    echo >>$F "Relocatable           NO"
+  fi
+  
+  #echo >>$F "Install Fat           YES" # TODO: consolidate
   echo >>$F "LibrarySubdirectory   Standard"
   
   ln -s ${PKG_RSRC_DIR}/English.lproj/${PKG_NAME}.info \
@@ -333,7 +366,7 @@ function copyPackages() {
 
 # ****************************** running ******************************
 
-echo "Building SOPE MacOSX Installer.app packages $PKG_NAME.mpkg .."
+echo "Building SOPE MacOSX Installer.app multipackage $PKG_NAME.mpkg .."
 validateArgs;
 
 ensureSudo;
index 620ecd8a6c6f8c0f1e26991e7e4e8133776ccb8e..3a8a01362ed0b50ae47db4c9f53203db203f26ac 100755 (executable)
@@ -33,6 +33,17 @@ SUDO="sudo"
 RM_R="rm -r"
 
 
+# ****************************** options ******************************
+
+# if we set this to 'yes', we get no 'upgrade' button on "reinstalls"
+PKG_IS_RELOCATABLE=no
+
+PKG_INSTALLFAT=yes
+
+# RootAuthorization / AdminAuthorization
+PKG_AUTHORIZATION=RootAuthorization
+
+
 # ****************************** usage ********************************
 
 function usage() {
@@ -197,16 +208,31 @@ function genInfoPList() {
   plistWriteDate   >>$F IFPkgBuildDate "`date -u +%Y-%m-%dT%H:%M:%SZ`"
   plistWriteString >>$F IFPkgBuildVersion                 "${PKG_VERSION}"
   plistWriteBool   >>$F IFPkgFlagAllowBackRev             true
-  plistWriteString >>$F IFPkgFlagAuthorizationAction      AdminAuthorization
+
+  # allowed: AdminAuthorization, RootAuthorization, ??
+  plistWriteString >>$F IFPkgFlagAuthorizationAction      ${PKG_AUTHORIZATION}
+
   plistWriteString >>$F IFPkgFlagBackgroundAlignment      topright
   plistWriteString >>$F IFPkgFlagBackgroundScaling        none
   plistWriteString >>$F IFPkgFlagDefaultLocation          /
   plistWriteBool   >>$F IFPkgFlagFollowLinks              true
-  plistWriteBool   >>$F IFPkgFlagInstallFat               true
+  
+  if test "x${PKG_INSTALLFAT}" = "xyes"; then
+    plistWriteBool   >>$F IFPkgFlagInstallFat             true
+  else
+    plistWriteBool   >>$F IFPkgFlagInstallFat             false
+  fi
+
   plistWriteInt    >>$F IFPkgFlagInstalledSize            $size_uncompressed
   plistWriteBool   >>$F IFPkgFlagIsRequired               false
   plistWriteBool   >>$F IFPkgFlagOverwritePermissions     false
-  plistWriteBool   >>$F IFPkgFlagRelocatable              true
+
+  if test "x${PKG_IS_RELOCATABLE}" = "xyes"; then
+    plistWriteBool   >>$F IFPkgFlagRelocatable            true
+  else
+    plistWriteBool   >>$F IFPkgFlagRelocatable            false
+  fi
+
   plistWriteString >>$F IFPkgFlagRestartAction            NoRestart
   plistWriteBool   >>$F IFPkgFlagRootVolumeOnly           false
   plistWriteBool   >>$F IFPkgFlagUpdateInstalledLanguages false
@@ -297,10 +323,28 @@ function genInfoFile() {
   echo >>$F "OverwritePermissions  NO"  # TODO: consolidate
   echo >>$F "UseUserMask           NO"  # TODO: consolidate
   echo >>$F "RootVolumeOnly        NO"  # TODO: consolidate
-  echo >>$F "NeedsAuthorization    YES" # TODO: consolidate
+
+  if test "x${PKG_AUTHORIZATION}" = "x"; then
+    echo >>$F "NeedsAuthorization    NO"
+  else
+    # need to check Admin/Root?
+    echo >>$F "NeedsAuthorization    YES"
+  fi
+
   echo >>$F "DefaultLocation       /"   # TODO: consolidate
-  echo >>$F "Relocatable           YES" # TODO: consolidate
-  echo >>$F "Install Fat           YES" # TODO: consolidate
+  
+  if test "x${PKG_IS_RELOCATABLE}" = "xyes"; then
+    echo >>$F "Relocatable           YES"
+  else
+    echo >>$F "Relocatable           NO"
+  fi
+  
+  if test "x${PKG_INSTALLFAT}" = "xyes"; then
+    echo >>$F "Install Fat           YES"
+  else
+    echo >>$F "Install Fat           NO"
+  fi
+  
   echo >>$F "LibrarySubdirectory   Standard"
   
   echo ".. done."