Permalink
Browse files

changed OSX-darwin build so produce draggable folder instead of insta…

…ller package
  • Loading branch information...
1 parent 9b911aa commit 2c710a8add462f917417cb651a89fc03ce86168d @mikelevins mikelevins committed May 11, 2007
Showing with 32 additions and 0 deletions.
  1. +32 −0 OSXdiskImage.mk
View
32 OSXdiskImage.mk
@@ -0,0 +1,32 @@
+include GNUmakefile.vars
+
+rootdir := $(TOP)/lispbox-$(LISPBOX_VERSION)
+builddir := $(TOP)
+version := $(LISPBOX_VERSION)
+title := Lispbox
+
+compressed_size = $(shell du -s $(rootdir) | cut -f1)
+sectors = $(shell echo 3.0*$(compressed_size) | bc)
+mount_location := `hdid -nomount $(builddir)/LispboxRW.dmg | grep HFS | cut -f1`
+
+all: $(NAME)
+
+clean:
+ rm -f $(builddir)/lispbox-$(LISPBOX_VERSION).dmg
+ rm -rf $(TOP)/staging/
+ rm -f $(builddir)/LispboxRW.dmg
+
+$(NAME): $(builddir)/lispbox-$(LISPBOX_VERSION).dmg
+ cp $< $@
+
+$(builddir)/lispbox-$(LISPBOX_VERSION).dmg:
+ if [ -e /Volumes/Lispbox ]; then hdiutil eject $(mount_location); fi
+ hdiutil create -ov $(builddir)/LispboxRW -sectors $(sectors)
+ /sbin/newfs_hfs -v Lispbox $(mount_location)
+ hdiutil eject $(mount_location)
+ hdid $(builddir)/LispboxRW.dmg
+ df
+ cp -R $(rootdir) /Volumes/Lispbox
+ hdiutil eject $(mount_location)
+ hdiutil resize $(builddir)/LispboxRW.dmg -sectors min
+ hdiutil convert $(builddir)/LispboxRW.dmg -format UDCO -o $(builddir)/lispbox-$(LISPBOX_VERSION).dmg

0 comments on commit 2c710a8

Please sign in to comment.