diff options
author | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2004-06-18 05:04:14 +0000 |
---|---|---|
committer | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2004-06-18 05:04:14 +0000 |
commit | 5e1bf20850aaa9b1ceb86a971848609ee9e84c47 (patch) | |
tree | f3a6e5b5c38263fe527e6275ff95425f12637226 /tools/make-package-macosx | |
parent | 8ec769214e067da9ee8b33d05f4ef275e9269dd5 (diff) | |
download | ocaml-gcaml.tar.gz |
port to the latest ocaml (2004/06/18)gcaml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml@6419 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools/make-package-macosx')
-rwxr-xr-x | tools/make-package-macosx | 110 |
1 files changed, 96 insertions, 14 deletions
diff --git a/tools/make-package-macosx b/tools/make-package-macosx index 8f574d9c0c..557084cad8 100755 --- a/tools/make-package-macosx +++ b/tools/make-package-macosx @@ -15,21 +15,101 @@ # $Id$ cd package-macosx -rm -rf ocaml.pkg ocaml-rw.dmg ocaml.dmg - -cat >ocaml.info <<EOF - Title Objective Caml - Version 3.06 - Description This package installs Objective Caml version 3.06 - DefaultLocation / - Relocatable no - NeedsAuthorization yes - Application no - InstallOnly no - DisableStop no +rm -rf ocaml.pkg ocaml-rw.dmg + +VERSION=`sed -n -e '/ocaml_version/s/.*"\([^"]*\)".*/\1/p' ../stdlib/sys.ml` +VERSION_MAJOR=`sed -n -e '/ocaml_version/s/.*"\([0-9]*\)\..*/\1/p' \ + ../stdlib/sys.ml` +VERSION_MINOR=`sed -n -e '/ocaml_version/s/.*"[0-9]*\.\([0-9]*\)[.+].*/\1/p' \ + ../stdlib/sys.ml` + +# Worked in 10.2: + +# cat >ocaml.info <<EOF +# Title Objective Caml +# Version ${VERSION} +# Description This package installs Objective Caml version ${VERSION} +# DefaultLocation / +# Relocatable no +# NeedsAuthorization yes +# Application no +# InstallOnly no +# DisableStop no +# EOF +#package root ocaml.info + +cat >Description.plist <<EOF + <?xml version="1.0" encoding="UTF-8"?> + <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" + "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> + <plist version="1.0"> + <dict> + <key>IFPkgDescriptionDeleteWarning</key> + <string></string> + <key>IFPkgDescriptionDescription</key> + <string>The Objective Caml compiler and tools</string> + <key>IFPkgDescriptionTitle</key> + <string>Objective Caml</string> + <key>IFPkgDescriptionVersion</key> + <string>${VERSION}</string> + </dict> + </plist> +EOF + +cat >Info.plist <<EOF +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" + "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleGetInfoString</key> + <string>Objective Caml ${VERSION}</string> + <key>CFBundleIdentifier</key> + <string>fr.inria.ocaml</string> + <key>CFBundleName</key> + <string>Objective Caml</string> + <key>CFBundleShortVersionString</key> + <string>${VERSION}</string> + <key>IFMajorVersion</key> + <integer>${VERSION_MAJOR}</integer> + <key>IFMinorVersion</key> + <integer>${VERSION_MINOR}</integer> + <key>IFPkgFlagAllowBackRev</key> + <true/> + <key>IFPkgFlagAuthorizationAction</key> + <string>AdminAuthorization</string> + <key>IFPkgFlagDefaultLocation</key> + <string>/</string> + <key>IFPkgFlagInstallFat</key> + <false/> + <key>IFPkgFlagIsRequired</key> + <false/> + <key>IFPkgFlagRelocatable</key> + <false/> + <key>IFPkgFlagRestartAction</key> + <string>NoRestart</string> + <key>IFPkgFlagRootVolumeOnly</key> + <true/> + <key>IFPkgFlagUpdateInstalledLanguages</key> + <false/> + <key>IFPkgFormatVersion</key> + <real>0.10000000149011612</real> +</dict> +</plist> +EOF + +mkdir -p resources + +# stop here -> | +cat >resources/ReadMe.txt <<EOF +This package installs Objective Caml version ${VERSION}. +You need Mac OS X 10.3 (panther), with X11 and the +XCode tools installed. EOF -package root ocaml.info +/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker \ + -build -p "`pwd`/ocaml.pkg" -f "`pwd`/root" -i "`pwd`/Info.plist" \ + -d "`pwd`/Description.plist" -r "`pwd`/resources" size=`du -s ocaml.pkg | cut -f 1` size=`expr $size + 8192` @@ -42,6 +122,7 @@ hdiutil detach $name name=`hdid ocaml-rw.dmg | grep Apple_HFS | cut -d ' ' -f 1` if test -d '/Volumes/Objective Caml'; then ditto -rsrcFork ocaml.pkg "/Volumes/Objective Caml/ocaml.pkg" + cp resources/ReadMe.txt "/Volumes/Objective Caml/" else echo 'Unable to mount the disk image as "/Volumes/Objective Caml"' >&2 exit 3 @@ -49,4 +130,5 @@ fi open "/Volumes/Objective Caml" hdiutil detach $name -hdiutil convert ocaml-rw.dmg -format UDZO -o ocaml.dmg +rm -rf "ocaml-${VERSION}.dmg" +hdiutil convert ocaml-rw.dmg -format UDZO -o "ocaml${VERSION}.dmg" |