-<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 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 <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"/><pkgref id="org.haskell.glasgowHaskellCompiler.uninstaller.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">lambda-logo.png</resource><resource relative="true" mod="true" type="license">../../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 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 <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">lambda-logo.png</resource><resource relative="true" mod="true" type="license">../../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
\
To uninstall, execute\
\
- /Library/Frameworks/GHC.framework/Tools/Uninstaller}]]></resource></locale></resources><flags/><item type="file">01ghc.xml</item><item type="file">02uninstaller.xml</item><mod>properties.userDomain</mod><mod>properties.title</mod><mod>description</mod><mod>properties.systemDomain</mod><mod>properties.anywhereDomain</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.userDomain</mod><mod>properties.title</mod><mod>description</mod><mod>properties.systemDomain</mod><mod>properties.anywhereDomain</mod></pkmkdoc>
\ No newline at end of file
# version number.
SHORT_VERSION_STRING = $(ProjectVersion)
+# Name of the installer package
+PACKAGE_NAME = GHC-$(ProjectVersion)-$(TargetArch_CPP).pkg
+
+# Xcode's installation build product location (this is where the GHC.framework
+# is assembled)
+DSTROOT=/tmp/GHC.dst
+
+# Tools directory for a system volume install
+TOOLS_SYSTEM=$(DSTROOT)/Library/Frameworks/GHC.framework/Tools
+
+PACKAGEMAKER=/Developer/usr/bin/packagemaker
+
+# Build and package GHC.framework for /Library/Frameworks
+#
+# * Be careful to clean out Xcode's build product location first, as Xcode
+# sets permissions such that a second install on top of an existing one
+# fails
+# * Make there are no contents component descriptions in the .pmdoc. These are
+# created by the PackageMaker GUI and have per default the wrong ownership
+# and permissions for all files (as well as prevent correct setting of those
+# for files that are not in the content list).
framework-pkg:
- xcodebuild -target GHC-systemwide install\
+ -chmod -R u+w $(DSTROOT)
+ -$(RM) -rf $(DSTROOT)
+ mkdir -p $(TOOLS_SYSTEM)
+ cp installer-scripts/Uninstaller $(TOOLS_SYSTEM)
+ xcodebuild -target GHC-systemwide clean install\
CURRENT_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION)\
SHORT_VERSION_STRING=$(SHORT_VERSION_STRING)\
FRAMEWORK_VERSION=$(FRAMEWORK_VERSION)\
CURRENT_LIBRARY_VERSION=$(FRAMEWORK_VERSION)
- @echo "FIXME: What about the contents list?!?"; exit 1
- @echo "FIXME: call the packager"; exit 1
+ -$(RM) -f GHC-system.pmdoc/*-contents.xml
+ $(PACKAGEMAKER) -v --doc GHC-system.pmdoc -o $(TOP)/$(PACKAGE_NAME)
# Instead of making 'binary-dist' a Makefile dependency, we let xcodebuild call
# 'make binary-dist'. This has the advantage that xcode knows the framework
# tree yet another time.
#
framework-binary-dist:
- xcodebuild -target GHC-relocatable build\
+ xcodebuild -target GHC-relocatable clean build\
CURRENT_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION)\
SHORT_VERSION_STRING=$(SHORT_VERSION_STRING)\
FRAMEWORK_VERSION=$(FRAMEWORK_VERSION)\
CURRENT_LIBRARY_VERSION=$(FRAMEWORK_VERSION)
@echo "FIXME: call the packager"; exit 1
+ # FIXME: The approach with the binary-dist in the package has the
+ # problem that the BOM is wrong and the installer relocation feature
+ # isn't sufficient as the layout in the binary-dist and the installed
+ # tree is different