added installer package target
[moonshot-ui.git] / Makefile.am
index 8b5b014..ad6feea 100644 (file)
@@ -79,6 +79,13 @@ libmoonshot/libmoonshot.lib: libmoonshot/libmoonshot.def
 
 endif
 
+if  OS_MACOS
+
+AM_CPPFLAGS += -DOS_MACOS
+AM_VALAFLAGS += --define=OS_MACOS
+
+endif
+
 if OS_LINUX
 
 ## Installing mime type data
@@ -211,3 +218,45 @@ moonshot.msi: windows/app.wxs windows/config.wxi $(bin_PROGRAMS)
        "${WIX_LIGHT}" -b ${prefix} -b ${prefix}/mingw -o moonshot.msi app.wixobj
 
 endif
+
+if  OS_MACOS
+## Mac-specific targets
+
+## 1. Icons. 
+
+icons:
+       mkdir -p share/icons
+       cp mac/icons/process-stop.png share/icons
+       cp mac/icons/edit-find.png share/icons
+       cp mac/icons/avatar-default.png share/icons
+       
+## 2. App bundle
+## gtk-app-bundler must be installed
+## moonshot-ui.app will be built in moonshot/mac-client-installer/moonshot-ui/
+app-bundle:
+       gtk-mac-bundler ./mac/moonshot-ui.bundle
+
+## 3: Installer Package
+
+installerdir = $(HOME)/moonshot/mac-client-installer
+
+installer:
+       cd $(installerdir) && pwd
+
+# fix up the cyrus-sasl links
+       cd $(installerdir) && mkdir -p sasl/usr/lib
+       cd $(installerdir)/sasl/usr/lib && ln -fs   ../local/lib/sasl2 
+       cd $(installerdir) && mkdir -p resources
+
+# Ensure the permissions are correct for the files to be installed
+
+       cd $(installerdir) && sudo chown -R root:admin sasl
+       cd $(installerdir) && sudo chmod -R g+w sasl
+
+# create the installer package
+       cd $(installerdir) && /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
+       
+endif