summaryrefslogtreecommitdiff
path: root/pkg/osx/GNUmakefile
diff options
context:
space:
mode:
authorSimon Howard2011-06-13 22:21:37 +0000
committerSimon Howard2011-06-13 22:21:37 +0000
commit391e7466b1efb7cbede4a1c356a210d9e7ee616b (patch)
tree90d13346d9cd3636df44290ded13d59ae3712543 /pkg/osx/GNUmakefile
parentfa328faf056affa216f2f3a8764ca0d56262efe9 (diff)
parent822664b4ff873d462370e9e96a9d91e6066c221d (diff)
downloadchocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.tar.gz
chocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.tar.bz2
chocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.zip
Merge from trunk.
Subversion-branch: /branches/raven-branch Subversion-revision: 2347
Diffstat (limited to 'pkg/osx/GNUmakefile')
-rw-r--r--pkg/osx/GNUmakefile34
1 files changed, 30 insertions, 4 deletions
diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile
index aa31daf4..cf8c42fc 100644
--- a/pkg/osx/GNUmakefile
+++ b/pkg/osx/GNUmakefile
@@ -20,9 +20,17 @@ ifndef GNUSTEP_MAKEFILES
# DMG file containing package:
-$(DMG) : $(STAGING_DIR)
+$(DMG) : tmp.dmg
rm -f $@
- hdiutil create -volname "$(PACKAGE_STRING)" -srcdir $(STAGING_DIR) $@
+ ./dmgfix "$(realpath tmp.dmg)" "$(PACKAGE_STRING)" "$(PACKAGE_NAME).app"
+ hdiutil convert -format UDZO -o $@ tmp.dmg
+ rm -f tmp.dmg
+
+tmp.dmg : $(STAGING_DIR)
+ rm -f $@
+ hdiutil makehybrid -hfs -hfs-volume-name "$(PACKAGE_STRING)" \
+ -hfs-openfolder $(STAGING_DIR) $(STAGING_DIR) \
+ -o tmp.dmg
endif
@@ -46,12 +54,13 @@ APP_BIN_DIR=$(APP_DIR)/Contents/MacOS
SRC_INFO_PLIST=Info.plist
endif
+APP_DOC_DIR=$(APP_BIN_DIR)/Documentation
+APP_DOC_RELDIR=$(patsubst $(STAGING_DIR)/%,%,$(APP_DOC_DIR))
+
$(STAGING_DIR): launcher $(TOPLEVEL_DOCS)
rm -rf $(STAGING_DIR)
mkdir $(STAGING_DIR)
- cp $(TOPLEVEL_DOCS) "$(STAGING_DIR)"
-
mkdir -p "$(APP_TOP_DIR)"
cp -R Resources "$(APP_TOP_DIR)"
cp PkgInfo "$(APP_TOP_DIR)"
@@ -59,6 +68,13 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS)
mkdir -p "$(APP_BIN_DIR)"
+ mkdir -p "$(APP_DOC_DIR)"
+ cp $(TOPLEVEL_DOCS) "$(APP_DOC_DIR)"
+
+ ln -s "$(APP_DOC_RELDIR)/COPYING" "$(STAGING_DIR)/Software License"
+ ln -s "$(APP_DOC_RELDIR)/README" "$(STAGING_DIR)/README"
+ ln -s /Applications "$(STAGING_DIR)"
+
cp launcher "$(APP_BIN_DIR)"
$(STRIP) "$(APP_BIN_DIR)/launcher"
@@ -71,8 +87,18 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS)
./cp-with-libs $(TOPLEVEL)/src/$(PROGRAM_PREFIX)setup "$(APP_BIN_DIR)"
$(STRIP) "$(APP_BIN_DIR)/$(PROGRAM_PREFIX)setup"
+ $(TOPLEVEL)/man/simplecpp -DPRECOMPILED -D__MACOSX__ \
+ < $(TOPLEVEL)/man/INSTALL.template \
+ > "$(APP_DOC_DIR)/INSTALL"
+
find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true
+ mkdir -p "$(APP_BIN_DIR)/man/man5" "$(APP_BIN_DIR)/man/man6"
+ cp $(TOPLEVEL)/man/*.5 "$(APP_BIN_DIR)/man/man5"
+ cp $(TOPLEVEL)/man/*.6 "$(APP_BIN_DIR)/man/man6"
+ cp disk/dir.DS_Store $(STAGING_DIR)/.DS_Store
+ cp disk/background.png $(STAGING_DIR)/background.png
+
clean : launcher_clean
rm -f $(DMG)
rm -rf $(STAGING_DIR)