git.iko.soy/typeable/pandoc
on master help sign in
Simplified osx package script.

Now compatible with OSX 10.3. Also, license works.

commit5c12221948cff8fa2a255323cd40f9e2e2ae3652 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 28 Jul 2011, 16:38 (15 years ago) parent4919b49
1 file changed+8−33
make_osx_package.sh+8−33
make_osx_package.sh+8−33
@@ -1,9 +1,9 @@
11#!/bin/sh -e
22
3−DIST=`pwd`/osx
3+DIST=osx
44VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
55RESOURCES=$DIST/Resources
6−ROOT=$DIST/Package_Root
6+ROOT=$DIST/pandoc
77BASE=pandoc-$VERSION
88PREFIX=$ROOT/usr/local
99
@@ -11,36 +11,12 @@ echo Removing old files...
1111rm -rf $DIST
1212mkdir -p $RESOURCES
1313
14−echo Creating Info.plist...
15−
16−cat > "$DIST/Info.plist" <<EOF
17−<?xml version="1.0" encoding="UTF-8"?>
18−<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
19−<pkg-info version="1.0">
20−<dict>
21− <key>CFBundleDevelopmentRegion</key>
22− <string>en</string>
23− <key>CFBundleIdentifier</key>
24− <string>net.johnmacfarlane.pandoc</string>
25− <key>CFBundleInfoDictionaryVersion</key>
26− <string>6.0</string>
27− <key>CFBundleName</key>
28− <string>pandoc</string>
29− <key>CFBundlePackageType</key>
30− <string>APPL</string>
31− <key>CFBundleShortVersionString</key>
32− <string>$VERSION</string>
33− <key>CFBundleVersion</key>
34− <string>$VERSION</string>
35−</dict>
36−</pkg-info>
37−EOF
38−
3914echo Building pandoc...
4015runghc Setup.hs configure --user --prefix=/usr/local --flags="executable -library highlighting"
4116runghc Setup.hs build
4217runghc Setup.hs copy --destdir=$ROOT
4318
19+echo Copying license...
4420cp COPYING $RESOURCES/License.txt
4521
4622PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
@@ -48,12 +24,10 @@ PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/P
4824echo Creating OSX package...
4925
5026$PACKAGEMAKER \
51− --title "pandoc" \
52− --info "$DIST/Info.plist" \
53− --root "$ROOT" \
54− --resources "$RESOURCES" \
55− --target "10.5" \
56− --version "$VERSION" \
27+ --root $ROOT \
28+ --id net.johnmacfarlane.pandoc \
29+ --resources $RESOURCES \
30+ --version $VERSION \
5731 --no-relocate \
5832 --out $BASE.pkg
5933
@@ -63,4 +37,5 @@ hdiutil create "$BASE.dmg" \
6337 -format UDZO -ov \
6438 -volname "pandoc $VERSION" \
6539 -srcfolder $BASE.pkg
40+hdiutil internet-enable "$BASE.dmg"
6641