git.iko.soy/typeable/pandoc
on master help sign in
+ Updates to Makefile:

- New win-pkg target to build Windows binary package. - Changed name on OSX package. - New RELNAME global variable contains release name, e.g. pandoc-0.3 - Mac dmg is now created in top-level directory, not .. + Updates to website: - Changed download links to point to Google Code downloads area. - Added section on Windows binary package. git-svn-id: https://pandoc.googlecode.com/svn/trunk@286 788f1e2b-df1e-0410-8736-df70ead52e1b

commit5dfab2cb48e4d9c16c470a9a734e40992fbc3e4c authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSun 24 Dec 2006, 02:32 (20 years ago) parenta923f22
2 files changed+58−42
Makefile+35−34 web/index.txt+23−8
Makefile+35−34
@@ -17,7 +17,9 @@ CONFIGURE := configure
1717# Cabal constants
1818#-------------------------------------------------------------------------------
1919NAME := $(shell sed -ne 's/^[Nn]ame:[[:space:]]*//p' $(CABAL).in)
20+THIS := $(shell echo $(NAME) | tr A-Z a-z)
2021VERSION := $(shell sed -ne 's/^version[[:space:]]*=[[:space:]]*"\([^"]*\)"/\1/p' $(SRCDIR)/Main.hs)
22+RELNAME := $(THIS)-$(VERSION)
2123EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:[[:space:]]*//p' $(CABAL).in)
2224
2325#-------------------------------------------------------------------------------
@@ -51,7 +53,6 @@ DESTDIR ?= $(destdir)
5153#-------------------------------------------------------------------------------
5254# Installation paths
5355#-------------------------------------------------------------------------------
54−THIS := $(shell echo $(NAME) | tr A-Z a-z)
5556DESTPATH := $(DESTDIR)$(PREFIX)
5657BINPATH := $(DESTPATH)/bin
5758DATAPATH := $(DESTPATH)/share
@@ -88,6 +89,8 @@ all: build-program
8889 ./$(MAIN) -s -w rtf $< >$@ || rm -f $@
8990%.pdf: % $(MAIN) markdown2pdf
9091 sh ./markdown2pdf $< || rm -f $@
92+%.txt: %
93+ perl -p -e 's/\n/\r\n/' $< > $@ || rm -f $@ # convert to DOS line endings
9194
9295.PHONY: templates
9396templates: $(SRCDIR)/templates
@@ -236,13 +239,15 @@ uninstall-all: uninstall-exec uninstall-doc uninstall-lib-doc
236239install: install-program
237240uninstall: uninstall-program
238241
242+# OSX packages: make osx-pkg-prep, then (as root) make osx-pkg
243+.PHONY: osx-pkg osx-pkg-prep
239244osx_dest:=osx-pkg-tmp
240245osx_src:=osx
241246doc_more:=README.rtf COPYRIGHT.rtf $(osx_src)/Welcome.rtf
242−osx_pkg_name:=$(NAME)_$(VERSION).pkg
247+osx_pkg_name:=$(RELNAME).pkg
243248cleanup_files+=$(osx_dest) $(doc_more) $(osx_pkg_name)
244−osx-pkg-prep: build-program $(osx_dest)
245−$(osx_dest)/: $(doc_more)
249+osx-pkg-prep: $(osx_dest)
250+$(osx_dest)/: build-program $(doc_more)
246251 -rm -rf $(osx_dest)
247252 $(INSTALL) -d $(osx_dest)
248253 DESTDIR=$(osx_dest)/Package_root $(MAKE) install-program
@@ -255,7 +260,8 @@ $(osx_dest)/: $(doc_more)
255260 sed -e 's#@PREFIX@#$(PREFIX)#g' $(osx_src)/Welcome.rtf > $(osx_dest)/Resources/Welcome.rtf
256261 sed -e 's/@VERSION@/$(VERSION)/g' $(osx_src)/Info.plist > $(osx_dest)/Info.plist
257262 cp $(osx_src)/Description.plist $(osx_dest)/
258−osx-pkg: osx-pkg-prep
263+osx-pkg: $(osx_pkg_name)
264+$(osx_pkg_name): $(osx_dest)
259265 if [ "`id -u`" != 0 ]; then \
260266 echo "Root permissions needed to create OSX package!"; \
261267 exit 1; \
@@ -270,11 +276,12 @@ osx-pkg: osx-pkg-prep
270276 -rm -rf $(osx_dest)
271277
272278.PHONY: osx-dmg
273−osx_dmg_name:=$(NAME).dmg
274−osx_udzo_name:=$(NAME).udzo.dmg
279+osx_dmg_name:=$(RELNAME).dmg
280+cleanup_files+=$(osx_dmg_name)
281+osx_udzo_name:=$(RELNAME).udzo.dmg
275282osx_dmg_volume:="$(NAME) $(VERSION)"
276−osx-dmg: ../$(osx_dmg_name)
277−../$(osx_dmg_name): $(osx_pkg_name)
283+osx-dmg: $(osx_dmg_name)
284+$(osx_dmg_name): $(osx_pkg_name)
278285 -rm -f $(osx_dmg_name)
279286 hdiutil create $(osx_dmg_name) -size 05m -fs HFS+ -volname $(osx_dmg_volume)
280287 dev_handle=`hdid $(osx_dmg_name) | grep Apple_HFS | \
@@ -283,7 +290,20 @@ osx-dmg: ../$(osx_dmg_name)
283290 hdiutil detach $$dev_handle
284291 hdiutil convert $(osx_dmg_name) -format UDZO -o $(osx_udzo_name)
285292 -rm -f $(osx_dmg_name)
286− mv $(osx_udzo_name) ../$(osx_dmg_name)
293+ mv $(osx_udzo_name) $(osx_dmg_name)
294+
295+
296+.PHONY: win-pkg
297+win_pkg_name:=$(RELNAME).zip
298+win_docs:=COPYING.txt COPYRIGHT.txt BUGS.txt README-WINDOWS.txt
299+cleanup_files+=$(win_pkg_name) $(win_docs)
300+win-pkg: $(win_pkg_name)
301+$(win_pkg_name): $(THIS).exe $(win_docs)
302+ zip -r $(win_pkg_name) $(THIS).exe $(win_docs)
303+cleanup_files+=README-WINDOWS
304+README-WINDOWS: README
305+ sed -e '/^Requirements/,/^\[fancyvrb\]:/ d' \
306+ -e '/^Character encodings/,/mysite.com$$/ d' $< > $@
287307
288308.PHONY: test test-markdown
289309test: $(MAIN)
@@ -299,13 +319,12 @@ tags: $(src_all)
299319 LC_ALL=C sort tags >tags.sorted; mv tags.sorted tags
300320
301321.PHONY: tarball
302−fullname:=$(THIS)-$(VERSION)
303−tarball_name:=$(fullname).tar.gz
322+tarball_name:=$(RELNAME).tar.gz
304323cleanup_files+=$(tarball_name)
305324tarball: $(tarball_name)
306325$(tarball_name):
307− svn export . $(fullname)
308− tar cvzf $(tarball_name) $(fullname)
326+ svn export . $(RELNAME)
327+ tar cvzf $(tarball_name) $(RELNAME)
309328 -rm -rf $(fullname)
310329
311330.PHONY: deb
@@ -336,30 +355,13 @@ web_dest:=web/pandoc
336355make_page:=./$(MAIN) -s -B $(web_src)/header.html \
337356 -A $(web_src)/footer.html \
338357 -H $(web_src)/css
339−win_main:=$(basename $(MAIN)).exe
340358cleanup_files+=$(web_dest)
341359website: $(web_dest)
342−$(web_dest)/: $(MAIN) html $(tarball_name)
343− @[ -f ../$(osx_dmg_name) ] || { \
344− echo "*** Missing ../$(osx_dmg_name). ***"; \
345− exit 1; \
346− }
347− @[ -f ../$(deb_main) ] || { \
348− echo "*** Missing ../$(deb_main). ***"; \
349− exit 1; \
350− }
351− @[ -f $(win_main) ] || { \
352− echo "*** Missing $(win_main). ***"; \
353− exit 1; \
354− }
360+$(web_dest)/: $(MAIN) html
355361 -rm -rf $(web_dest)
356362 ( \
357363 mkdir $(web_dest); \
358364 cp -r html $(web_dest)/doc; \
359− cp ../$(osx_dmg_name) $(web_dest)/; \
360− cp ../$(deb_main) $(web_dest)/; \
361− cp $(win_main) $(web_dest)/; \
362− cp $(tarball_name) $(web_dest)/; \
363365 cp $(web_src)/*.css $(web_dest)/; \
364366 sed -e 's#@PREFIX@#$(PREFIX)#g' $(osx_src)/Welcome | \
365367 $(make_page) > $(web_dest)/osx-notes.html; \
@@ -370,9 +372,8 @@ $(web_dest)/: $(MAIN) html $(tarball_name)
370372 $(make_page) README > $(web_dest)/README.html; \
371373 $(make_page) INSTALL > $(web_dest)/INSTALL.html; \
372374 sed -e 's/@TARBALL_NAME@/$(tarball_name)/g' $(web_src)/index.txt | \
373− sed -e 's/@DEB_NAME@/$(deb_main)/g' | \
374375 sed -e 's/@OSX_DMG_NAME@/$(osx_dmg_name)/g' | \
375− sed -e 's/@WINDOWS_EXE_NAME@/$(win_main)/g' | \
376+ sed -e 's/@WINDOWS_PKG_NAME@/$(win_pkg_name)/g' | \
376377 sed -e 's/@VERSION@/$(VERSION)/g' | \
377378 $(make_page) > $(web_dest)/index.html; \
378379 ) || { rm -rf $(web_dest); exit 1; }
web/index.txt+23−8
@@ -18,23 +18,38 @@ For more information, see the [README](README.html) file.
1818
1919Pandoc is free software, released under the [GPL].
2020
21−**Source distribution:** [`@TARBALL_NAME@`](@TARBALL_NAME@).
21+**Source distribution:** [`@TARBALL_NAME@`].
2222To install, unpack the archive and follow the instructions in the
2323[INSTALL](INSTALL.html) file. You'll need the [GHC] Haskell compiler,
2424version 6.4 or higher.
2525
26−**MacOS X binary package:** [`@OSX_DMG_NAME@`](@OSX_DMG_NAME@).
26+**MacOS X binary package:** [`@OSX_DMG_NAME@`].
2727To install, just double-click the package icon in the disk
2828image. See the [installation notes](osx-notes.html) for important
2929information about setting your `PATH`. Note: This package was
3030compiled on a G4 Mac; it will also work on an Intel Mac via emulation.
3131
32−**Debian binary package:** [`@DEB_NAME@`](@DEB_NAME@).
33−To install (on x86 Debian-based linux systems only):
34−
35− sudo dpkg -i @DEB_NAME@
36−
37−**Windows executable:** [`@WINDOWS_EXE_NAME@`](@WINDOWS_EXE_NAME@).
32+**Windows binary package:** [`@WINDOWS_PKG_NAME@`].
33+The zip file contains the `pandoc.exe` command-line program (which
34+you should extract from the zip archive and put somewhere in your
35+PATH). See the included file `README-WINDOWS.txt` for instructions
36+on using the program. Note: If you use [Cygwin], we recommend that
37+you compile Pandoc from source. This will give you access to the
38+wrapper scripts `markdown2pdf` and `web2markdown`, which are not
39+included in the Windows binary package.
40+
41+[`@TARBALL_NAME@`]: http://pandoc.googlecode.com/files/@TARBALL_NAME@
42+ "Download source tarball from Pandoc's Google Code site"
43+[`@OSX_DMG_NAME@`]: http://pandoc.googlecode.com/files/@OSX_DMG_NAME@
44+ "Download Mac OS X disk image from Pandoc's Google Code site"
45+[`@WINDOWS_PKG_NAME@`]: http://pandoc.googlecode.com/files/@WINDOWS_PKG_NAME@
46+ "Download Windows zip file from Pandoc's Google Code site"
47+[Cygwin]: http://www.cygwin.com/
48+ "Cygwin - a linux-like environment for Windows"
49+
50+**Debian packages:** Pandoc will be available soon in the Debian unstable
51+package repository, thanks to the efforts of Recai Oktaş. Watch this
52+space for details.
3853
3954**Repository:** Pandoc has a publicly accesible subversion repository
4055at Google Code (<http://code.google.com/p/pandoc>). To check out the