From 048c334b5fa81355cedef4799da3a3c646a4a321 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 9 Nov 2011 14:39:51 +0000 Subject: Add (untested) mac build rule --- Makefile | 23 +++++++++++++++++++++-- config.mk | 1 + 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b932a6a..733a7e1 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,12 @@ getxbookgui.exe: getxbookgui.tcl @sdx wrap $@ -runtime $(W32TCLKIT) @rm -r getxbookgui.kit getxbookgui.vfs -# TODO: create rule to make osx starpack of gui +getxbookgui: getxbookgui.tcl + @echo STARPACK $@ + @sdx qwrap getxbookgui.tcl + @sdx unwrap getxbookgui.kit + @sdx wrap $@ -runtime $(MACTCLKIT) + @rm -r getxbookgui.kit getxbookgui.vfs # needs to be run from a mingw setup dist-win: $(BIN) $(GUI:.tcl=.exe) @@ -71,6 +76,19 @@ dist-win: $(BIN) $(GUI:.tcl=.exe) rm -rf $(NAME)-win echo $(NAME)-$(VERSION)-win.zip $(NAME)-$(VERSION)-win.zip.sig +# needs to be run from a mac +dist-mac: $(BIN) $(GUI:.tcl=) + mkdir -p $(NAME)-$(VERSION)/$(NAME).app/Contents/MacOS + mkdir -p $(NAME)-$(VERSION)/$(NAME).app/Contents/Resources + cp $(BIN) $(GUI:.tcl=) $(NAME)-$(VERSION)/$(NAME).app/Contents/MacOS/ + for f in $(DOC); do cp $$f $(NAME)-$(VERSION)/$$f.txt; done + echo 'CFBundlePackageTypeAPPL'"CFBundleExecutablegetxbookguiCFBundleVersion$(VERSION)CFBundleName$(NAME)" > $(NAME)-$(VERSION)/$(NAME).app/Contents/Info.plist + hdiutil create -srcfolder $(NAME) $(NAME)-$(VERSION).dmg + hdiutil internet-enable -yes $(NAME)-$(VERSION).dmg + gpg -b < $(NAME)-$(VERSION)-mac.dmg > $(NAME)-$(VERSION)-mac.dmg.sig + rm -rf $(NAME)-$(VERSION) + echo $(NAME)-$(VERSION)-mac.dmg $(NAME)-$(VERSION)-mac.dmg.sig + index.html: doap.ttl README echo making webpage echo "$(NAME)" > $@ @@ -84,9 +102,10 @@ index.html: doap.ttl README echo "

download

" >> $@ echo "[$(NAME) $(VERSION) source]($(NAME)-$(VERSION).tar.bz2) ([sig]($(NAME)-$(VERSION).tar.bz2.sig)) ($(RELDATE))" | smu >> $@ echo "[$(NAME) $(VERSION) windows]($(NAME)-$(VERSION).zip) ([sig]($(NAME)-$(VERSION).zip.sig)) ($(RELDATE))" | smu >> $@ + echo "[$(NAME) $(VERSION) mac]($(NAME)-$(VERSION).dmg) ([sig]($(NAME)-$(VERSION).dmg.sig)) ($(RELDATE))" | smu >> $@ echo '
' >> $@ sh websummary.sh doap.ttl | smu >> $@ echo '' >> $@ -.PHONY: all clean install uninstall dist dist-win +.PHONY: all clean install uninstall dist dist-win dist-mac .SILENT: index.html dist diff --git a/config.mk b/config.mk index 5981a3b..b728882 100644 --- a/config.mk +++ b/config.mk @@ -10,6 +10,7 @@ CFLAGS = -ansi -pedantic -Wall -Wextra -Werror -g -D_POSIX_C_SOURCE=200112L \ -DVERSION=\"$(VERSION)\" W32TCLKIT = tclkit-8.5.9-win32.upx.exe +MACTCLKIT = tclkit-8.5b1-darwin-univ-aqua # musl static #CC = musl-gcc -- cgit v1.2.3