aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-01 07:49:18 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-01 07:49:18 +0000
commit1f18bc8266b39fe61380603e319d69a846630e37 (patch)
treeaa5a57f58b61292ea33a79dde8fbefeb5a55f203 /Makefile
parentc8bac7e00e9e7f24d8449463f649032e23817347 (diff)
downloadpandoc-1f18bc8266b39fe61380603e319d69a846630e37.tar.gz
Changes to osx-pkg and osx-dmg targets.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@60 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 19 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index a8f414ccb..3635addfe 100644
--- a/Makefile
+++ b/Makefile
@@ -164,37 +164,42 @@ uninstall-all: uninstall-exec uninstall-doc uninstall-lib-doc
install: install-program
uninstall: uninstall-program
-.PHONY: osx-pkg
-osx_dest:=osx-pkg
+osx_dest:=osx-pkg-tmp
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-pkg-prep: $(osx_dest)
$(osx_dest): $(doc_more) $(BINS)
-rm -rf $(osx_dest)
$(INSTALL) -d $(osx_dest)
DESTDIR=$(osx_dest)/Package_root $(MAKE) install-program
find $(osx_dest) -type f -regex ".*bin/.*" | xargs chmod +x
find $(osx_dest) -type f -regex ".*bin/$(THIS)" | xargs $(STRIP)
- find $(osx_dest) -type f | xargs chown root:wheel
$(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_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)/
+
+osx-pkg: osx-pkg-prep
+ if [ "`id -u`" != 0 ]; then \
+ echo "Root permissions needed to create OSX package!"; \
+ exit 0; \
+ fi
+ find $(osx_dest) -type f | xargs chown root:wheel
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
+ rm -rf $(osx_dest)
-.PHONY: osx-dmg
osx_dmg_name:=Pandoc.dmg
osx_dmg_volume:="Pandoc $(VERSION)"
cleanup_files+=$(osx_dmg_name)
-osx-dmg: osx-pkg
+osx-dmg-prep: $(osx_pkg_name)
-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'`;\
@@ -203,8 +208,14 @@ osx-dmg: osx-pkg
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: osx-dmg
+osx-dmg: osx-dmg-prep
+ if [ "`id -u`" != 0 ]; then \
+ echo "Root permissions needed to create OSX disk image!"; \
+ exit 0; \
+ fi
+ chown root:wheel $(osx_dmg_name)
.PHONY: test test-markdown
test: $(BINS)