(no commit message)
[devwiki.git] / building_client_software_for_mac_os.mdwn
index e6273c6..41d1baf 100644 (file)
@@ -4,11 +4,16 @@ This page contains notes on how to build and install the software necessary to r
 
 It also contains instructions for creating an installer package allowing the Moonshot software to be installed on other machines running Mac OS X.
 
 
 It also contains instructions for creating an installer package allowing the Moonshot software to be installed on other machines running Mac OS X.
 
+These notes are also in the file mac-client-installer/README.MacOsBuildInstructions
+
 There are three components that need to be built and installed:
 There are three components that need to be built and installed:
+
 1: the Cyrus SASL2 library, along with the SASL GS2 Library which implements the GS2 GSS-API->SASL bridge mechanism.
 1: the Cyrus SASL2 library, along with the SASL GS2 Library which implements the GS2 GSS-API->SASL bridge mechanism.
+
 2: the Moonshot GSS EAP library, implements the EAP mechanism for use by the GSS API. This library depends on having a recent version of Kerberos. Mac OS X ships with Kerberos 5 release 1.7-prerelease which is not recent enough. So. for the installer at least, we will get and build the latest stable release (1.9.2) from [MIT](from http://web.mit.edu/kerberos/dist/index.html).
 2: the Moonshot GSS EAP library, implements the EAP mechanism for use by the GSS API. This library depends on having a recent version of Kerberos. Mac OS X ships with Kerberos 5 release 1.7-prerelease which is not recent enough. So. for the installer at least, we will get and build the latest stable release (1.9.2) from [MIT](from http://web.mit.edu/kerberos/dist/index.html).
+
 3: the Moonshot Identity Selector/Manager software which... 
 3: the Moonshot Identity Selector/Manager software which... 
-ToDo: Complete this section
+ToDo: Complete this section when the client software is ported to Mac OS
 
 
 ###Getting the Moonshot source code 
 
 
 ###Getting the Moonshot source code 
@@ -28,7 +33,7 @@ You will see the following message
     If this token and others are legitimate, please use m4_pattern_allow.
     See the Autoconf documentation
 
     If this token and others are legitimate, please use m4_pattern_allow.
     See the Autoconf documentation
 
-    $ ./configure
+    $ ./configure --with-gss_impl=mit
     $ make
 
 To install to /usr/local in your build machine
     $ make
 
 To install to /usr/local in your build machine
@@ -108,3 +113,51 @@ We only need to install the mech_eap library
     $ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
 
 The files and directories that are installed are as listed in README.KrbInstalledFiles
     $ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
 
 The files and directories that are installed are as listed in README.KrbInstalledFiles
+
+###Building the Moonshot Identity Selector/Manager software
+ToDo: Complete this section when the client software is ported to Mac OS
+
+###Make the install package
+Ideally we would divide the installer into sub-packages (sasl and krb) within a single meta package. However this seems to be possible only from the packagemaker GUI: there are a number of problems with doing this from the packagemaker command line. We are therefore building a single package, with sasl and krb as choice items within the package.
+
+Ensure the permissions are correct for the files to be installed
+
+    $ sudo chown -R root:admin krb sasl
+    $ sudo chmod -R g+w krb sasl
+
+Build the package
+
+    $ /Developer/usr/bin/packagemaker --doc Moonshot\ Client\ Software.pmdoc \
+      --version 0.1 --filter "/.DS_Store" --resources ./resources/ --root-volume-only\
+      --domain system --verbose --no-relocate -l "/" --target 10.5 \
+      --id ja.net.moonshotClientSoftware  --out Moonshot\ Client\ Software.pkg
+
+Instructions in DevWiki at http://www.project-moonshot.org/devwiki//building_client_software_for_mac_os
+
+###Making the Disk Image
+Create and mount the image - 2MB will be enough for now
+
+    $ hdiutil create -size 2m -fs HFS+ -volname "Moonshot Client Software" temp.dmg
+    $ hdiutil attach temp.dmg
+
+Copy the package and the READMEs
+    $ cp Moonshot\ Client\ Software.pkg /Volumes/Moonshot\ Client\ Software/
+    $ cp resources/*  /Volumes/Moonshot\ Client\ Software/
+
+Get rid of hidden files and folders that we don't need
+
+    $ sudo rm -rf /Volumes/Moonshot\ Client\ Software/.fseventsd/
+    $ sudo rm -rf /Volumes/Moonshot\ Client\ Software/.Trashes/
+    $ sudo find /Volumes/Moonshot\ Client\ Software -name '.*' -type f -delete
+
+Unmount the image
+
+    $ hdiutil detach /Volumes/Moonshot\ Client\ Software
+
+Convert the disk image to read-only
+
+    $ hdiutil convert temp.dmg -format UDZO -o moonshotclientsoftware.dmg
+    $ rm temp.dmg
+
+The compressed disk image containing the installer package and the READMEs is now in file *moonshotclientsoftware.dmg*
+