Commit f9302da8 authored by elaforge's avatar elaforge
Browse files

change os x installer to allow multiple installed versions

This puts the ghc version into the package name so they are considered separate
packages.
parent 64bb8c51
<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
<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>
<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
<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>
......@@ -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>
......
......@@ -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
......
......@@ -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!"
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment