git.iko.soy/typeable/pandoc
on master help sign in
Changes related to osx packaging:

+ Simplified osx-dmg target, which need not be built as root. + Made osx-pkg and osx-pkg-prep non-.PHONY, plus a few other minor changes to make the dependencies work correctly. + Removed \< from the sed regex in cabalize; this is not support in BSD sed. + Changed path information in osx/Welcome and message in uninstall-pandoc. git-svn-id: https://pandoc.googlecode.com/svn/trunk@67 788f1e2b-df1e-0410-8736-df70ead52e1b

commit309a15010c90ef8938c1106118421519798908ee authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateThu 2 Nov 2006, 03:30 (20 years ago) parentdd297dd
4 files changed+12−17
Makefile+7−13 cabalize+1−1 osx/Welcome+2−2 osx/uninstall-pandoc+2−1
Makefile+7−13
@@ -164,14 +164,13 @@ uninstall-all: uninstall-exec uninstall-doc uninstall-lib-doc
164164install: install-program
165165uninstall: uninstall-program
166166
167−.PHONY: osx-pkg osx-pkg-prep
168167osx_dest:=osx-pkg-tmp
169168osx_src:=osx
170169doc_more:=README.rtf LICENSE.rtf $(osx_src)/Welcome.rtf
171170osx_pkg_name:=Pandoc_$(VERSION).pkg
172171cleanup_files+=$(osx_dest) $(doc_more) $(osx_pkg_name)
173172osx-pkg-prep: $(osx_dest)
174−$(osx_dest): $(doc_more) $(BINS)
173+$(osx_dest)/: $(doc_more) $(BINS)
175174 -rm -rf $(osx_dest)
176175 $(INSTALL) -d $(osx_dest)
177176 DESTDIR=$(osx_dest)/Package_root $(MAKE) install-program
@@ -179,8 +178,8 @@ $(osx_dest): $(doc_more) $(BINS)
179178 find $(osx_dest) -type f -regex ".*bin/.*" | xargs chmod +x
180179 find $(osx_dest) -type f -regex ".*bin/$(THIS)" | xargs $(STRIP)
181180 $(INSTALL) -d $(osx_dest)/Resources
182− mv README.rtf $(osx_dest)/Resources/ReadMe.rtf
183− mv LICENSE.rtf $(osx_dest)/Resources/License.rtf
181+ cp README.rtf $(osx_dest)/Resources/ReadMe.rtf
182+ cp LICENSE.rtf $(osx_dest)/Resources/License.rtf
184183 sed -e 's#@PREFIX@#$(PREFIX)#g' $(osx_src)/Welcome.rtf > $(osx_dest)/Resources/Welcome.rtf
185184 sed -e 's/@VERSION@/$(VERSION)/g' $(osx_src)/Info.plist > $(osx_dest)/Info.plist
186185 cp $(osx_src)/Description.plist $(osx_dest)/
@@ -189,19 +188,20 @@ osx-pkg: osx-pkg-prep
189188 echo "Root permissions needed to create OSX package!"; \
190189 exit 1; \
191190 fi
192− find $(osx_dest) -type f | xargs chown root:wheel
191+ find $(osx_dest) | xargs chown root:wheel
193192 PackageMaker -build -p $(osx_pkg_name) \
194193 -f $(osx_dest)/Package_root \
195194 -r $(osx_dest)/Resources \
196195 -i $(osx_dest)/Info.plist \
197196 -d $(osx_dest)/Description.plist
197+ chgrp admin $(osx_pkg_name)
198198 -rm -rf $(osx_dest)
199199
200−.PHONY: osx-dmg osx-dmg-prep
200+.PHONY: osx-dmg
201201osx_dmg_name:=Pandoc.dmg
202202osx_dmg_volume:="Pandoc $(VERSION)"
203203cleanup_files+=$(osx_dmg_name)
204−osx-dmg-prep: $(osx_pkg_name)
204+osx-dmg: $(osx_pkg_name)
205205 -rm -f $(osx_dmg_name)
206206 hdiutil create $(osx_dmg_name) -size 05m -fs HFS+ -volname $(osx_dmg_volume)
207207 dev_handle=`hdid $(osx_dmg_name) | grep Apple_HFS | \
@@ -211,12 +211,6 @@ osx-dmg-prep: $(osx_pkg_name)
211211 hdiutil convert $(osx_dmg_name) -format UDZO -o Pandoc.udzo.dmg
212212 -rm -f $(osx_dmg_name)
213213 mv Pandoc.udzo.dmg $(osx_dmg_name)
214−osx-dmg: osx-dmg-prep
215− if [ "`id -u`" != 0 ]; then \
216− echo "Root permissions needed to create OSX disk image!"; \
217− exit 1; \
218− fi
219− chown root:wheel $(osx_dmg_name)
220214
221215.PHONY: test test-markdown
222216test: $(BINS)
cabalize+1−1
@@ -30,7 +30,7 @@ BUILD_DEPENDS=$(echo $BUILD_DEPENDS | sed -e 's# #, #g')
3030
3131# Handle 'Hs-Source-Dir' option name which was deprecated in Cabal > 1.1.3.
3232HS_SOURCE_DIRS='Hs-Source-Dirs'
33−cabal_version=$(ghc-pkg -l | sed -ne 's/.*\<[Cc]abal-\([^,]*\).*/\1/p')
33+cabal_version=$(ghc-pkg -l | sed -ne 's/.*[Cc]abal-\([^,]*\).*/\1/p')
3434if printf "$cabal_version\n1.1.3" | sort | tail -n 1 | grep -q '1\.1\.3'; then
3535 HS_SOURCE_DIRS='Hs-Source-Dir'
3636fi
osx/Welcome+2−2
@@ -4,8 +4,8 @@ to use `pandoc` and the associated wrapper scripts, you must have
44default path, add these lines to the end of `.profile` in your home
55directory and open a new terminal window:
66
7− export PATH=/usr/local/bin:$PATH
8− export MANPATH=/usr/local/man:$MANPATH
7+ export PATH=$PATH:/usr/local/bin
8+ export MANPATH=$MANPATH:/usr/local/share/man
99
1010To uninstall Pandoc at any time, use the following command:
1111
osx/uninstall-pandoc+2−1
@@ -3,7 +3,8 @@
33# everything installed by the Pandoc Mac OS X installer.
44
55if [ "`id -u`" != 0 ]; then \
6− echo "This script must be run with sudo."; \
6+ echo "This script must be run with root privileges:"; \
7+ echo "sudo /usr/local/bin/uninstall-pandoc"; \
78 exit 1; \
89fi
910