summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorEvan Laforge <qdunkan@gmail.com>2010-09-29 23:45:38 +0000
committerEvan Laforge <qdunkan@gmail.com>2010-09-29 23:45:38 +0000
commitf9302da84051f976a9eb4d0eed8f599c72253d65 (patch)
tree38b8a6b543b932f4dc9930afd7c2c379cd8e538c /distrib
parent64bb8c5165e41d3279e29ca5dceda6312128ea76 (diff)
downloadhaskell-f9302da84051f976a9eb4d0eed8f599c72253d65.tar.gz
change os x installer to allow multiple installed versions
This puts the ghc version into the package name so they are considered separate packages.
Diffstat (limited to 'distrib')
-rw-r--r--distrib/MacOS/GHC-relocatable.pmdoc/01ghc.xml2
-rw-r--r--distrib/MacOS/GHC-relocatable.pmdoc/index.xml4
-rw-r--r--distrib/MacOS/GHC-system.pmdoc/01ghc.xml2
-rw-r--r--distrib/MacOS/GHC-system.pmdoc/index.xml4
-rw-r--r--distrib/MacOS/Info.plist2
-rw-r--r--distrib/MacOS/Makefile3
-rw-r--r--distrib/MacOS/installer-scripts/Uninstaller2
-rw-r--r--distrib/MacOS/installer-scripts/create-links37
8 files changed, 32 insertions, 24 deletions
diff --git a/distrib/MacOS/GHC-relocatable.pmdoc/01ghc.xml b/distrib/MacOS/GHC-relocatable.pmdoc/01ghc.xml
index d49d9c6912..a4142538ad 100644
--- a/distrib/MacOS/GHC-relocatable.pmdoc/01ghc.xml
+++ b/distrib/MacOS/GHC-relocatable.pmdoc/01ghc.xml
@@ -1 +1 @@
-<pkgref spec="1.12" uuid="FD3688D8-0443-4DCE-A3BB-F4A8EF12A4AB"><config><identifier>org.haskell.glasgowHaskellCompiler.ghc.pkg</identifier><version>1</version><description></description><post-install type="none"/><installFrom relative="true" mod="true" includeRoot="true">build/Release/GHC.framework</installFrom><installTo relocatable="true">/Library/Frameworks</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>scripts.postinstall.path</mod><mod>requireAuthorization</mod><mod>scripts.scriptsDirectoryPath.isRelativeType</mod><mod>scripts.postinstall.isRelativeType</mod><mod>installTo.isRelativeType</mod><mod>scripts.postinstall.isAbsoluteType</mod><mod>relocatable</mod><mod>installFrom.isRelativeType</mod><mod>installFrom.path</mod><mod>installTo</mod></config><scripts><postinstall relative="true" mod="true">installer-scripts/relocate</postinstall><scripts-dir relative="true" mod="true">installer-scripts</scripts-dir></scripts><contents><component id="org.haskell.GHC" path="/Users/chak/Code/ghc/distrib/MacOS/build/Release/GHC.framework" version="609.20071208"/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file
+<pkgref spec="1.12" uuid="FD3688D8-0443-4DCE-A3BB-F4A8EF12A4AB"><config><identifier>org.haskell.ghc.pkg</identifier><version>1</version><description></description><post-install type="none"/><installFrom relative="true" mod="true" includeRoot="true">build/Release/GHC.framework</installFrom><installTo relocatable="true">/Library/Frameworks</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>scripts.postinstall.path</mod><mod>requireAuthorization</mod><mod>scripts.scriptsDirectoryPath.isRelativeType</mod><mod>scripts.postinstall.isRelativeType</mod><mod>installTo.isRelativeType</mod><mod>scripts.postinstall.isAbsoluteType</mod><mod>relocatable</mod><mod>installFrom.isRelativeType</mod><mod>installFrom.path</mod><mod>installTo</mod></config><scripts><postinstall relative="true" mod="true">installer-scripts/relocate</postinstall><scripts-dir relative="true" mod="true">installer-scripts</scripts-dir></scripts><contents><component id="org.haskell.GHC" path="/Users/chak/Code/ghc/distrib/MacOS/build/Release/GHC.framework" version="609.20071208"/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file
diff --git a/distrib/MacOS/GHC-relocatable.pmdoc/index.xml b/distrib/MacOS/GHC-relocatable.pmdoc/index.xml
index c70b3d95cc..f3ab818e0b 100644
--- a/distrib/MacOS/GHC-relocatable.pmdoc/index.xml
+++ b/distrib/MacOS/GHC-relocatable.pmdoc/index.xml
@@ -1,4 +1,4 @@
-<pkmkdoc spec="1.12"><properties><title>Glasgow Haskell Compiler</title><build>/Users/chak/Desktop/Glasgow Haskell Compiler.pkg</build><organization>org.haskell</organization><userSees ui="easy"/><min-target os="3"/><domain anywhere="true" system="true" user="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>The Glasgow Haskell Compiler (GHC) is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell. GHC supports the entire Haskell 98 language plus a wide variety of extensions. GHC generates fast code, is available on a range of platforms, and includes an extensive set of libraries.</description><contents><choice title="GHC" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.haskell.glasgowHaskellCompiler.ghc.pkg"/><choice-reqs><requirement id="file" operator="eq" value="true" selected="no" enabled="no" hidden="unchanged" startSelected="unchanged" startEnabled="unchanged" startHidden="unchanged"><file>/usr/bin/gcc-4.0</file></requirement></choice-reqs></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="de"/><locale lang="en"><resource relative="true" mod="true" type="license">build/Release/GHC.framework/Versions/609/ghc/LICENSE</resource><resource mime-type="text/rtf" kind="embedded" type="welcome"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf949
+<pkmkdoc spec="1.12"><properties><title>Glasgow Haskell Compiler</title><build>/Users/chak/Desktop/Glasgow Haskell Compiler.pkg</build><organization>org.haskell</organization><userSees ui="easy"/><min-target os="3"/><domain anywhere="true" system="true" user="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>The Glasgow Haskell Compiler (GHC) is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell. GHC supports the entire Haskell 98 language plus a wide variety of extensions. GHC generates fast code, is available on a range of platforms, and includes an extensive set of libraries.</description><contents><choice title="GHC" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.haskell.ghc.pkg"/><choice-reqs><requirement id="file" operator="eq" value="true" selected="no" enabled="no" hidden="unchanged" startSelected="unchanged" startEnabled="unchanged" startHidden="unchanged"><file>/usr/bin/gcc-4.0</file></requirement></choice-reqs></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="de"/><locale lang="en"><resource relative="true" mod="true" type="license">build/Release/GHC.framework/Versions/609/ghc/LICENSE</resource><resource mime-type="text/rtf" kind="embedded" type="welcome"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf949
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
@@ -18,4 +18,4 @@ Xcode can be installed off your Mac OS X installation DVD or be downloaded from
\
Extensive documentation is available online at\
\
- http://haskell.org/haskellwiki/GHC}]]></resource></locale></resources><flags/><item type="file">01ghc.xml</item><mod>properties.userDomain</mod><mod>properties.title</mod><mod>description</mod><mod>properties.systemDomain</mod></pkmkdoc> \ No newline at end of file
+ http://haskell.org/haskellwiki/GHC}]]></resource></locale></resources><flags/><item type="file">01ghc.xml</item><mod>properties.userDomain</mod><mod>properties.title</mod><mod>description</mod><mod>properties.systemDomain</mod></pkmkdoc>
diff --git a/distrib/MacOS/GHC-system.pmdoc/01ghc.xml b/distrib/MacOS/GHC-system.pmdoc/01ghc.xml
index b417646659..9963fb1ba8 100644
--- a/distrib/MacOS/GHC-system.pmdoc/01ghc.xml
+++ b/distrib/MacOS/GHC-system.pmdoc/01ghc.xml
@@ -1 +1 @@
-<pkgref spec="1.12" uuid="24EEBBE7-7B79-47C9-839B-A5407A419948"><config><identifier>org.haskell.glasgowHaskellCompiler.GHC.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom includeRoot="true">/tmp/GHC.dst/Library/Frameworks/GHC.framework</installFrom><installTo>/Library/Frameworks</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>scripts.scriptsDirectoryPath.path</mod><mod>parent</mod><mod>identifier</mod><mod>scripts.postinstall.path</mod></config><scripts><postinstall relative="true" mod="true">installer-scripts/create-links</postinstall><scripts-dir relative="true" mod="true">installer-scripts</scripts-dir></scripts><contents><file-list>01ghc-contents.xml</file-list><component id="org.haskell.GHC" path="/tmp/GHC.dst/Library/Frameworks/GHC.framework" version="612.220100521"/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file
+<pkgref spec="1.12" uuid="24EEBBE7-7B79-47C9-839B-A5407A419948"><config><identifier>org.haskell.ghc.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom includeRoot="true">/tmp/GHC.dst/Library/Frameworks/GHC.framework</installFrom><installTo>/Library/Frameworks</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>scripts.scriptsDirectoryPath.path</mod><mod>parent</mod><mod>identifier</mod><mod>scripts.postinstall.path</mod></config><scripts><postinstall relative="true" mod="true">installer-scripts/create-links</postinstall><scripts-dir relative="true" mod="true">installer-scripts</scripts-dir></scripts><contents><file-list>01ghc-contents.xml</file-list><component id="org.haskell.GHC" path="/tmp/GHC.dst/Library/Frameworks/GHC.framework" version="612.220100521"/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file
diff --git a/distrib/MacOS/GHC-system.pmdoc/index.xml b/distrib/MacOS/GHC-system.pmdoc/index.xml
index 93fd9851a6..ba5f836151 100644
--- a/distrib/MacOS/GHC-system.pmdoc/index.xml
+++ b/distrib/MacOS/GHC-system.pmdoc/index.xml
@@ -1,4 +1,4 @@
-<pkmkdoc spec="1.12"><properties><title>Glasgow Haskell Compiler</title><build>/Users/bjs/Desktop/Glasgow Haskell Compiler.pkg</build><organization>org.haskell</organization><userSees ui="easy"/><min-target os="3"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>The Glasgow Haskell Compiler (GHC) is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell. GHC supports the entire Haskell 98 language plus a wide variety of extensions. GHC generates fast code, is available on a range of platforms, and includes an extensive set of libraries. For more information, please consult &lt;http://haskell.org/ghc>.</description><contents><choice title="GHC" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.haskell.glasgowHaskellCompiler.GHC.pkg"/><choice-reqs><requirement id="file" operator="eq" value="true" selected="no" enabled="no" hidden="unchanged" startSelected="unchanged" startEnabled="unchanged" startHidden="unchanged"><file>/usr/bin/gcc</file></requirement></choice-reqs></choice></contents><resources bg-scale="none" bg-align="center"><locale lang="en"><resource relative="true" mod="true" type="background">installer-docs/lambda-logo.png</resource><resource relative="true" mod="true" type="license">installer-docs/license.html</resource><resource mime-type="text/rtf" kind="embedded" type="welcome"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf290
+<pkmkdoc spec="1.12"><properties><title>Glasgow Haskell Compiler</title><build>/Users/bjs/Desktop/Glasgow Haskell Compiler.pkg</build><organization>org.haskell</organization><userSees ui="easy"/><min-target os="3"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>The Glasgow Haskell Compiler (GHC) is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell. GHC supports the entire Haskell 98 language plus a wide variety of extensions. GHC generates fast code, is available on a range of platforms, and includes an extensive set of libraries. For more information, please consult &lt;http://haskell.org/ghc>.</description><contents><choice title="GHC" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.haskell.ghc.pkg"/><choice-reqs><requirement id="file" operator="eq" value="true" selected="no" enabled="no" hidden="unchanged" startSelected="unchanged" startEnabled="unchanged" startHidden="unchanged"><file>/usr/bin/gcc</file></requirement></choice-reqs></choice></contents><resources bg-scale="none" bg-align="center"><locale lang="en"><resource relative="true" mod="true" type="background">installer-docs/lambda-logo.png</resource><resource relative="true" mod="true" type="license">installer-docs/license.html</resource><resource mime-type="text/rtf" kind="embedded" type="welcome"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf290
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
@@ -28,4 +28,4 @@ in a web browser. More documentation is available online at\
\
To uninstall, execute\
\
- /Library/Frameworks/GHC.framework/Tools/Uninstaller}]]></resource></locale></resources><flags/><item type="file">01ghc.xml</item><mod>properties.systemDomain</mod><mod>properties.title</mod><mod>properties.userDomain</mod><mod>properties.anywhereDomain</mod><mod>description</mod></pkmkdoc> \ No newline at end of file
+ /Library/Frameworks/GHC.framework/Tools/Uninstaller}]]></resource></locale></resources><flags/><item type="file">01ghc.xml</item><mod>properties.systemDomain</mod><mod>properties.title</mod><mod>properties.userDomain</mod><mod>properties.anywhereDomain</mod><mod>description</mod></pkmkdoc>
diff --git a/distrib/MacOS/Info.plist b/distrib/MacOS/Info.plist
index 241b4f4cb6..4693799a3a 100644
--- a/distrib/MacOS/Info.plist
+++ b/distrib/MacOS/Info.plist
@@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
- <string>org.haskell.GHC</string>
+ <string>org.haskell.ghc.${FRAMEWORK_VERSION}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
diff --git a/distrib/MacOS/Makefile b/distrib/MacOS/Makefile
index 3928d34fa7..dbf7886674 100644
--- a/distrib/MacOS/Makefile
+++ b/distrib/MacOS/Makefile
@@ -101,7 +101,8 @@ framework-pkg:
COMMAND_MODE=unix2003
-$(RM) -f GHC-system.pmdoc/*-contents.xml
$(PACKAGEMAKER) -v --doc GHC-system.pmdoc\
- $(PACKAGEMAKER_TARGET) -o $(TOP)/$(PACKAGE_NAME) -i org.haskell.GHC
+ $(PACKAGEMAKER_TARGET) -o $(TOP)/$(PACKAGE_NAME)\
+ -i org.haskell.GHC.$(FRAMEWORK_VERSION)
# If we don't specify COMMAND_MODE=unix2003 then xcodebuild defaults
# to setting it to legacy, which means that ar builds archives
diff --git a/distrib/MacOS/installer-scripts/Uninstaller b/distrib/MacOS/installer-scripts/Uninstaller
index 696d571d7c..784c7c23bb 100644
--- a/distrib/MacOS/installer-scripts/Uninstaller
+++ b/distrib/MacOS/installer-scripts/Uninstaller
@@ -69,7 +69,7 @@ rm -rf ${INSTALL_DEST}/GHC.framework
echo "Removing package recipt"
# The first is for Leopard packages and the second for Tiger packages.
-rm -f /Library/Receipts/boms/org.haskell.glasgowHaskellCompiler.ghc.pkg.bom
+rm -f /Library/Receipts/boms/org.haskell.ghc.pkg.bom
rm -rf /Library/Receipts/ghc.pkg
echo "${INSTALL_DEST}/GHC.framework has been purged!"
diff --git a/distrib/MacOS/installer-scripts/create-links b/distrib/MacOS/installer-scripts/create-links
index 4453a9de4a..55a356c0fd 100644
--- a/distrib/MacOS/installer-scripts/create-links
+++ b/distrib/MacOS/installer-scripts/create-links
@@ -5,27 +5,34 @@
# * Add link to the man page into the standard man/man1/ directory
# * Add link to the HTML docs into the standard share/doc/ directory
+# The binary links are careful not to use Current, because that will be
+# rebound to the current version on every reinstall.
+
+# It probably won't ever happen, but this should work correctly if the install
+# destination has a space on it.
+
+# See apple "Install Operations" documentation for how this script is called.
+
INSTALL_DEST=$2
INSTALL_BASE=$3
-if [ ${INSTALL_BASE} = / ]; then
+if [ "$INSTALL_BASE" = / ]; then
INSTALL_BASE=/usr
fi
-INSTALL_BIN=${INSTALL_BASE}/bin
-mkdir -p ${INSTALL_BIN}
-if [ -d ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/bin ]; then
- ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/bin/*\
- ${INSTALL_BIN}/
+ProjectVersionInt=$(readlink "$INSTALL_DEST/GHC.framework/Versions/Current")
+GHC_BASE=$INSTALL_DEST/GHC.framework/Versions/$ProjectVersionInt
+
+INSTALL_BIN=$INSTALL_BASE/bin
+mkdir -p "$INSTALL_BIN"
+if [ -d "$GHC_BASE/usr/bin" ]; then
+ ln -sf "$GHC_BASE"/usr/bin/* "$INSTALL_BIN/"
fi
-INSTALL_MAN1=${INSTALL_BASE}/share/man/man1
-INSTALL_HTML=${INSTALL_BASE}/share/doc
-mkdir -p ${INSTALL_MAN1}
-if [ -d ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/share/man/man1 ];
-then
- ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/share/man/man1/*\
- ${INSTALL_MAN1}/
- ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/share/doc/ghc\
- ${INSTALL_HTML}/
+INSTALL_MAN1="$INSTALL_BASE"/share/man/man1
+INSTALL_HTML="$INSTALL_BASE"/share/doc
+mkdir -p "$INSTALL_MAN1"
+if [ -d "$GHC_BASE"/usr/share/man/man1 ]; then
+ ln -sf "$GHC_BASE"/usr/share/man/man1/* "$INSTALL_MAN1/"
+ ln -sf "$GHC_BASE"/usr/share/doc/ghc.$ProjectVersionInt "$INSTALL_HTML/"
fi