summaryrefslogtreecommitdiff
path: root/pkg/osx/GNUmakefile
diff options
context:
space:
mode:
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 43922b5a..dc2f4f1a 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"
@@ -73,8 +89,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)