aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-01 07:16:58 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-01 07:16:58 +0000
commitc8bac7e00e9e7f24d8449463f649032e23817347 (patch)
tree4294721a5d3f956a39546ab2dc260b58b7a120b0 /Makefile
parenta4a2792dc11df1a5d2b523261de09118ca8e5262 (diff)
downloadpandoc-c8bac7e00e9e7f24d8449463f649032e23817347.tar.gz
Improved osx-dmg and osx-pkg targets in Makefile.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@59 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 29 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 302a2db0a..a8f414ccb 100644
--- a/Makefile
+++ b/Makefile
@@ -166,10 +166,12 @@ uninstall: uninstall-program
.PHONY: osx-pkg
osx_dest:=osx-pkg
-doc_more:=README.rtf LICENSE.rtf OSX-Welcome.rtf
-cleanup_files+=$(osx_dest) $(doc_more)
+osx_src:=osx
+doc_more:=README.rtf LICENSE.rtf $(osx_src)/Welcome.rtf
+osx_pkg_name:=Pandoc_$(VERSION).pkg
+cleanup_files+=$(osx_dest) $(doc_more) $(osx_pkg_name)
osx-pkg: $(osx_dest)
-$(osx_dest): $(doc_more)
+$(osx_dest): $(doc_more) $(BINS)
-rm -rf $(osx_dest)
$(INSTALL) -d $(osx_dest)
DESTDIR=$(osx_dest)/Package_root $(MAKE) install-program
@@ -179,14 +181,30 @@ $(osx_dest): $(doc_more)
$(INSTALL) -d $(osx_dest)/Resources
mv README.rtf $(osx_dest)/Resources/ReadMe.rtf
mv LICENSE.rtf $(osx_dest)/Resources/License.rtf
- sed -e 's#@PREFIX@#$(PREFIX)#g' OSX-Welcome.rtf > $(osx_dest)/Resources/Welcome.rtf
- sed -e 's/@VERSION@/$(VERSION)/g' Info.plist > $(osx_dest)/Info.plist
- cp Description.plist $(osx_dest)/
- PackageMaker -build -p Pandoc_$(VERSION).pkg \
- -f $(osx_dest)/Package_root \
- -r $(osx_dest)/Resources \
- -i $(osx_dest)/Info.plist \
- -d $(osx_dest)/Description.plist
+ sed -e 's#@PREFIX@#$(PREFIX)#g' $(osx_src)/Welcome.rtf > $(osx_dest)/Resources/Welcome.rtf
+ sed -e 's/@VERSION@/$(VERSION)/g' $(osx_src)/Info.plist > $(osx_dest)/Info.plist
+ cp $(osx_src)/Description.plist $(osx_dest)/
+ PackageMaker -build -p $(osx_pkg_name) \
+ -f $(osx_dest)/Package_root \
+ -r $(osx_dest)/Resources \
+ -i $(osx_dest)/Info.plist \
+ -d $(osx_dest)/Description.plist
+
+.PHONY: osx-dmg
+osx_dmg_name:=Pandoc.dmg
+osx_dmg_volume:="Pandoc $(VERSION)"
+cleanup_files+=$(osx_dmg_name)
+osx-dmg: osx-pkg
+ -rm -f $(osx_dmg_name)
+ hdiutil create $(osx_dmg_name) -size 05m -fs HFS+ -volname $(osx_dmg_volume)
+ dev_handle=`hdid $(osx_dmg_name) | grep Apple_HFS | perl -e '\$$_=<>; /^\\/dev\\/(disk.)/; print \$$1'`;\
+ ditto $(osx_pkg_name) /Volumes/$(osx_dmg_volume)/$(osx_pkg_name);\
+ hdiutil detach $$dev_handle
+ hdiutil convert $(osx_dmg_name) -format UDZO -o Pandoc.udzo.dmg
+ rm -f $(osx_dmg_name)
+ mv Pandoc.udzo.dmg $(osx_dmg_name)
+ chown root $(osx_dmg_name)
+ chgrp wheel $(osx_dmg_name)
.PHONY: test test-markdown
test: $(BINS)