# -*- mode: python -*-
-_jhb = os.environ.get("JHB")
-if _jhb is None:
- # The default setup...
- # checkoutroot = os.path.expanduser("~/Source/gtk")
- # prefix = "/opt/gtk"
- pass
-elif _jhb == "FW":
- # The framework build...
- # checkoutroot = os.path.expanduser("~/Source/gtk-fw")
- # prefix = "/opt/gtk-fw"
- pass
+#module_autogenargs['gtk+'] = autogenargs + "--enable-introspection=no"
+
+append_autogenargs ("dbus", "--enable-launchd --sysconfdir=/Applications/moonshot-ui.app/Contents/Resources/etc")
+# uncomment this and comment the previous line for working with Dbus without launched
+# append_autogenargs ("dbus", "--with-x")
+
-# not sure yet if this is needed
-append_autogenargs ("dbus", "--with-x")
setup_sdk(target="10.6", sdk_version="10.6", architectures=["i386"])
os.environ['MAKEFLAGS'] = '-j 4'
-module_autogenargs['moonshot'] = '--enable-acceptor=no'
-module_autogenargs['gtk+'] = '--enable-introspection=no'
moduleset=os.environ['HOME'] + '/moonshot/mac-client-installer/moonshot-mac.modules'
++++++++++++++
1: Install jhbuild, which Creates working folder ~/gtk
-2: Install gtk-mac-bundler as described at https://live.gnome.org/GTK%2B/OSX/Bundlingr
-Either$ cd ~
-$ wget http://ftp.gnome.org/pub/gnome/sources/gtk-mac-bundler/0.6/gtk-mac-bundler-0.6.1.tar.bz2
-$ tar jxvf gtk-mac-bundler-0.6.1.tar.gz
-$ cd gtk-mac-bundler-0.6.1
-$ make install
-
-3: bootstrap jhbuild
-copy file moonshot/mac-client-installer/.jhbuildrc-custom to $HOME
-then
-$ jhbuild bootstrap --ignore-system
-
-4 MIT Kerberos 1.9.2 Kerberos
-Install in ~/gtk/inst to build against - in the Krb5 src directory
-$ export CFLAGS="-arch i386"
-$ ./configure --prefix=$HOME/gtk/inst/
-$ make
-$ make install
-
-Install in moonshot/mac-client-installer/ to include in the Installer package
-$ ./configure
-$ make
-$ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb
+2: MIT Kerberos 1.9.2 Kerberos
+Install in ~/gtk/inst to build against - in the Krb5 src directory
+jhbuild run build-krb5.sh
+Inside jhbuild shell
## Building the Software, Installer Package and Disk Image
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++
The first time the build-installer.sh script is run the following errors may be generated:
+*** Error during phase configure of gtk-mac-bundler: ########## Error running ./configure --prefix /Users/pete/gtk/inst --libdir '/Users/pete/gtk/inst/lib' ***
+choose [2] Ignore error and continue
+
*** Error during phase build of perl-xml-parser: ########## Error running make LD_RUN_PATH= *** [6/37]
choose [4] Start shell
$ git apply ~/moonshot/mac-client-installer/0001-Remove-arch-ppc-flags.patch
choose [2] Ignore error and continue
make: *** No targets specified and no makefile found. Stop.
+
+
*** Error during phase build of cyrus-sasl: ########## Error running make *** [39/41]
choose [4] Start shell
$ ./configure --prefix=/usr/local --with-gss_impl=mit
# build-installer.sh
#
-#
-# Created by pete on 02/01/2012.
-# Copyright (c) 2011, JANET(UK)
+# Copyright (c) 2012, JANET(UK)
+cd ~/moonshot/mac-client-installer
+pwd
+echo " * Put the jhbuild config file in the correct place"
cp ./.jhbuildrc-custom ~/
+echo " * Remove old files and directories"
+rm *.dmg
+rm *.pkg
+rm -Rf moonshot
+rm -Rf moonshot-ui
+rm -Rf sasl
+echo "Done"
-# build moonshot in jhbuild shell
-cd ../moonshot && jhbuild run ./configure --enable-acceptor=no --with-krb5=$HOME/gtk/inst && make && make install DESTDIR=$HOME/moonshot/mac-client-installer/moonshot
+echo " * Bootstrap jhbuild"
+jhbuild bootstrap --ignore-system
+pwd
+echo "Done preparing"
-# build cyrus-sasl using jhbuild
+echo " * build moonshot in jhbuild shell"
+cd ../moonshot
+pwd
+jhbuild run ./autogen.sh
+jhbuild run ./configure --enable-acceptor=no --with-krb5=$HOME//moonshot/mac-client-installer/krb/usr/local
+jhbuild run make && make install DESTDIR=$HOME/moonshot/mac-client-installer/moonshot
+cd ~/moonshot/mac-client-installer
+pwd
+echo "Done"
+
+echo " * The first time this script is run the following errors may be generated: "
+echo " * ** Error during phase build of cyrus-sasl: ########## Error running make *** [39/41]"
+echo " * choose [4] Start shell"
+echo " $ ./configure --prefix=/usr/local --with-gss_impl=mit"
+echo " $ exit "
+echo " * choose [1] Rerun phase build"
+echo
+echo " * build cyrus-sasl using jhbuild"
jhbuild build cyrus-sasl
+echo "Done"
+
+echo " * Fix up the cyrus-sasl links"
+mkdir -p sasl/usr/lib
+cd sasl/usr/lib && ln -fs ../local/lib/sasl2
+cd ~/moonshot/mac-client-installer
+pwd
+echo "Done"
+
+#
+# ToDo: Remove these lines when the Bug is fixed and the files referenced in the module
+# sets can be downloaded succesfully
+echo " * Prepare to build moonshot-ui using jhbuild
+echo " * We need to get the sources for the tango modules as the versions on the freedesktop.org download page are broken
+echo " * see https://bugs.freedesktop.org/show_bug.cgi?id=45526
+curl -L http://pkgs.fedoraproject.org/repo/pkgs/tango-icon-theme/tango-icon-theme-0.8.90.tar.gz/0795895d2f20eddcbd2bffe94ed431a6/tango-icon-theme-0.8.90.tar.gz -o ~/gtk/source/pkgs/tango-icon-theme-0.8.90.tar.gz
+curl -L http://pkgs.fedoraproject.org/repo/pkgs/icon-naming-utils/icon-naming-utils-0.8.90.tar.gz/2c5c7a418e5eb3268f65e21993277fba/icon-naming-utils-0.8.90.tar.gz -o ~/gtk/source/pkgs/icon-naming-utils-0.8.90.tar.gz
+curl -L http://pkgs.fedoraproject.org/repo/pkgs/tango-icon-theme-extras/tango-icon-theme-extras-0.1.0.tar.gz/caaceaec7b61f1cbda0db9842f9db281/tango-icon-theme-extras-0.1.0.tar.gz -o ~/gtk/source/pkgs/tango-icon-theme-extras-0.1.0.tar.gz
-# build moonshot-ui using jhbuild
+echo " * The first time this script is run the following errors may be generated: "
+echo " * *** Error during phase configure of gtk-mac-bundler: ########## Error running ./configure --prefix /Users/pete/gtk/inst --libdir '/Users/pete/gtk/inst/lib' *** "
+echo " * choose [2] Ignore error and continue"
+echo " *"
+echo " * *** Error during phase build of perl-xml-parser: ########## Error running make LD_RUN_PATH= *** [6/37]"
+echo " * choose [4] Start shell"
+echo " * $ git apply ~/moonshot/mac-client-installer/0001-Remove-arch-ppc-flags.patch "
+echo " * $ make"
+echo " * $ exit "
+echo " * choose [2] Ignore error and continue"
+echo " *"
+echo " * *** Error during phase configure of gtk-mac-bundler: ########## Error running ./configure --prefix /Users/pete/gtk/inst --libdir '/Users/pete/gtk/inst/lib' *** [37/38]"
+echo " * choose [2] Ignore error and continue"
+echo " *"
+echo " * Now we can build moonshot-ui"
jhbuild build moonshot-ui
+echo "Done"
+echo
-# make moonshot-ui app bundle in jhbuild shell
+echo " * Make moonshot-ui app bundle in jhbuild shell"
cd ~/gtk/source/moonshot-ui/ && jhbuild run make app-bundle
-pwd
+echo "Done"
+echo " * Make the libmoonshot files in the correct directory for the installer"
+jhbuild run ./configure && make && make install DESTDIR=$HOME/moonshot/mac-client-installer/moonshot-ui
cd ~/moonshot/mac-client-installer
pwd
-# fix up the cyrus-sasl links
-mkdir -p sasl/usr/lib
-cd sasl/usr/lib && ln -fs ../local/lib/sasl2
-cd ~/moonshot/mac-client-installer
-pwd
+echo "Done"
-# Ensure the permissions are correct for the files to be installed
+echo " * Ensure the permissions are correct for the files to be installed"
sudo chown -R root:admin sasl krb moonshot moonshot-ui
sudo chmod -R g+w sasl krb moonshot moonshot-ui
+echo "Done"
-# create the installer package
+echo " * Put the DBus Property list in the moonshot-ui tree for the installer with the correct permissions"
+cp org.freedesktop.dbus-session.plist moonshot-ui/
+sudo chown -R root:admin moonshot-ui/org.freedesktop.dbus-session.plist
+
+echo " * Create the installer package"
/Developer/usr/bin/packagemaker --doc Moonshot\ Client\ Software.pmdoc \
--version 0.1 --filter "/.DS_Store" --root-volume-only \
--domain system --verbose --no-relocate -l "/" --target 10.5 \
--id ja.net.moonshotClientSoftware --out Moonshot\ Client\ Software.pkg
-# create and mount a disk image
+echo " * Create and mount a disk image"
hdiutil create -size 20m -fs HFS+ -volname "Moonshot Client Software" temp.dmg
hdiutil attach temp.dmg
-# Copy the package and the READMEs
+echo " * Copy the package and the READMEs"
cp -R Moonshot\ Client\ Software.pkg /Volumes/Moonshot\ Client\ Software/
# TODO we need some readmes for the Mac instalatiom
#cp -R resources/* /Volumes/Moonshot\ Client\ Software/
-# Get rid of hidden files and folders that we don't need
+echo " * 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
+echo " * Unmount the image"
hdiutil detach /Volumes/Moonshot\ Client\ Software
-# Convert the disk image to read-only
+echo " * Convert the disk image to read-only"
hdiutil convert temp.dmg -format UDZO -o moonshotclientsoftware.dmg
-rm temp.dmg
-
+#rm temp.dmg
+echo "All Done"
<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
<moduleset>
- <repository type="git" name="moonshot.janet.git"
- href="http://www.project-moonshot.org/git"/>
+ <repository type="git" name="moonshot.janet.git" href="http://www.project-moonshot.org/git"/>
-<!-- maybe use this if we are pulling yrus-sasl from cyrusimap.org -->
-<!-- <repository type="tarball" name="ftp.cyrus-sasl.org" default="yes" href="ftp://ftp.cyrusimap.org/cyrus-sasl/"/>-->
+ <!-- maybe use this if we decide to pull cyrus-sasl from cyrusimap.org -->
+ <!-- See launchpad defect #900448 Mac build instructions refer to the in-tree cyrus-sasl -->
+ <!-- <repository type="tarball" name="ftp.cyrus-sasl.org" default="yes" href="ftp://ftp.cyrusimap.org/cyrus-sasl/"/>-->
- <include href="http://git.gnome.org/browse/gtk-osx/plain/modulesets-stable/gtk-osx.modules"/>
- <metamodule id="meta-moonshot-mac-client">
- <dependencies>
- <dep package="cyrus-sasl"/>
- <dep package="moonshot-ui"/>
- </dependencies>
- </metamodule>
-
- <autotools id="moonshot-ui" autogenargs="--prefix $HOME/moonshot/mac-client-installer/moonshot-ui --libdir $HOME/moonshot/mac-client-installer/moonshot-ui/lib" >
+ <include href="http://git.gnome.org/browse/gtk-osx/plain/modulesets-stable/gtk-osx.modules"/>
+ <autotools id="moonshot-ui">
<!-- makeinstallargs="install DESTDIR=$HOME/moonshot/mac-client-installer/moonshot-ui"-->
- <branch
- repo="moonshot.janet.git" module="moonshot-ui.git">
- </branch>
- <dependencies>
- <dep package="libgee"/>
- <dep package="dbus-glib"/>
- <dep package="glib"/>
- <dep package="gtk-doc"/>
- <dep package="libpng"/>
- <dep package="libtiff"/>
- <dep package="libjpeg"/>
- <dep package="pango"/>
- <dep package="atk"/>
- <dep package="gdk-pixbuf"/>
- <dep package="gtk+"/>
- <dep package="vala"/>
- <dep package="shared-mime-info"/>
- <dep package="meta-gtk-osx-themes"/>
- <dep package="meta-gtk-osx-core"/>
-<!-- TODO move to gtk+-3.0 -->
-<!-- <dep package="gtk+-3.0"/> -->
- <dep package="gtk-mac-integration"/>
- </dependencies>
- </autotools>
-
- <tarball id="libgee" version="0.6.0">
- <source href="http://download.gnome.org/sources/libgee/0.6/libgee-0.6.0.tar.bz2"
- hash="sha256:e586678d0a88637abeaaf850b62231000772e79ea6d9c4b45dc3cea99f778a7a"
- md5sum="4eb513b23ab6ea78884989518a4acf6f" size="477609"/>
- <dependencies>
- <dep package="glib"/>
- </dependencies>
- </tarball>
+ <branch repo="moonshot.janet.git" module="moonshot-ui.git"></branch>
+ <dependencies>
+ <dep package="libgee"/>
+ <dep package="dbus-glib"/>
+ <dep package="libpng"/>
+ <dep package="libtiff"/>
+ <dep package="libjpeg"/>
+ <dep package="gtk-doc"/>
+ <dep package="gtk+"/>
+ <dep package="vala_custom"/>
+ <dep package="meta-gtk-osx-themes"/>
+ <dep package="meta-gtk-osx-core"/>
+ <dep package="gtk-mac-integration"/>
+ <dep package="gtk-mac-bundler"/>
+ </dependencies>
+ </autotools>
+
+<!-- We need to use Vala 0.12.0 as it is the latest which supports dbus-glib -->
+ <tarball id="vala_custom" version="0.12.0">
+ <source href="http://ftp.acc.umu.se/pub/GNOME/sources/vala/0.12/vala-0.12.1.tar.bz2"/>
+ <dependencies>
+ <dep package="glib"/>
+ </dependencies>
+ </tarball>
+
+ <tarball id="libgee" version="0.6.4">
+ <source href="http://ftp.gnome.org/pub/GNOME/sources/libgee/0.6/libgee-0.6.4.tar.xz"/>
+ <dependencies>
+ <dep package="glib"/>
+ </dependencies>
+ </tarball>
+
+ <tarball id="gtk-mac-bundler" version="0.6.1" skip-autogen="true" >
+ <source href="http://ftp.gnome.org/pub/gnome/sources/gtk-mac-bundler/0.6/gtk-mac-bundler-0.6.1.tar.xz"/>
+ <dependencies>
+ </dependencies>
+ </tarball>
- <autotools id="cyrus-sasl" autogenargs="--prefix / --with-gss_impl=mit --libdir /usr/local"
- makeinstallargs="install DESTDIR=$HOME/moonshot/mac-client-installer/sasl">
- <branch
- repo="moonshot.janet.git" module="cyrus-sasl.git">
- </branch>
- </autotools>
+ <autotools id="cyrus-sasl" autogenargs="--prefix / --with-gss_impl=mit --libdir /usr/local"
+ makeinstallargs="install DESTDIR=$HOME/moonshot/mac-client-installer/sasl">
+ <branch repo="moonshot.janet.git" module="cyrus-sasl.git"></branch>
+ </autotools>
</moduleset>